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