001    package railo.runtime;
002     
003    import java.io.IOException;
004    import java.util.Locale;
005    import java.util.TimeZone;
006    
007    import javax.servlet.ServletException;
008    import javax.servlet.ServletOutputStream;
009    import javax.servlet.http.HttpServletRequest;
010    import javax.servlet.http.HttpServletResponse;
011    import javax.servlet.jsp.JspException;
012    import javax.servlet.jsp.tagext.BodyTag;
013    import javax.servlet.jsp.tagext.Tag;
014    
015    import railo.commons.io.res.Resource;
016    import railo.runtime.config.ConfigWeb;
017    import railo.runtime.db.DataSourceManager;
018    import railo.runtime.debug.Debugger;
019    import railo.runtime.err.ErrorPage;
020    import railo.runtime.exp.PageException;
021    import railo.runtime.net.ftp.FTPPool;
022    import railo.runtime.query.QueryCache;
023    import railo.runtime.security.Credential;
024    import railo.runtime.type.Array;
025    import railo.runtime.type.Collection;
026    import railo.runtime.type.Iterator;
027    import railo.runtime.type.Query;
028    import railo.runtime.type.Scope;
029    import railo.runtime.type.UDF;
030    import railo.runtime.type.ref.Reference;
031    import railo.runtime.type.scope.Application;
032    import railo.runtime.type.scope.Argument;
033    import railo.runtime.type.scope.CGI;
034    import railo.runtime.type.scope.Client;
035    import railo.runtime.type.scope.Cluster;
036    import railo.runtime.type.scope.Cookie;
037    import railo.runtime.type.scope.Form;
038    import railo.runtime.type.scope.Request;
039    import railo.runtime.type.scope.Server;
040    import railo.runtime.type.scope.Session;
041    import railo.runtime.type.scope.Threads;
042    import railo.runtime.type.scope.URL;
043    import railo.runtime.type.scope.URLForm;
044    import railo.runtime.type.scope.Undefined;
045    import railo.runtime.type.scope.Variables;
046    import railo.runtime.util.ApplicationContext;
047    import railo.runtime.util.VariableUtil;
048    
049    /**
050     * page context for every page object. 
051     * the PageContext is a jsp page context expanded by cold fusion functionality.
052     * for example you have the method getSession to get jsp combatible session object (HTTPSession)
053     *  and with sessionScope() you get CFML combatible session object (Struct,Scope).
054     */
055    public abstract class PageContext extends javax.servlet.jsp.PageContext {
056    
057        /**
058         * returns matching scope
059         * @return scope matching to defined scope definition
060         * @param type type of scope (Scope.xx)
061         * @throws PageException
062         * FUTURE set to deprecated
063         */
064            public abstract Scope scope(int type) throws PageException;
065    
066        /**
067         * @return undefined scope, undefined scope is a placeholder for the scopecascading
068         */
069        public abstract Undefined undefinedScope();
070    
071        /**
072         * @return variables scope
073         */
074        public abstract Variables variablesScope();
075    
076        /**
077         * @return url scope
078         */
079        public abstract URL urlScope();
080    
081        /**
082         * @return form scope
083         */
084        public abstract Form formScope();
085    
086        /**
087         * @return scope mixed url and scope
088         */
089        public abstract URLForm urlFormScope();
090    
091        /**
092         * @return request scope
093         */
094        public abstract Request requestScope();
095    
096        /**
097         * @return request scope
098         */
099        public abstract CGI cgiScope();
100        
101        /**
102         * @return application scope
103         * @throws PageException
104         */
105        public abstract Application applicationScope() throws PageException;
106    
107        /**
108         * @return arguments scope
109         */
110        public abstract Argument argumentsScope();
111    
112        /** 
113         * return the argument scope 
114         * @param bind indicate that the Argument Scope is binded for using outsite of the udf
115         * @return Argument Scope 
116         */
117        public abstract Argument argumentsScope(boolean bind);
118    
119        /**
120         * @return arguments scope
121         */
122        public abstract Scope localScope();
123    
124        /**
125         * @return session scope
126         * @throws PageException
127         */
128        public abstract Session sessionScope() throws PageException;
129    
130        /**
131         * @return server scope
132         * @throws PageException
133         */
134        public abstract Server serverScope() throws PageException;
135    
136        /**
137         * @return cookie scope
138         */
139        public abstract Cookie cookieScope();
140    
141        /**
142         * @return cookie scope
143         * @throws PageException
144         */
145        public abstract Client clientScope() throws PageException;
146        /**
147         * @return cluster scope
148         * @throws PageException
149         */
150        public abstract Cluster clusterScope() throws PageException;
151    
152        /**
153         * cluster scope
154         * @param create return null when false and scope does not exists
155         * @return cluster scope or null
156         * @throws PageException
157         */
158        public abstract Cluster clusterScope(boolean create) throws PageException;
159        
160        
161        /**
162         * set property at a collection object 
163         * @param coll Collection Object (Collection, HashMap aso.)
164         * @param key key of the new value
165         * @param value new Value
166         * @return value setted
167         * @throws PageException
168         * @deprecated use instead <code>{@link #set(Object, railo.runtime.type.Collection.Key, Object)}</code>
169             */
170        public abstract Object set(Object coll, String key, Object value) throws PageException;
171    
172        /**
173         * set property at a collection object 
174         * @param coll Collection Object (Collection, HashMap aso.)
175         * @param key key of the new value
176         * @param value new Value
177         * @return value setted
178         * @throws PageException
179         */
180        public abstract Object set(Object coll, Collection.Key key, Object value) throws PageException;
181    
182        /**
183         * touch a new property, if property doesn't existset a Struct, otherwise do nothing
184         * @param coll Collection Object
185         * @param key key to touch
186         * @return Property
187         * @throws PageException
188         * @deprecated use instead <code>{@link #touch(Object, railo.runtime.type.Collection.Key)}</code>
189             */
190        public abstract Object touch(Object coll, String key) throws PageException;
191    
192        /**
193         * touch a new property, if property doesn't existset a Struct, otherwise do nothing
194         * @param coll Collection Object
195         * @param key key to touch
196         * @return Property
197         * @throws PageException
198         */
199        public abstract Object touch(Object coll, Collection.Key key) throws PageException;
200    
201      
202        /**
203         * same like getProperty but return a collection object (QueryColumn) if return object is a Query
204         * @param coll Collection Object
205         * @param key key to touch
206         * @return Property or QueryColumn
207         * @throws PageException
208         * @deprecated use instead <code>{@link #getCollection(Object, railo.runtime.type.Collection.Key, Object)}</code>
209             */
210        public abstract Object getCollection(Object coll, String key)
211                throws PageException;
212    
213      
214        /**
215         * same like getProperty but return a collection object (QueryColumn) if return object is a Query
216         * @param coll Collection Object
217         * @param key key to touch
218         * @return Property or QueryColumn
219         * @throws PageException
220         */
221        public abstract Object getCollection(Object coll, Collection.Key key)
222                throws PageException;
223    
224        /**
225         * same like getProperty but return a collection object (QueryColumn) if return object is a Query
226         * @param coll Collection Object
227         * @param key key to touch
228         * @return Property or QueryColumn
229         * @deprecated use instead <code>{@link #getCollection(Object, railo.runtime.type.Collection.Key, Object)}</code>
230             */
231        public abstract Object getCollection(Object coll, String key, Object defaultValue);
232    
233        /**
234         * same like getProperty but return a collection object (QueryColumn) if return object is a Query
235         * @param coll Collection Object
236         * @param key key to touch
237         * @return Property or QueryColumn
238         */
239        public abstract Object getCollection(Object coll, Collection.Key key, Object defaultValue);
240    
241        /**
242         * 
243         * @param coll Collection to get value
244         * @param key key of the value
245         * @return return value of a Collection, throws Exception if value doesn't exist
246         * @throws PageException
247         * @deprecated use instead <code>{@link #get(Object, railo.runtime.type.Collection.Key)}</code>
248             */
249        public abstract Object get(Object coll, String key) throws PageException;
250    
251        /**
252         * 
253         * @param coll Collection to get value
254         * @param key key of the value
255         * @return return value of a Collection, throws Exception if value doesn't exist
256         * @throws PageException
257         */
258        public abstract Object get(Object coll, Collection.Key key) throws PageException;
259    
260        /**
261         * 
262         * @param coll Collection to get value
263         * @param key key of the value
264         * @return return value of a Collection, throws Exception if value doesn't exist
265         * @throws PageException
266         * @deprecated use instead <code>{@link #getReference(Object, railo.runtime.type.Collection.Key)}</code>
267             */
268        public abstract Reference getReference(Object coll, String key) throws PageException;
269    
270        /**
271         * 
272         * @param coll Collection to get value
273         * @param key key of the value
274         * @return return value of a Collection, throws Exception if value doesn't exist
275         * @throws PageException
276             */
277        public abstract Reference getReference(Object coll, Collection.Key key) throws PageException;
278        
279        /* *
280         * get data from a scope
281         * @param scope
282         * @param key1
283         * @param key2
284         * @return
285         * @throws PageException
286         * /
287        public abstract Object get(Scope scope, String key1, String key2) throws PageException;
288        */
289        /* *
290         * get data from a scope
291         * @param scope
292         * @param key1
293         * @param key2
294         * @param key3
295         * @return
296         * @throws PageException
297         * /
298        public abstract Object get(Scope scope, String key1, String key2, String key3) throws PageException;
299        */
300        /* *
301         * get data from a scope
302         * @param scope
303         * @param key1
304         * @param key2
305         * @param key3
306         * @param key4
307         * @return
308         * @throws PageException
309         * /
310        public abstract Object get(Scope scope, String key1, String key2, String key3, String key4) throws PageException;
311        */
312        /* *
313         * get data from a scope
314         * @param scope
315         * @param key1
316         * @param key2
317         * @param key3
318         * @param key4
319         * @param key5
320         * @return
321         * @throws PageException
322         * /
323        public abstract Object get(Scope scope, String key1, String key2, String key3, String key4, String key5) throws PageException;
324        */
325        /* *
326         * get data from a scope
327         * @param scope
328         * @param key1
329         * @param key2
330         * @param key3
331         * @param key4
332         * @param key5
333         * @param key6
334         * @return
335         * @throws PageException
336         * /
337        public abstract Object get(Scope scope, String key1, String key2, String key3, String key4, String key5, String key6) throws PageException;
338    */
339        
340        
341        
342        
343        
344        
345        
346        
347        
348        
349        
350        /* *
351         * set data from a scope
352         * @param scope
353         * @param key1
354         * @param key2
355         * @return
356         * @throws PageException
357         * /
358        public abstract Object set(Scope scope, String key1, String key2, Object value) throws PageException;
359        */
360        /* *
361         * set data from a scope
362         * @param scope
363         * @param key1
364         * @param key2
365         * @param key3
366         * @return
367         * @throws PageException
368         * /
369        public abstract Object set(Scope scope, String key1, String key2, String key3, Object value) throws PageException;
370        */
371        /* *
372         * set data from a scope
373         * @param scope
374         * @param key1
375         * @param key2
376         * @param key3
377         * @param key4
378         * @return
379         * @throws PageException
380         * /
381        public abstract Object set(Scope scope, String key1, String key2, String key3, String key4, Object value) throws PageException;
382        */
383        /* *
384         * set data from a scope
385         * @param scope
386         * @param key1
387         * @param key2
388         * @param key3
389         * @param key4
390         * @param key5
391         * @return
392         * @throws PageException
393         * /
394        public abstract Object set(Scope scope, String key1, String key2, String key3, String key4, String key5, Object value) throws PageException;
395        */
396        /* *
397         * set data from a scope
398         * @param scope
399         * @param key1
400         * @param key2
401         * @param key3
402         * @param key4
403         * @param key5
404         * @param key6
405         * @return
406         * @throws PageException
407         * /
408        public abstract Object set(Scope scope, String key1, String key2, String key3, String key4, String key5, String key6, Object value) throws PageException;
409    */
410        
411    
412        
413        /**
414         * 
415         * @param coll Collection to get value
416         * @param key key of the value
417         * @return return value of a Collection, return null if value not exists
418         * @deprecated use instead <code>{@link #get(Object, railo.runtime.type.Collection.Key, Object)}</code>
419             */
420        public abstract Object get(Object coll, String key, Object defaultValue);
421        
422        /**
423         * 
424         * @param coll Collection to get value
425         * @param key key of the value
426         * @return return value of a Collection, return null if value not exists
427         */
428        public abstract Object get(Object coll, Collection.Key key, Object defaultValue);
429    
430        /**
431         * sets a value by string syntax ("scopename.key.key" -> "url.name")
432         * @param var Variable String name to set
433         * @param value value to set
434         * @return setted value
435         * @throws PageException
436         */
437        public abstract Object setVariable(String var, Object value)
438                throws PageException;
439    
440        /**
441         * 
442         * @param var variable name to get
443         * @return return a value by string syntax ("scopename.key.key" -> "url.name")
444         * @throws PageException
445         **/
446        public abstract Object getVariable(String var) throws PageException;
447    
448        /**
449         * evaluate given expression
450         * @param expression expression to evaluate
451         * @return return value generated by expression or null
452         * @throws PageException
453         **/
454        public abstract Object evaluate(String expression) throws PageException;
455        // FUTURE public abstract String serialize(Object expression) throws PageException;
456    
457        /**
458         * 
459         * @param var variable name to get
460         * @return return a value by string syntax ("scopename.key.key" -> "url.name")
461         * @throws PageException
462         */
463        public abstract Object removeVariable(String var) throws PageException;
464    
465        /**
466         * get variable from string definition and cast ist to a Query Object
467         * @param key Variable Name to get
468         * @return Query
469         * @throws PageException
470         */
471        public abstract Query getQuery(String key) throws PageException;
472    
473        /**
474         * write a value to the header of the response
475         * @param name name of the value to set
476         * @param value value to set
477         */
478        public abstract void setHeader(String name, String value);
479    
480        /**
481         * @return returns the cfid of the actuell user
482         */
483        public abstract String getCFID();
484    
485        /**
486         * @return returns the actuell cftoken of the user 
487         */
488        public abstract String getCFToken();
489    
490        
491        /**
492         * @return return the session id
493         */
494        public abstract String getJSessionId();
495        
496        /**
497         * @return returns the urltoken of the actuell user
498         */
499        public abstract String getURLToken();
500    
501        /**
502         * @return returns the page context id
503         */
504        public abstract int getId();
505    
506        /**
507         * @return Returns the locale.
508         */
509        public abstract Locale getLocale();
510        
511        /**
512         * @param strLocale The locale to set as String.
513         */
514        public abstract void setLocale(Locale locale);
515        
516        /**
517         * @param strLocale The locale to set as String.
518         * @throws PageException
519         * @deprecated use instead <code>{@link #setLocale(Locale)}</code> 
520         */
521        public abstract void setLocale(String strLocale) throws PageException;
522        
523        /**
524         * @return Returns the Config Object of the PageContext.
525         */
526        public abstract ConfigWeb getConfig();
527        
528        /**
529         * return HttpServletRequest, getRequest only returns ServletRequest
530         * @return HttpServletRequest
531         */
532        public abstract HttpServletRequest getHttpServletRequest();
533    
534        /**
535         * return HttpServletResponse, getResponse only returns ServletResponse
536         * @return HttpServletResponse
537         */
538        public abstract HttpServletResponse getHttpServletResponse();
539        
540        public abstract ServletOutputStream getServletOutputStream() throws IOException; /// FUTURE remove
541        // public OutputStream getResponseStream() throws IOException; FUTURE add
542        
543        /**
544         * returns the tag that is in use
545         * @return Returns the currentTag.
546         */
547        public abstract Tag getCurrentTag();
548    
549        /**
550         * @return Returns the applicationContext.
551         */
552        public abstract ApplicationContext getApplicationContext();
553        
554    
555        /**
556         * Writes a String to the Response Buffer
557         * @param str
558         * @throws IOException
559         */
560        public abstract void write(String str) throws IOException ;
561        
562        /**
563         * Writes a String to the Response Buffer,also when cfoutputonly is true and execution 
564         * is outside of a cfoutput
565         * @param str
566         * @throws IOException
567         */
568        public abstract void forceWrite(String str) throws IOException;
569        
570        /**
571         * Writes a String to the Response Buffer,also when cfoutputonly is true and execution is outside of a cfoutput
572         * @param o
573         * @throws IOException
574         * @throws PageException 
575         */
576        public abstract void writePSQ(Object o) throws IOException, PageException ;
577        
578    
579        /**
580         * @return the current template SourceFile
581         */
582        public abstract PageSource getCurrentPageSource();
583        
584        /**
585         * @return the current template SourceFile
586         */
587        public abstract PageSource getCurrentTemplatePageSource();
588        
589        /**
590         * @return base template file
591         */
592        public abstract PageSource getBasePageSource();
593        
594        /**
595         * sets the pagecontext silent
596         * @return  return setting that was before
597         */
598        public abstract boolean setSilent();
599        
600        /**
601         * unsets the pagecontext silent
602         * @return return setting that was before
603         */
604        public abstract boolean unsetSilent();
605        
606    
607        /**
608         * return debugger of the page Context
609         * @return debugger
610         */
611        public abstract Debugger getDebugger();
612        
613    
614        /**
615         * @return Returns the executionTime.
616         */
617        public abstract int getExecutionTime();
618    
619        /**
620         * @param executionTime The executionTime to set.
621         */
622        public abstract void setExecutionTime(int executionTime);
623        
624    
625        /**
626         * @return Returns the remoteUser.
627         * @throws PageException
628         */
629        public abstract Credential getRemoteUser() throws PageException;
630        
631        /**
632         * clear the remote user
633         */
634        public abstract void clearRemoteUser();
635        
636        /**
637         * @param remoteUser The remoteUser to set.
638         */
639        public abstract void setRemoteUser(Credential remoteUser);
640        
641        /**
642         * array of current template stack
643         * @return array
644         * @throws PageException 
645         */
646        public abstract Array getTemplatePath() throws PageException;
647        
648        /**
649         * returns the current level, how deep is the page stack
650         * @return level
651         */
652        public abstract int getCurrentLevel();
653    
654        /**
655         * @return Returns the variableUtil.
656         */
657        public abstract VariableUtil getVariableUtil();
658        
659        
660        /**
661         * @param applicationContext The applicationContext to set.
662         */
663        public abstract void setApplicationContext(ApplicationContext applicationContext);
664        
665    
666        /**
667         * creates a PageSource from Realpath
668         * @param realPath
669         * @return Page Source
670         * @deprecated use instead getRelativePageSources or getRelativePageSourceExisting
671         */
672        public abstract PageSource getRelativePageSource(String realPath);
673        
674        
675        // FUTURE @deprecated use instead Config.getPageSources or Config.getPageSourceExisting
676        /**
677             * get PageSource of the first Mapping that match the given realPath
678             * @param realPath path to get PageSource for
679             */
680            public abstract PageSource getPageSource(String realPath);
681    
682            // FUTURE @deprecated use instead Config.getPhysicalResources or Config.getPhysicalResourceExisting
683            /**
684             * get Resource of the first Mapping that match the given realPath
685             * @param realPath path to get PageSource for
686             */
687            public abstract Resource getPhysical(String realPath, boolean alsoDefaultMapping);
688        
689        
690            public abstract PageSource toPageSource(Resource res, PageSource defaultValue);
691    
692        /**
693         * set a other variable scope
694         * @param scope
695         */
696        public abstract void setVariablesScope(Variables scope);
697        
698    
699        /** 
700         * includes a path from a absolute path
701         * @param source absolute path as file object
702         * @throws ServletException
703         * @deprecated replaced with <code>{@link #doInclude(PageSource)}</code>
704         */
705        public abstract void include(PageSource source) throws  ServletException;
706    
707        /**  
708         * includes a path from a absolute path
709         * @param source absolute path as file object
710         * @throws ServletException
711         * deprcated use other doInclude methods
712         */
713        public abstract void doInclude(PageSource source) throws  PageException;
714        
715        //FUTURE public abstract void doInclude(PageSource[] source) throws  PageException;
716        
717        
718        /**  
719         * includes a path from a absolute path
720         * @param source absolute path as file object
721         * @throws ServletException
722         */
723        public abstract void doInclude(String source) throws  PageException;
724        
725        
726        /**
727         * clear the actuell output buffer
728         */
729        public abstract void clear();
730    
731        /**
732         * @return returns the ftp pool
733         */
734        public abstract FTPPool getFTPPool();
735    
736        /**
737         * @return return the request timeout for this pagecontext in milli seconds
738         */
739        public abstract long getRequestTimeout();
740        
741    
742        /**
743         * @return returns the query cache
744         */
745        public abstract QueryCache getQueryCache();
746        
747        /**
748         * @param requestTimeout The requestTimeout to set.
749         */
750        public abstract void setRequestTimeout(long requestTimeout);
751        
752        /**
753         * sets state of cfoutput only
754         * @param boolEnablecfoutputonly
755         */
756        public abstract void setCFOutputOnly(boolean boolEnablecfoutputonly);
757        
758        /**
759         * returns if single quotes will be preserved inside a query tag (psq=preserve single quote)
760         * @return preserve single quote
761         */
762        public abstract boolean getPsq();
763        
764        /**
765         * Close the response stream.
766         */
767        public abstract void close();
768        
769        /**
770         * adds a PageSource
771         * @param ps
772         * @param alsoInclude 
773         */
774        public abstract void addPageSource(PageSource ps, boolean alsoInclude);
775        /**
776         * clear all catches
777         */
778        public abstract void clearCatch();
779        
780        /**
781         * execute a request n the pageConext
782         * @param realPath
783         * @throws PageException 
784         * @throws IOException
785         */
786        public abstract void execute(String realPath, boolean throwException) throws PageException;
787        
788        /**
789         * Flush Content of buffer to the response stream of the Socket.
790         */
791        public abstract void flush();
792        
793        /**
794         * call a UDF Function and return "return value" of the function
795         * @param coll Collection of the UDF Function
796         * @param key name of the function
797         * @param args arguments to call the function
798         * @return return value of the function
799         * @throws PageException
800         */
801        public abstract Object getFunction(Object coll, String key, Object[] args) throws PageException;
802        
803        /**
804         * call a UDF Function and return "return value" of the function
805         * @param coll Collection of the UDF Function
806         * @param key name of the function
807         * @param args arguments to call the function
808         * @return return value of the function
809         * @throws PageException
810         */
811        public abstract Object getFunction(Object coll, Collection.Key key, Object[] args) throws PageException;
812        
813        
814        /**
815         * call a UDF Function and return "return value" of the function
816         * @param coll Collection of the UDF Function
817         * @param key name of the function
818         * @param args arguments to call the function
819         * @return return value of the function
820         * @throws PageException
821         */
822        public abstract Object getFunctionWithNamedValues(Object coll, String key, Object[] args) throws PageException;
823        
824        
825        /**
826         * call a UDF Function and return "return value" of the function
827         * @param coll Collection of the UDF Function
828         * @param key name of the function
829         * @param args arguments to call the function
830         * @return return value of the function
831         * @throws PageException
832         */
833        public abstract Object getFunctionWithNamedValues(Object coll, Collection.Key key, Object[] args) throws PageException;
834    
835        /**
836         * get variable from string definition and cast ist to a Iterator Object
837         * @param key Variable Name to get
838         * @return Iterator
839         * @throws PageException
840         */
841        public abstract Iterator getIterator(String key) throws PageException;
842         
843        /**
844         * @return directory of root template file
845         */
846        public abstract Resource getRootTemplateDirectory();
847        
848        /**
849         * @return Returns the startTime.
850         */
851        public abstract long getStartTime();
852        
853    
854        /**
855         * @return Returns the thread.
856         */
857        public abstract Thread getThread();
858        
859        /**
860         * specialised method for handlePageException with argument Exception or Throwable
861         * @param pe Page Exception
862         */
863        public abstract void handlePageException(PageException pe);
864        
865        /* *
866         * @param applicationFile
867         * @throws ServletException
868         */
869        //public abstract void includeOnRequestEnd(PageSource applicationFile) throws ServletException;
870        
871        /**
872         * ends a cfoutput block
873         */
874        public abstract void outputEnd();
875        
876        /**
877         * starts a cfoutput block
878         */
879        public abstract void outputStart();
880        
881    
882        /**
883         * remove the last PageSource
884         * @param alsoInclude 
885         */
886        public abstract void removeLastPageSource(boolean alsoInclude);
887        
888        /**
889         * puts a tag back to pool
890         * @param tag tags to puts back
891         * @throws PageException
892         */
893        public abstract void reuse(Tag tag) throws PageException;
894        
895        /**
896         * sets a excption
897         * @param t
898         * @return PageExcption
899         */
900        public abstract PageException setCatch(Throwable t);
901        
902        // FUTURE
903        //public abstract PageException getCatch();
904        
905        
906        /**
907         * sets state of cfoutput only
908         * @param enablecfoutputonly
909         */
910        public abstract void setCFOutputOnly(short enablecfoutputonly);
911        
912        /**
913         * sets the error page
914         * @param ep
915         */
916        public abstract void setErrorPage(ErrorPage ep);
917        
918        /**
919         * sets if inside a query tag single quote will be preserved (preserve single quote)
920         * @param psq sets preserve single quote for query
921         */
922        public abstract void setPsq(boolean psq);
923        
924        /**
925         * return throwed exception
926         * @throws PageException
927         */
928        public abstract void throwCatch() throws PageException;
929        
930        /**
931         * returns a tag from tag handler pool
932         * @param tagClass class to load from ta handler pool
933         * @return tag matching class
934         * @throws PageException
935         */ 
936        public abstract Tag use(Class tagClass) throws PageException;
937        
938        /**
939         * returns a tag from tag handler pool
940         * @param tagClassName
941         * @return matching tag
942         * @throws PageException
943         */
944        public abstract Tag use(String tagClassName) throws PageException;
945        
946        /**
947         * @return undefined scope, undefined scope is a placeholder for the scopecascading
948         */
949        public abstract Undefined us();
950        
951    
952        /**
953         * compile a CFML Template
954         * @param templatePath 
955         * @throws PageException 
956         * @deprecated use instead <code>compile(PageSource pageSource)</code>
957         */
958        public abstract void compile(String templatePath)throws PageException;
959        
960        /**
961         * compile a CFML Template
962         * @param pageSource 
963         * @throws PageException 
964         */
965        public abstract void compile(PageSource pageSource)throws PageException;
966        
967        /**
968         * init body of a tag
969         * @param bodyTag
970         * @param state
971         * @throws JspException
972         */
973        public abstract void initBody(BodyTag bodyTag, int state) throws JspException ;
974        
975        /**
976         * release body of a tag
977         * @param bodyTag
978         * @param state
979         */
980        public abstract void releaseBody(BodyTag bodyTag, int state);
981    
982        
983        
984        /**
985         * @param type
986         * @param name
987         * @param defaultValue
988         * @throws PageException 
989         */
990        public abstract void param(String type, String name, Object defaultValue) throws PageException;
991    
992        /**
993         * @param type
994         * @param name
995         * @param defaultValue
996         * @throws PageException 
997         */
998        public abstract void param(String type, String name, Object defaultValue, String pattern) throws PageException;
999        /**
1000         * @param type
1001         * @param name
1002         * @param defaultValue
1003         * @throws PageException 
1004         */
1005        public abstract void param(String type, String name, Object defaultValue, double min, double max) throws PageException;
1006        
1007        //public abstract PageContext clonePageContext();
1008        
1009        public abstract boolean isCFCRequest();
1010        
1011    
1012            public abstract DataSourceManager getDataSourceManager();
1013    
1014            public abstract CFMLFactory getCFMLFactory();
1015            
1016            public abstract PageContext getParentPageContext();
1017    
1018            public abstract Threads getThreadScope(String name);
1019            //FUTURE public abstract Threads getThreadScope(Collection.Key name,Threads defaultValue);
1020            
1021            /**
1022             * set a thread to the context
1023             * @param name
1024             * @param t
1025             */
1026            public abstract void setThreadScope(String name,Threads t);
1027            //FUTURE public abstract void setThreadScope(Collection.Key name,Threads t);
1028    
1029            /**
1030             * @return return a Array with names off all threads running.
1031             */
1032            public abstract String[] getThreadScopeNames();
1033            
1034            public abstract boolean hasFamily();
1035            
1036            public abstract Component loadComponent(String compPath) throws PageException;
1037    
1038            //public abstract void setActiveComponent(Component component);
1039    
1040        /**
1041         * @return Returns the active Component.
1042         */
1043        public abstract Component getActiveComponent();
1044    
1045            public abstract UDF getActiveUDF();
1046    
1047            public abstract TimeZone getTimeZone();
1048    
1049            public abstract void setTimeZone(TimeZone timeZone);
1050    
1051    
1052    }