001 package railo.runtime.type.scope; 002 003 import railo.runtime.PageContext; 004 import railo.runtime.type.Struct; 005 006 /** 007 * abstract class for all scopes 008 */ 009 public interface Scope extends Struct { 010 011 /** 012 * Scope Undefined 013 */ 014 public static final int SCOPE_UNDEFINED=0; 015 /** 016 * Scope Variables 017 */ 018 public static final int SCOPE_VARIABLES=1; 019 /** 020 * Scope Request 021 */ 022 public static final int SCOPE_REQUEST=2; 023 /** 024 * Scope URL 025 */ 026 public static final int SCOPE_URL=3; 027 /** 028 * Scope Form 029 */ 030 public static final int SCOPE_FORM=4; 031 /** 032 * Scope Client 033 */ 034 public static final int SCOPE_CLIENT=5; 035 /** 036 * Scope Cookie 037 */ 038 public static final int SCOPE_COOKIE=6; 039 /** 040 * Scope Session 041 */ 042 public static final int SCOPE_SESSION=7; 043 /** 044 * Scope Application 045 */ 046 public static final int SCOPE_APPLICATION=8; 047 /** 048 * Scope Arguments 049 */ 050 public static final int SCOPE_ARGUMENTS=9; 051 /** 052 * Scope CGI 053 */ 054 public static final int SCOPE_CGI=10; 055 /** 056 * Scope Server 057 */ 058 public static final int SCOPE_SERVER=11; 059 060 /** 061 * Scope Local 062 */ 063 public static final int SCOPE_LOCAL=12; 064 065 /** 066 * Scope Caller 067 */ 068 public static final int SCOPE_CALLER=13; 069 070 public static final int SCOPE_CLUSTER=14; 071 072 073 public static final int SCOPE_VAR=15; 074 public static final int SCOPE_COUNT=16; 075 076 077 078 079 /** 080 * return if the scope is Initialiesd 081 * @return scope is init 082 */ 083 public boolean isInitalized(); 084 085 /** 086 * Initalize Scope 087 * @param pc Page Context 088 */ 089 public void initialize(PageContext pc); 090 091 /** 092 * release scope for reuse 093 * @deprecated use instead <code>release(PageContext)</code> 094 */ 095 public void release(); 096 097 /** 098 * release scope for reuse 099 */ 100 public void release(PageContext pc); 101 102 /** 103 * @return return the scope type (SCOPE_SERVER, SCOPE_SESSION usw.) 104 */ 105 public int getType(); 106 107 /** 108 * @return return the scope type as a String (server,session usw.) 109 */ 110 public String getTypeAsString(); 111 112 }