Changeset 823
- Timestamp:
- 07/31/07 05:40:42 (6 years ago)
- Location:
- coldbox/trunk/src/system
- Files:
-
- 23 modified
-
beans/cacheConfigBean.cfc (modified) (1 diff)
-
beans/configBean.cfc (modified) (3 diffs)
-
beans/datasourceBean.cfc (modified) (11 diffs)
-
beans/eventhandlerBean.cfc (modified) (7 diffs)
-
beans/exceptionBean.cfc (modified) (23 diffs)
-
beans/mailsettingsBean.cfc (modified) (9 diffs)
-
beans/requestContext.cfc (modified) (19 diffs)
-
cache/cacheManager.cfc (modified) (10 diffs)
-
cache/objectPool.cfc (modified) (10 diffs)
-
config/readme.txt (modified) (1 diff)
-
config/settings.xml (modified) (1 diff)
-
controller.cfc (modified) (6 diffs)
-
extras/baseTest.cfc (modified) (1 diff)
-
plugin.cfc (modified) (8 diffs)
-
plugins/FileWriter.cfc (modified) (1 diff)
-
plugins/JavaLoader.cfc (modified) (1 diff)
-
plugins/StringBuffer.cfc (modified) (1 diff)
-
plugins/XMLParser.cfc (modified) (1 diff)
-
plugins/cfcViewer.cfc (modified) (2 diffs)
-
plugins/i18n.cfc (modified) (1 diff)
-
plugins/logger.cfc (modified) (1 diff)
-
plugins/zip.cfc (modified) (1 diff)
-
services/requestService.cfc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
coldbox/trunk/src/system/beans/cacheConfigBean.cfc
r674 r823 28 28 <cfscript> 29 29 variables.instance = structnew(); 30 variables.instance.CacheObjectDefaultTimeout = arguments.CacheObjectDefaultTimeout;31 variables.instance.CacheObjectDefaultLastAccessTimeout = arguments.CacheObjectDefaultLastAccessTimeout;32 variables.instance.CacheReapFrequency = arguments.CacheReapFrequency;33 variables.instance.CacheMaxObjects = arguments.CacheMaxObjects;34 variables.instance.CacheFreeMemoryPercentageThreshold = arguments.CacheFreeMemoryPercentageThreshold;30 instance.CacheObjectDefaultTimeout = arguments.CacheObjectDefaultTimeout; 31 instance.CacheObjectDefaultLastAccessTimeout = arguments.CacheObjectDefaultLastAccessTimeout; 32 instance.CacheReapFrequency = arguments.CacheReapFrequency; 33 instance.CacheMaxObjects = arguments.CacheMaxObjects; 34 instance.CacheFreeMemoryPercentageThreshold = arguments.CacheFreeMemoryPercentageThreshold; 35 35 return this; 36 36 </cfscript> -
coldbox/trunk/src/system/beans/configBean.cfc
r556 r823 49 49 <cfargument name="key" type="string" required="true"> 50 50 <cfif keyExists(arguments.key)> 51 <cfreturn Evaluate(" variables.configStruct.#arguments.key#")>51 <cfreturn Evaluate("configStruct.#arguments.key#")> 52 52 <cfelse> 53 53 <cfthrow message="Key not found in configStruct"> … … 61 61 <cfargument name="value" type="any" required="true"> 62 62 <cfscript> 63 " variables.configStruct.#arguments.key#" = arguments.value;63 "configStruct.#arguments.key#" = arguments.value; 64 64 </cfscript> 65 65 </cffunction> … … 69 69 <cffunction name="keyExists" access="public" returntype="any" output="false"> 70 70 <cfargument name="key" type="string" required="true"> 71 <cfreturn isDefined(" variables.configStruct.#arguments.key#")>71 <cfreturn isDefined("configStruct.#arguments.key#")> 72 72 </cffunction> 73 73 -
coldbox/trunk/src/system/beans/datasourceBean.cfc
r689 r823 19 19 <cfscript> 20 20 variables.instance = structnew(); 21 variables.instance.name = "";22 variables.instance.alias = "";23 variables.instance.dbtype = "";24 variables.instance.username = "";25 variables.instance.password = "" ;21 instance.name = ""; 22 instance.alias = ""; 23 instance.dbtype = ""; 24 instance.username = ""; 25 instance.password = "" ; 26 26 </cfscript> 27 27 … … 57 57 <cffunction name="setname" access="public" return="void" output="false" hint="Set name of the datasource, this maps to the Coldfusion datasource name"> 58 58 <cfargument name="name" type="string" required="true"> 59 <cfset variables.instance.name=arguments.name >59 <cfset instance.name=arguments.name > 60 60 </cffunction> 61 61 … … 63 63 64 64 <cffunction name="getname" access="public" return="string" output="false" hint="Get the name"> 65 <cfreturn variables.instance.name >65 <cfreturn instance.name > 66 66 </cffunction> 67 67 … … 70 70 <cffunction name="setalias" access="public" return="void" output="false" hint="Set alias of the datasource, this is used for reference to the structure."> 71 71 <cfargument name="alias" type="string" required="true"> 72 <cfset variables.instance.alias=arguments.alias >72 <cfset instance.alias=arguments.alias > 73 73 </cffunction> 74 74 … … 76 76 77 77 <cffunction name="getalias" access="public" return="string" output="false" hint="Get the alias"> 78 <cfreturn variables.instance.name >78 <cfreturn instance.name > 79 79 </cffunction> 80 80 … … 83 83 <cffunction name="setDBType" access="public" return="void" output="false" hint="Set DBType"> 84 84 <cfargument name="dbtype" type="string" required="true"> 85 <cfset variables.instance.dbtype=arguments.dbtype >85 <cfset instance.dbtype=arguments.dbtype > 86 86 </cffunction> 87 87 … … 89 89 90 90 <cffunction name="getDBType" access="public" return="string" output="false" hint="Get DBType"> 91 <cfreturn variables.instance.dbtype >91 <cfreturn instance.dbtype > 92 92 </cffunction> 93 93 … … 96 96 <cffunction name="setUsername" access="public" return="void" output="false" hint="Set Username"> 97 97 <cfargument name="Username" type="string" required="true"> 98 <cfset variables.instance.Username=arguments.Username >98 <cfset instance.Username=arguments.Username > 99 99 </cffunction> 100 100 … … 102 102 103 103 <cffunction name="getUsername" access="public" return="string" output="false" hint="Get Username"> 104 <cfreturn variables.instance.Username >104 <cfreturn instance.Username > 105 105 </cffunction> 106 106 … … 109 109 <cffunction name="setPassword" access="public" return="void" output="false" hint="Set Password"> 110 110 <cfargument name="Password" type="string" required="true" > 111 <cfset variables.instance.Password=arguments.Password >111 <cfset instance.Password=arguments.Password > 112 112 </cffunction> 113 113 … … 115 115 116 116 <cffunction name="getPassword" access="public" return="string" output="false" hint="Get Password"> 117 <cfreturn variables.instance.Password >117 <cfreturn instance.Password > 118 118 </cffunction> 119 119 -
coldbox/trunk/src/system/beans/eventhandlerBean.cfc
r674 r823 20 20 <cfscript> 21 21 variables.instance = structnew(); 22 variables.instance.invocationPath = "";23 variables.instance.handler = "";24 variables.instance.method = "";22 instance.invocationPath = ""; 23 instance.handler = ""; 24 instance.method = ""; 25 25 </cfscript> 26 26 … … 59 59 <cffunction name="setMethod" access="public" returntype="void" output="false"> 60 60 <cfargument name="method" type="string" required="true" /> 61 <cfset variables.instance.method = arguments.method>61 <cfset instance.method = arguments.method> 62 62 </cffunction> 63 63 … … 65 65 66 66 <cffunction name="getMethod" access="public" returntype="any" output="false"> 67 <cfreturn variables.instance.method >67 <cfreturn instance.method > 68 68 </cffunction> 69 69 … … 72 72 <cffunction name="setHandler" access="public" returntype="void" output="false"> 73 73 <cfargument name="handler" type="string" required="true" /> 74 <cfset variables.instance.handler = arguments.handler >74 <cfset instance.handler = arguments.handler > 75 75 </cffunction> 76 76 … … 78 78 79 79 <cffunction name="getHandler" access="public" returntype="any" output="false"> 80 <cfreturn variables.instance.handler >80 <cfreturn instance.handler > 81 81 </cffunction> 82 82 … … 85 85 <cffunction name="setInvocationPath" access="public" returntype="void" output="false"> 86 86 <cfargument name="InvocationPath" type="string" required="true" /> 87 <cfset variables.instance.InvocationPath = arguments.InvocationPath >87 <cfset instance.InvocationPath = arguments.InvocationPath > 88 88 </cffunction> 89 89 … … 91 91 92 92 <cffunction name="getInvocationPath" access="public" returntype="any" output="false"> 93 <cfreturn variables.instance.InvocationPath >93 <cfreturn instance.InvocationPath > 94 94 </cffunction> 95 95 -
coldbox/trunk/src/system/beans/exceptionBean.cfc
r806 r823 20 20 variables.instance = structnew(); 21 21 // CFMX Exception Structure ; 22 variables.instance.exceptionStruct = structnew();22 instance.exceptionStruct = structnew(); 23 23 // Exception Message ; 24 variables.instance.extramessage = "";24 instance.extramessage = ""; 25 25 // Exception ExtraInformation variable, could be anything. ; 26 variables.instance.extraInfo = "";26 instance.extraInfo = ""; 27 27 // Exception type, either application or framework ; 28 variables.instance.errorType = "application";28 instance.errorType = "application"; 29 29 // Null Declarations ; 30 30 variables.STRINGNULL = ""; … … 41 41 <!--- ************************************************************* ---> 42 42 <!--- Set instance for exception structure ---> 43 <cfset variables.instance.exceptionStruct = duplicate(arguments.errorStruct) />44 <cfif not isStruct( variables.instance.exceptionStruct)>45 <cfset variables.instance.exceptionStruct = structnew()>43 <cfset instance.exceptionStruct = duplicate(arguments.errorStruct) /> 44 <cfif not isStruct(instance.exceptionStruct)> 45 <cfset instance.exceptionStruct = structnew()> 46 46 </cfif> 47 47 <!--- Set extra exception messages ---> 48 <cfset variables.instance.extramessage = arguments.extramessage>49 <cfset variables.instance.extraInfo = arguments.extraInfo>48 <cfset instance.extramessage = arguments.extramessage> 49 <cfset instance.extraInfo = arguments.extraInfo> 50 50 <!--- Verify errorType ---> 51 51 <cfif not reFindnocase("^(application|framework)$",arguments.errorType)> 52 <cfset variables.instance.errorType = "application">53 <cfelse> 54 <cfset variables.instance.errorType = arguments.errorType>52 <cfset instance.errorType = "application"> 53 <cfelse> 54 <cfset instance.errorType = arguments.errorType> 55 55 </cfif> 56 56 <cfreturn this > … … 75 75 76 76 <cffunction name="getErrorType" access="public" returntype="string" output="false"> 77 <cfreturn variables.instance.errorType >77 <cfreturn instance.errorType > 78 78 </cffunction> 79 79 … … 81 81 82 82 <cffunction name="getExceptionStruct" access="public" returntype="struct" output="false"> 83 <cfreturn variables.instance.exceptionStruct >83 <cfreturn instance.exceptionStruct > 84 84 </cffunction> 85 85 … … 87 87 88 88 <cffunction name="getExtraMessage" access="public" returntype="string" output="false"> 89 <cfreturn variables.instance.extramessage >89 <cfreturn instance.extramessage > 90 90 </cffunction> 91 91 … … 93 93 94 94 <cffunction name="getExtraInfo" access="public" returntype="any" output="false"> 95 <cfreturn variables.instance.extraInfo >95 <cfreturn instance.extraInfo > 96 96 </cffunction> 97 97 … … 99 99 100 100 <cffunction name="getType" access="public" returntype="string" output="false"> 101 <cfif structKeyExists( variables.instance.exceptionStruct, "Type")>102 <cfreturn variables.instance.exceptionStruct.type >101 <cfif structKeyExists(instance.exceptionStruct, "Type")> 102 <cfreturn instance.exceptionStruct.type > 103 103 <cfelse> 104 104 <cfreturn variables.STRINGNULL> … … 109 109 110 110 <cffunction name="getMessage" access="public" returntype="string" output="false"> 111 <cfif structkeyExists( variables.instance.exceptionStruct,"message")>112 <cfreturn variables.instance.exceptionStruct.message >111 <cfif structkeyExists(instance.exceptionStruct,"message")> 112 <cfreturn instance.exceptionStruct.message > 113 113 <cfelse> 114 114 <cfreturn variables.STRINGNULL> … … 119 119 120 120 <cffunction name="getDetail" access="public" returntype="string" output="false"> 121 <cfif structkeyExists( variables.instance.exceptionStruct,"detail")>122 <cfreturn variables.instance.exceptionStruct.detail >121 <cfif structkeyExists(instance.exceptionStruct,"detail")> 122 <cfreturn instance.exceptionStruct.detail > 123 123 <cfelse> 124 124 <cfreturn variables.STRINGNULL> … … 129 129 130 130 <cffunction name="getStackTrace" access="public" returntype="string" output="false"> 131 <cfif structKeyExists( variables.instance.exceptionStruct, 'StackTrace')>132 <cfreturn variables.instance.exceptionStruct.StackTrace >131 <cfif structKeyExists(instance.exceptionStruct, 'StackTrace')> 132 <cfreturn instance.exceptionStruct.StackTrace > 133 133 <cfelse> 134 134 <cfreturn variables.STRINGNULL> … … 139 139 140 140 <cffunction name="getTagContext" access="public" returntype="array" output="false"> 141 <cfif structkeyExists( variables.instance.exceptionStruct, "TagContext")>142 <cfreturn variables.instance.exceptionStruct.tagContext >141 <cfif structkeyExists(instance.exceptionStruct, "TagContext")> 142 <cfreturn instance.exceptionStruct.tagContext > 143 143 <cfelse> 144 144 <cfreturn variables.ARRAYNULL> … … 153 153 <cfset var i = 1> 154 154 <cfset var entry = ""> 155 <cfif structkeyExists( variables.instance.exceptionStruct, "TagContext") and ArrayLen(variables.instance.exceptionStruct.TagContext)>155 <cfif structkeyExists(instance.exceptionStruct, "TagContext") and ArrayLen(instance.exceptionStruct.TagContext)> 156 156 <cfloop from="1" to="#arrayLen(arrayTagContext)#" index="i"> 157 157 <cfsavecontent variable="entry"><cfoutput>ID: <cfif not structKeyExists(arrayTagContext[i], "ID")>N/A<cfelse>#arrayTagContext[i].ID#</cfif>; LINE: #arrayTagContext[i].LINE#; TEMPLATE: #arrayTagContext[i].Template# #chr(13)#</cfoutput></cfsavecontent> … … 167 167 168 168 <cffunction name="getNativeErrorCode" access="public" returntype="string" output="false"> 169 <cfif StructKeyExists( variables.instance.exceptionStruct,'nativeErrorCode')>170 <cfreturn variables.instance.exceptionStruct.nativeErrorCode >169 <cfif StructKeyExists(instance.exceptionStruct,'nativeErrorCode')> 170 <cfreturn instance.exceptionStruct.nativeErrorCode > 171 171 <cfelse> 172 172 <cfreturn variables.STRINGNULL> … … 178 178 <!--- ************************************************************* ---> 179 179 <cffunction name="getSqlState" access="public" returntype="string" output="false"> 180 <cfif StructKeyExists( variables.instance.exceptionStruct,'sqlState')>181 <cfreturn variables.instance.exceptionStruct.sqlState >180 <cfif StructKeyExists(instance.exceptionStruct,'sqlState')> 181 <cfreturn instance.exceptionStruct.sqlState > 182 182 <cfelse> 183 183 <cfreturn variables.STRINGNULL> … … 188 188 189 189 <cffunction name="getSql" access="public" returntype="string" output="false"> 190 <cfif StructKeyExists( variables.instance.exceptionStruct,'sql')>191 <cfreturn variables.instance.exceptionStruct.sql >190 <cfif StructKeyExists(instance.exceptionStruct,'sql')> 191 <cfreturn instance.exceptionStruct.sql > 192 192 <cfelse> 193 193 <cfreturn variables.STRINGNULL> … … 198 198 199 199 <cffunction name="getQueryError" access="public" returntype="string" output="false"> 200 <cfif StructKeyExists( variables.instance.exceptionStruct,'queryError')>201 <cfreturn variables.instance.exceptionStruct.queryError >200 <cfif StructKeyExists(instance.exceptionStruct,'queryError')> 201 <cfreturn instance.exceptionStruct.queryError > 202 202 <cfelse> 203 203 <cfreturn variables.STRINGNULL> … … 208 208 209 209 <cffunction name="getWhere" access="public" returntype="string" output="false"> 210 <cfif StructKeyExists( variables.instance.exceptionStruct,'where')>211 <cfreturn variables.instance.exceptionStruct.where >210 <cfif StructKeyExists(instance.exceptionStruct,'where')> 211 <cfreturn instance.exceptionStruct.where > 212 212 <cfelse> 213 213 <cfreturn variables.STRINGNULL> … … 218 218 219 219 <cffunction name="getErrNumber" access="public" returntype="string" output="false"> 220 <cfif StructKeyExists( variables.instance.exceptionStruct,'errNumber')>221 <cfreturn variables.instance.exceptionStruct.errNumber >220 <cfif StructKeyExists(instance.exceptionStruct,'errNumber')> 221 <cfreturn instance.exceptionStruct.errNumber > 222 222 <cfelse> 223 223 <cfreturn variables.STRINGNULL> … … 228 228 229 229 <cffunction name="getMissingFileName" access="public" returntype="string" output="false"> 230 <cfif StructKeyExists( variables.instance.exceptionStruct,'missingFileName')>231 <cfreturn variables.instance.exceptionStruct.missingFileName >230 <cfif StructKeyExists(instance.exceptionStruct,'missingFileName')> 231 <cfreturn instance.exceptionStruct.missingFileName > 232 232 <cfelse> 233 233 <cfreturn variables.STRINGNULL> … … 238 238 239 239 <cffunction name="getLockName" access="public" returntype="string" output="false"> 240 <cfif StructKeyExists( variables.instance.exceptionStruct,'lockName')>241 <cfreturn variables.instance.exceptionStruct.lockName >240 <cfif StructKeyExists(instance.exceptionStruct,'lockName')> 241 <cfreturn instance.exceptionStruct.lockName > 242 242 <cfelse> 243 243 <cfreturn variables.STRINGNULL> … … 248 248 249 249 <cffunction name="getLockOperation" access="public" returntype="string" output="false"> 250 <cfif StructKeyExists( variables.instance.exceptionStruct,'lockOperation')>251 <cfreturn variables.instance.exceptionStruct.lockOperation >250 <cfif StructKeyExists(instance.exceptionStruct,'lockOperation')> 251 <cfreturn instance.exceptionStruct.lockOperation > 252 252 <cfelse> 253 253 <cfreturn variables.STRINGNULL> … … 258 258 259 259 <cffunction name="getErrorCode" access="public" returntype="string" output="false"> 260 <cfif StructKeyExists( variables.instance.exceptionStruct,'errorCode')>261 <cfreturn variables.instance.exceptionStruct.errorCode >260 <cfif StructKeyExists(instance.exceptionStruct,'errorCode')> 261 <cfreturn instance.exceptionStruct.errorCode > 262 262 <cfelse> 263 263 <cfreturn variables.STRINGNULL> … … 268 268 269 269 <cffunction name="getExtendedInfo" access="public" returntype="string" output="false"> 270 <cfif StructKeyExists( variables.instance.exceptionStruct,'extendedInfo')>271 <cfreturn variables.instance.exceptionStruct.extendedInfo >270 <cfif StructKeyExists(instance.exceptionStruct,'extendedInfo')> 271 <cfreturn instance.exceptionStruct.extendedInfo > 272 272 <cfelse> 273 273 <cfreturn variables.STRINGNULL> -
coldbox/trunk/src/system/beans/mailsettingsBean.cfc
r674 r823 22 22 <cfscript> 23 23 variables.instance = structnew(); 24 variables.instance.server = "";25 variables.instance.username = "";26 variables.instance.password = "" ;27 variables.instance.port = "";24 instance.server = ""; 25 instance.username = ""; 26 instance.password = "" ; 27 instance.port = ""; 28 28 </cfscript> 29 29 … … 65 65 <cffunction name="setserver" access="public" return="void" output="false" hint="Set server"> 66 66 <cfargument name="server" type="string" > 67 <cfset variables.instance.server=arguments.server >67 <cfset instance.server=arguments.server > 68 68 </cffunction> 69 69 … … 71 71 72 72 <cffunction name="getserver" access="public" return="string" output="false" hint="Get server"> 73 <cfreturn variables.instance.server >73 <cfreturn instance.server > 74 74 </cffunction> 75 75 … … 78 78 <cffunction name="setport" access="public" return="void" output="false" hint="Set port"> 79 79 <cfargument name="port" type="string" > 80 <cfset variables.instance.port=arguments.port >80 <cfset instance.port=arguments.port > 81 81 </cffunction> 82 82 … … 84 84 85 85 <cffunction name="getport" access="public" return="string" output="false" hint="Get port"> 86 <cfreturn variables.instance.port >86 <cfreturn instance.port > 87 87 </cffunction> 88 88 … … 91 91 <cffunction name="setUsername" access="public" return="void" output="false" hint="Set Username"> 92 92 <cfargument name="Username" type="string" > 93 <cfset variables.instance.Username=arguments.Username >93 <cfset instance.Username=arguments.Username > 94 94 </cffunction> 95 95 … … 97 97 98 98 <cffunction name="getUsername" access="public" return="string" output="false" hint="Get Username"> 99 <cfreturn variables.instance.Username >99 <cfreturn instance.Username > 100 100 </cffunction> 101 101 … … 104 104 <cffunction name="setPassword" access="public" return="void" output="false" hint="Set Password"> 105 105 <cfargument name="Password" type="string" > 106 <cfset variables.instance.Password=arguments.Password >106 <cfset instance.Password=arguments.Password > 107 107 </cffunction> 108 108 … … 110 110 111 111 <cffunction name="getPassword" access="public" return="string" output="false" hint="Get Password"> 112 <cfreturn variables.instance.Password >112 <cfreturn instance.Password > 113 113 </cffunction> 114 114 -
coldbox/trunk/src/system/beans/requestContext.cfc
r815 r823 20 20 21 21 <cfscript> 22 variables.context = structnew(); 23 variables.defaultLayout = ""; 24 variables.defaultView = ""; 25 variables.ViewLayouts = ""; 26 variables.eventName = ""; 22 variables.instance = structnew(); 23 instance.context = structnew(); 24 instance.defaultLayout = ""; 25 instance.defaultView = ""; 26 instance.ViewLayouts = ""; 27 instance.eventName = ""; 27 28 </cfscript> 28 29 … … 53 54 <cfscript> 54 55 if ( arguments.DeepCopyFlag ) 55 return duplicate( variables.context);56 return duplicate(instance.context); 56 57 else 57 return variables.context;58 return instance.context; 58 59 </cfscript> 59 60 </cffunction> … … 63 64 <cffunction name="setCollection" access="public" returntype="void" output="false" hint="Overwrite the collection with another collection"> 64 65 <cfargument name="collection" type="struct" required="true"> 65 <cfset variables.context = arguments.collection>66 <cfset instance.context = arguments.collection> 66 67 </cffunction> 67 68 … … 69 70 70 71 <cffunction name="clearCollection" access="public" returntype="void" output="false" hint="Clear the entire collection"> 71 <cfset structClear( variables.context)>72 <cfset structClear(instance.context)> 72 73 </cffunction> 73 74 … … 77 78 <cfargument name="collection" type="struct" required="true"> 78 79 <cfargument name="overwrite" type="boolean" required="false" default="false" hint="If you need to override data in the collection, set this to true."> 79 <cfset structAppend( variables.context,arguments.collection, arguments.overwrite)>80 <cfset structAppend(instance.context,arguments.collection, arguments.overwrite)> 80 81 </cffunction> 81 82 … … 83 84 84 85 <cffunction name="getSize" access="public" returntype="numeric" output="false" hint="The number of elements in the collection"> 85 <cfreturn structCount( variables.context)>86 <cfreturn structCount(instance.context)> 86 87 </cffunction> 87 88 … … 97 98 <!--- ************************************************************* ---> 98 99 <cfscript> 99 if ( isDefined(" variables.context.#arguments.name#") ){100 return Evaluate(" variables.context.#arguments.name#");100 if ( isDefined("instance.context.#arguments.name#") ){ 101 return Evaluate("instance.context.#arguments.name#"); 101 102 } 102 103 else if ( isSimpleValue(arguments.defaultValue) and arguments.defaultValue eq "NONE" ) … … 126 127 <!--- ************************************************************* ---> 127 128 <cfscript> 128 " variables.context.#arguments.name#" = arguments.value;129 "instance.context.#arguments.name#" = arguments.value; 129 130 </cfscript> 130 131 </cffunction> … … 136 137 <!--- ************************************************************* ---> 137 138 <cfscript> 138 structDelete( variables.context,"#arguments.name#");139 structDelete(instance.context,"#arguments.name#"); 139 140 </cfscript> 140 141 </cffunction> … … 146 147 <!--- ************************************************************* ---> 147 148 <cfscript> 148 return isDefined(" variables.context.#arguments.name#");149 return isDefined("instance.context.#arguments.name#"); 149 150 </cfscript> 150 151 </cffunction> … … 181 182 if ( not arguments.nolayout ){ 182 183 if ( not getValue("layoutoverride",false) ){ 183 if ( StructKeyExists( variables.ViewLayouts, arguments.name) )184 setValue("currentLayout", variables.ViewLayouts[arguments.name]);184 if ( StructKeyExists(instance.ViewLayouts, arguments.name) ) 185 setValue("currentLayout",instance.ViewLayouts[arguments.name]); 185 186 else 186 setValue("currentLayout", variables.DefaultLayout);187 setValue("currentLayout", instance.defaultLayout); 187 188 } 188 189 } … … 240 241 241 242 <cffunction name="getDefaultLayout" access="public" returntype="string" output="false"> 242 <cfreturn variables.DefaultLayout>243 <cfreturn instance.defaultLayout> 243 244 </cffunction> 244 245 … … 247 248 <cffunction name="setDefaultLayout" access="public" returntype="void" output="false"> 248 249 <cfargument name="DefaultLayout" type="string" required="true"> 249 <cfset variables.DefaultLayout = arguments.DefaultLayout>250 <cfset instance.defaultLayout = arguments.DefaultLayout> 250 251 </cffunction> 251 252 … … 253 254 254 255 <cffunction name="getDefaultView" access="public" returntype="string" output="false"> 255 <cfreturn variables.DefaultView>256 <cfreturn instance.defaultView> 256 257 </cffunction> 257 258 … … 260 261 <cffunction name="setDefaultView" access="public" returntype="void" output="false"> 261 262 <cfargument name="DefaultView" type="string" required="true"> 262 <cfset variables.DefaultView = arguments.DefaultView>263 <cfset instance.defaultView = arguments.DefaultView> 263 264 </cffunction> 264 265 … … 266 267 267 268 <cffunction name="getViewLayouts" access="public" returntype="struct" output="false"> 268 <cfreturn variables.ViewLayouts>269 <cfreturn instance.ViewLayouts> 269 270 </cffunction> 270 271 … … 273 274 <cffunction name="setViewLayouts" access="public" returntype="void" output="false"> 274 275 <cfargument name="ViewLayouts" type="struct" required="true"> 275 <cfset variables.ViewLayouts = arguments.ViewLayouts>276 <cfset instance.ViewLayouts = arguments.ViewLayouts> 276 277 </cffunction> 277 278 … … 279 280 280 281 <cffunction name="getEventName" access="public" returntype="string" output="false"> 281 <cfreturn variables.EventName>282 <cfreturn instance.eventName> 282 283 </cffunction> 283 284 … … 286 287 <cffunction name="setEventName" access="public" returntype="void" output="false"> 287 288 <cfargument name="EventName" type="string" required="true"> 288 <cfset variables.EventName = arguments.EventName>289 <cfset instance.eventName = arguments.EventName> 289 290 </cffunction> 290 291 -
coldbox/trunk/src/system/cache/cacheManager.cfc
r765 r823 21 21 <cfargument name="controller" type="any" required="true"> 22 22 <cfscript> 23 //Set Controller Injection 24 variables.controller = arguments.controller; 25 //Cache Configuration 26 variables.CacheConfigBean = structnew(); 27 //Object Pool 28 variables.objectPool = structnew(); 29 //Cache Performance 30 variables.cachePerformance = structNew(); 31 variables.cachePerformance.Hits = 0; 32 variables.cachePerformance.Misses = 0; 33 //Reaping Controll 34 variables.lastReapDatetime = now(); 35 //Runtime Java object 36 variables.javaRuntime = CreateObject("java", "java.lang.Runtime"); 37 //Lock Name 38 variables.lockName = getController().getAppHash() & "_OCM_OPERATION"; 39 //Init the object Pool on instantiation 40 initPool(); 41 //return Cache Manager reference; 42 return this; 23 variables.instance = structnew(); 24 //Set Controller Injection 25 instance.controller = arguments.controller; 26 //Cache Configuration 27 instance.CacheConfigBean = structnew(); 28 //Object Pool 29 instance.objectPool = structnew(); 30 //Cache Performance 31 instance.cachePerformance = structNew(); 32 instance.cachePerformance.Hits = 0; 33 instance.cachePerformance.Misses = 0; 34 //Reaping Controll 35 instance.lastReapDatetime = now(); 36 //Runtime Java object 37 instance.javaRuntime = CreateObject("java", "java.lang.Runtime"); 38 //Lock Name 39 instance.lockName = getController().getAppHash() & "_OCM_OPERATION"; 40 //Init the object Pool on instantiation 41 initPool(); 42 //return Cache Manager reference; 43 return this; 43 44 </cfscript> 44 45 </cffunction> … … 282 283 <cffunction name="getlastReapDatetime" access="public" output="false" returntype="string" hint="Get the lastReapDatetime"> 283 284 <cfscript> 284 return variables.lastReapDatetime;285 return instance.lastReapDatetime; 285 286 </cfscript> 286 287 </cffunction> 287 288 <cffunction name="setlastReapDatetime" access="public" returntype="void" output="false" hint="Set the lastReapDatetime"> 288 289 <cfargument name="lastReapDatetime" type="string" required="true"> 289 <cfset variables.lastReapDatetime = arguments.lastReapDatetime>290 <cfset instance.lastReapDatetime = arguments.lastReapDatetime> 290 291 </cffunction> 291 292 … … 294 295 <cffunction name="getcachePerformance" access="public" output="false" returntype="struct" hint="Get the cachePerformance structure"> 295 296 <cfscript> 296 return variables.cachePerformance;297 return instance.cachePerformance; 297 298 </cfscript> 298 299 </cffunction> … … 302 303 <cffunction name="setCacheConfigBean" access="public" returntype="void" output="false"> 303 304 <cfargument name="CacheConfigBean" type="coldbox.system.beans.cacheConfigBean" required="true"> 304 <cfset variables.CacheConfigBean = arguments.CacheConfigBean>305 <cfset instance.CacheConfigBean = arguments.CacheConfigBean> 305 306 </cffunction> 306 307 <cffunction name="getCacheConfigBean" access="public" returntype="coldbox.system.beans.cacheConfigBean" output="false"> 307 <cfreturn variables.CacheConfigBean >308 <cfreturn instance.CacheConfigBean > 308 309 </cffunction> 309 310 … … 311 312 312 313 <cffunction name="getjavaRuntime" access="public" returntype="any" output="false" hint="Get the java runtime object."> 313 <cfreturn variables.javaRuntime>314 <cfreturn instance.javaRuntime> 314 315 </cffunction> 315 316 … … 317 318 318 319 <cffunction name="getcontroller" access="public" output="false" returntype="any" hint="Get controller"> 319 <cfreturn variables.controller/>320 <cfreturn instance.controller/> 320 321 </cffunction> 321 322 … … 324 325 <cffunction name="setcontroller" access="public" output="false" returntype="void" hint="Set controller"> 325 326 <cfargument name="controller" type="any" required="true"/> 326 <cfset variables.controller = arguments.controller/>327 <cfset instance.controller = arguments.controller/> 327 328 </cffunction> 328 329 … … 330 331 331 332 <cffunction name="getlockName" access="public" output="false" returntype="string" hint="Get lockName"> 332 <cfreturn variables.lockName/>333 <cfreturn instance.lockName/> 333 334 </cffunction> 334 335 … … 337 338 <cffunction name="setlockName" access="public" output="false" returntype="void" hint="Set lockName"> 338 339 <cfargument name="lockName" type="string" required="true"/> 339 <cfset variables.lockName = arguments.lockName/>340 <cfset instance.lockName = arguments.lockName/> 340 341 </cffunction> 341 342 … … 359 360 360 361 <cffunction name="getObjectPool" access="private" returntype="any" output="false" hint="Get the internal object pool"> 361 <cfreturn variables.objectPool >362 <cfreturn instance.objectPool > 362 363 </cffunction> 363 364 364 365 <cffunction name="initPool" access="private" output="false" returntype="void" hint="Initialize and set the internal object Pool"> 365 366 <cfscript> 366 variables.objectPool = CreateObject("component","objectPool").init();367 instance.objectPool = CreateObject("component","objectPool").init(); 367 368 </cfscript> 368 369 </cffunction> -
coldbox/trunk/src/system/cache/objectPool.cfc
r563 r823 19 19 <cffunction name="init" access="public" output="false" returntype="objectPool" hint="Constructor"> 20 20 <cfscript> 21 variables.pool = structnew(); 22 variables.pool_metadata = structnew(); 23 return this; 21 variables.instance = structnew(); 22 instance.pool = structnew(); 23 instance.pool_metadata = structnew(); 24 return this; 24 25 </cfscript> 25 26 </cffunction> … … 29 30 <!--- Getter/Setter For pool ---> 30 31 <cffunction name="getpool" access="public" returntype="struct" output="false"> 31 <cfreturn variables.pool >32 <cfreturn instance.pool > 32 33 </cffunction> 33 34 <cffunction name="setpool" access="public" returntype="void" output="false"> 34 35 <cfargument name="pool" type="struct" required="true"> 35 <cfset variables.pool = arguments.pool>36 <cfset instance.pool = arguments.pool> 36 37 </cffunction> 37 38 38 39 <!--- Getter/Setter for Pool Metdata ---> 39 40 <cffunction name="getpool_metadata" access="public" returntype="struct" output="false"> 40 <cfreturn variables.pool_metadata >41 <cfreturn instance.pool_metadata > 41 42 </cffunction> 42 43 <cffunction name="setpool_metadata" access="public" returntype="void" output="false"> 43 44 <cfargument name="pool_metadata" type="struct" required="true"> 44 <cfset variables.pool_metadata = arguments.pool_metadata>45 <cfset instance.pool_metadata = arguments.pool_metadata> 45 46 </cffunction> 46 47 … … 48 49 <cffunction name="getObjectMetadata" access="public" returntype="struct" output="false"> 49 50 <cfargument name="objectKey" type="string" required="true"> 50 <cfreturn variables.pool_metadata[arguments.objectKey] >51 <cfreturn instance.pool_metadata[arguments.objectKey] > 51 52 </cffunction> 52 53 <cffunction name="setObjectMetadata" access="public" returntype="void" output="false"> 53 54 <cfargument name="objectKey" type="string" required="true"> 54 55 <cfargument name="metadata" type="struct" required="true"> 55 <cfset variables.pool_metadata[arguments.objectKey] = arguments.metadata>56 <cfset instance.pool_metadata[arguments.objectKey] = arguments.metadata> 56 57 </cffunction> 57 58 <cffunction name="getMetadataProperty" access="public" returntype="any" output="false"> 58 59 <cfargument name="objectKey" type="string" required="true"> 59 60 <cfargument name="property" type="string" required="true"> 60 <cfreturn variables.pool_metadata[arguments.objectKey][arguments.property] >61 <cfreturn instance.pool_metadata[arguments.objectKey][arguments.property] > 61 62 </cffunction> 62 63 <cffunction name="setMetadataProperty" access="public" returntype="void" output="false"> … … 64 65 <cfargument name="property" type="string" required="true"> 65 66 <cfargument name="value" type="any" required="true"> 66 <cfset variables.pool_metadata[arguments.objectKey][arguments.property] = arguments.value >67 <cfset instance.pool_metadata[arguments.objectKey][arguments.property] = arguments.value > 67 68 </cffunction> 68 69 … … 73 74 <!--- ************************************************************* ---> 74 75 <!--- Check for Object in Cache. ---> 75 <cfreturn structKeyExists( variables.pool, arguments.objectKey) >76 <cfreturn structKeyExists(instance.pool, arguments.objectKey) > 76 77 </cffunction> 77 78 … … 86 87 setMetadataProperty(arguments.objectKey,"lastAccesed", now()); 87 88 //Return object. 88 return variables.pool[arguments.objectKey];89 return instance.pool[arguments.objectKey]; 89 90 </cfscript> 90 91 </cffunction> … … 100 101 var MetaData = structnew(); 101 102 //Set new Object into cache. 102 variables.pool[arguments.objectKey] = arguments.MyObject;103 instance.pool[arguments.objectKey] = arguments.MyObject; 103 104 //Create object's metdata 104 105 MetaData.hits = 1; … … 119 120 var Results = false; 120 121 try{ 121 structDelete( variables.pool,arguments.objectKey);122 structDelete( variables.pool_metadata,arguments.objectKey);122 structDelete(instance.pool,arguments.objectKey); 123 structDelete(instance.pool_metadata,arguments.objectKey); 123 124 Results = true; 124 125 } … … 133 134 <cffunction name="getSize" access="public" output="false" returntype="numeric" hint="Get the cache's size in items"> 134 135 <cfscript> 135 return StructCount( variables.pool);136 return StructCount(instance.pool); 136 137 </cfscript> 137 138 </cffunction> … … 140 141 <cffunction name="getObjectsKeyList" access="public" output="false" returntype="string" hint="Get the cache's object entries listing."> 141 142 <cfscript> 142 return structKeyList( variables.pool);143 return structKeyList(instance.pool); 143 144 </cfscript> 144 145 </cffunction> -
coldbox/trunk/src/system/config/readme.txt
r798 r823 333 333 be any file now: front.cfm, index.cfm, luis.cfm, anything.cfm 334 334 335 Version 2.0.3 ( July2007) CODENAME: Acts 5:29-32335 Version 2.0.3 (August 2007) CODENAME: Acts 5:29-32 336 336 - #169 Structure variable declarations in the config updated 337 - #17 0 ColdBox Settings support complex variables now, for internal use only.337 - #178 LightWire is now fully supported and included with ColdBox for out of the box IOC. Thanks to Aaron Roberson & Peter bell. 338 338 - #200 queryHelper new methods: getColumnArray(), getCountDistinct(), getRowNumber() 339 339 - #205 Critical Concurrency fix in the coldbox.cfm template. 340 340 - #206 Removal of client variable references. 341 - #207 clientstorage plugin syntax updated 342 - #208 sessionstorage plugin syntax updated 343 - #209 ColdBoxFactory.cfc updated with new method - getColdboxOCM(). To get a reference to the cache manager 344 from within coldspring. 345 - #210 Samples Gallery Content Updated. 346 - #211 Var scoping optimizations 347 - #212 Illidium Scaffolding Templates 348 - #213 Configuration file now named: coldbox.xml.cfm or config.xml.cfm 349 - #214 Testcontroller - When unit testing relocations, the setnext event will now save the event and querystring 350 in the request collection for assertions. 351 - #215 Performance Optimizations 352 - #217 Eclipse Dictionaries Updated 353 - #218 ColdBox Cheat Sheet Updated 354 - #219 JQuery updated to 1.1.3.1 341 355 342 356 AS ALWAYS, VISIT THE WIKI FOR THE LATEST DOCUMENTATION -
coldbox/trunk/src/system/config/settings.xml
r815 r823 30 30 <!--IOC Frameworks--> 31 31 <Setting name="ColdspringBeanFactory" value="coldspring.beans.DefaultXmlBeanFactory"/> 32 <Setting name="LightWireBeanFactory" value="coldbox.system.extras.lightwire.LightWire"/>32 <Setting name="LightWireBeanFactory" value="coldbox.system.extras.lightwire.LightWire"/> 33 33 <!--MessageBox Plugin Storage Scope (session|client)--> 34 34 <Setting name="MessageBoxStorage" value="session"/> -
coldbox/trunk/src/system/controller.cfc
r815 r823 15 15 <cfscript> 16 16 variables.instance = structnew(); 17 variables.instance.ColdboxInitiated = false;18 variables.instance.ConfigSettings = structnew();19 variables.instance.ColdboxSettings = structnew();20 variables.instance.AppStartHandlerFired = false;21 variables.instance.AppHash = "";17 instance.ColdboxInitiated = false; 18 instance.ConfigSettings = structnew(); 19 instance.ColdboxSettings = structnew(); 20 instance.AppStartHandlerFired = false; 21 instance.AppHash = ""; 22 22 //Services & Managers 23 variables.instance.ColdboxOCM = structNew();24 variables.instance.DebuggerService = structNew();25 variables.instance.RequestService = structNew();23 instance.ColdboxOCM = structNew(); 24 instance.DebuggerService = structNew(); 25 instance.RequestService = structNew(); 26 26 </cfscript> 27 27 … … 259 259 </cfif> 260 260 261 <!--- Validate and Get registered handler ---> 262 <cfset oEventBean = getRegisteredHandler(arguments.event)> 263 <!--- Set Executing Parameters ---> 264 <cfset ExecutingHandler = oEventBean.getRunnable()> 265 <cfset ExecutingMethod = oEventBean.getMethod()> 266 267 <!--- Check if using handler caching ---> 268 <cfif getSetting("HandlerCaching")> 269 270 <!--- Lookup in Cache ---> 271 <cfif instance.ColdboxOCM.lookup("handler_" & ExecutingHandler)> 272 <cfset oEventHandler = instance.ColdboxOCM.get("handler_" & ExecutingHandler)> 273 <cfelse> 274 <cfset oEventHandler = CreateObject("component",ExecutingHandler).init(this)> 275 <!--- Get Object MetaData ---> 276 <cfset MetaData = getMetaData(oEventHandler)> 277 <!--- By Default, handlers with no cache flag are set to true ---> 278 <cfif not structKeyExists(MetaData,"cache")> 279 <cfset MetaData.cache = true> 261 <!--- Validate and Get registered handler ---> 262 <cfset oEventBean = getRegisteredHandler(arguments.event)> 263 <!--- Set Executing Parameters ---> 264 <cfset ExecutingHandler = oEventBean.getRunnable()> 265 <cfset ExecutingMethod = oEventBean.getMethod()> 266 267 <!--- Check if using handler caching ---> 268 <cfif getSetting("HandlerCaching")> 269 270 <!--- Lookup in Cache ---> 271 <cfif instance.ColdboxOCM.lookup("handler_" & ExecutingHandler)> 272 <cfset oEventHandler = instance.ColdboxOCM.get("handler_" & ExecutingHandler)> 273 <cfelse> 274 <cfset oEventHandler = CreateObject("component",ExecutingHandler).init(this)> 275 <!--- Get Object MetaData ---> 276 <cfset MetaData = getMetaData(oEventHandler)> 277 <!--- By Default, handlers with no cache flag are set to true ---> 278 <cfif not structKeyExists(MetaData,"cache")> 279 <cfset MetaData.cache = true> 280 </cfif> 281 <cfif isBoolean(MetaData["cache"]) and MetaData["cache"]> 282 <cfif structKeyExists(MetaData,"cachetimeout") > 283 <cfset objTimeout = MetaData["cachetimeout"]> 280 284 </cfif> 281 <cfif isBoolean(MetaData["cache"]) and MetaData["cache"]> 282 <cfif structKeyExists(MetaData,"cachetimeout") > 283 <cfset objTimeout = MetaData["cachetimeout"]> 284 </cfif> 285 <!--- Set the Runnable Object ---> 286 <cfset instance.ColdboxOCM.set("handler_" & ExecutingHandler,oEventHandler,objTimeout)> 287 </cfif> 288 </cfif> 289 <cfelse> 290 <!--- Create Runnable Object ---> 291 <cfset oEventHandler = CreateObject("component",ExecutingHandler).init(this)> 292 </cfif> 293 294 <!--- Verify Event Method Exists ---> 295 <cfif not structKeyExists(oEventHandler,ExecutingMethod)> 296 <!--- Invalid Event Detected, log it ---> 297 <cfset getPlugin("logger").logEntry("error","Invalid Event detected: #ExecutingHandler#.#ExecutingMethod#")> 298 <cfif getSetting("onInvalidEvent") neq ""> 299 <!--- Test for invalid Event Error ---> 300 <cfif compareNoCase(getSetting("onInvalidEvent"),arguments.event) eq 0> 301 <cfthrow type="Framework.onInValidEventSettingException" message="An invalid event has been detected: #RequestContext.getValue("invalidevent","")# and the onInvalidEvent setting is also invalid: #getSetting("onInvalidEvent")#. Please check your settings."> 302 </cfif> 303 <!--- Relocate to Invalid Event ---> 304 <cfset setNextEvent(getSetting("onInvalidEvent"),"invalidevent=#ExecutingHandler#.#ExecutingMethod#")> 305 <cfelse> 306 <cfthrow type="Framework.InvalidEventException" message="An invalid event has been detected: #ExecutingHandler#.#ExecutingMethod#. This event does not exist in the specified handler controller."> 285 <!--- Set the Runnable Object ---> 286 <cfset instance.ColdboxOCM.set("handler_" & ExecutingHandler,oEventHandler,objTimeout)> 307 287 </cfif> 308 288 </cfif> 309 310 <!--- PreHandler Execution ---> 311 <cfif not arguments.prepostExempt and structKeyExists(oEventHandler,"preHandler")> 312 <cfmodule template="includes/timer.cfm" timertag="invoking runEvent [preHandler] for #arguments.event#"> 313 <cfset oEventHandler.preHandler(RequestContext)> 314 </cfmodule> 289 <cfelse> 290 <!--- Create Runnable Object ---> 291 <cfset oEventHandler = CreateObject("component",ExecutingHandler).init(this)> 292 </cfif> 293 294 <!--- Verify Event Method Exists ---> 295 <cfif not structKeyExists(oEventHandler,ExecutingMethod)> 296 <!--- Invalid Event Detected, log it ---> 297 <cfset getPlugin("logger").logEntry("error","Invalid Event detected: #ExecutingHandler#.#ExecutingMethod#")> 298 <cfif getSetting("onInvalidEvent") neq ""> 299 <!--- Test for invalid Event Error ---> 300 <cfif compareNoCase(getSetting("onInvalidEvent"),arguments.event) eq 0> 301 <cfthrow type="Framework.onInValidEventSettingException" message="An invalid event has been detected: #RequestContext.getValue("invalidevent","")# and the onInvalidEvent setting is also invalid: #getSetting("onInvalidEvent")#. Please check your settings."> 302 </cfif> 303 <!--- Relocate to Invalid Event ---> 304 <cfset setNextEvent(getSetting("onInvalidEvent"),"invalidevent=#ExecutingHandler#.#ExecutingMethod#")> 305 <cfelse> 306 <cfthrow type="Framework.InvalidEventException" message="An invalid event has been detected: #ExecutingHandler#.#ExecutingMethod#. This event does not exist in the specified handler controller."> 315 307 </cfif> 316 317 <!--- Start Timer ---> 318 <cfmodule template="includes/timer.cfm" timertag="invoking runEvent [#arguments.event#]"> 319 <!--- Execute the Event ---> 320 <cfinvoke component="#oEventHandler#" method="#ExecutingMethod#"> 321 <cfinvokeargument name="event" value="#RequestContext#"> 322 </cfinvoke> 308 </cfif> 309 310 <!--- PreHandler Execution ---> 311 <cfif not arguments.prepostExempt and structKeyExists(oEventHandler,"preHandler")> 312 <cfmodule template="includes/timer.cfm" timertag="invoking runEvent [preHandler] for #arguments.event#"> 313 <cfset oEventHandler.preHandler(RequestContext)> 323 314 </cfmodule> 324 325 <!--- PostHandler Execution ---> 326 <cfif not arguments.prepostExempt and structKeyExists(oEventHandler,"postHandler")> 327 <cfmodule template="includes/timer.cfm" timertag="invoking runEvent [postHandler] for #arguments.event#"> 328 <cfset oEventHandler.postHandler(RequestContext)> 329 </cfmodule> 330 </cfif> 331 315 </cfif> 316 317 <!--- Start Timer ---> 318 <cfmodule template="includes/timer.cfm" timertag="invoking runEvent [#arguments.event#]"> 319 <!--- Execute the Event ---> 320 <cfinvoke component="#oEventHandler#" method="#ExecutingMethod#"> 321 <cfinvokeargument name="event" value="#RequestContext#"> 322 </cfinvoke> 323 </cfmodule> 324 325 <!--- PostHandler Execution ---> 326 <cfif not arguments.prepostExempt and structKeyExists(oEventHandler,"postHandler")> 327 <cfmodule template="includes/timer.cfm" timertag="invoking runEvent [postHandler] for #arguments.event#"> 328 <cfset oEventHandler.postHandler(RequestContext)> 329 </cfmodule> 330 </cfif> 332 331 </cffunction> 333 332 … … 348 347 <!--- ************************************************************* ---> 349 348 <cfscript> 349 var incomingEvent = arguments.event; 350 350 var handlerIndex = 0; 351 351 var HandlerReceived = ""; … … 355 355 var HandlerBean = CreateObject("component","coldbox.system.beans.eventhandlerBean").init(getSetting("HandlersInvocationPath")); 356 356 //Rip the method 357 HandlerReceived = getPlugin("fileUtilities").ripExtension( arguments.event);358 MethodReceived = listLast( arguments.event,".");357 HandlerReceived = getPlugin("fileUtilities").ripExtension(incomingEvent); 358 MethodReceived = listLast(incomingEvent,"."); 359 359 360 360 //Check Registration … … 368 368 else if ( onInvalidEvent neq "" ){ 369 369 //Check if the invalid event is the same as the current event 370 if ( CompareNoCase(onInvalidEvent, arguments.event) eq 0){370 if ( CompareNoCase(onInvalidEvent,incomingEvent) eq 0){ 371 371 throw("The invalid event handler: #onInvalidEvent# is also invalid. Please check your settings","","Framework.InvalidEventHandlerException"); 372 372 } … … 380 380 } 381 381 else{ 382 throw("The event handler: # arguments.event# is not valid registered event.","","Framework.EventHandlerNotRegisteredException");382 throw("The event handler: #incomingEvent# is not valid registered event.","","Framework.EventHandlerNotRegisteredException"); 383 383 } 384 384 return HandlerBean; -
coldbox/trunk/src/system/extras/baseTest.cfc
r760 r823 32 32 <cfscript> 33 33 variables.instance = structnew(); 34 variables.instance.AppMapping = "";35 variables.instance.ConfigMapping = "";36 variables.instance.controller = "";34 instance.AppMapping = ""; 35 instance.ConfigMapping = ""; 36 instance.controller = ""; 37 37 </cfscript> 38 38 -
coldbox/trunk/src/system/plugin.cfc
r650 r823 26 26 variables.instance = structnew(); 27 27 //instance names 28 variables.instance.pluginName = "";29 variables.instance.pluginVersion = "";30 variables.instance.pluginDescription = "";31 variables.instance.pluginPath = getCurrentTemplatePath();28 instance.pluginName = ""; 29 instance.pluginVersion = ""; 30 instance.pluginDescription = ""; 31 instance.pluginPath = getCurrentTemplatePath(); 32 32 return this; 33 33 </cfscript> … … 39 39 40 40 <cffunction name="getPluginName" access="public" hint="Get the instance's pluginName" returntype="string" output="false"> 41 <cfreturn variables.instance.pluginName>41 <cfreturn instance.pluginName> 42 42 </cffunction> 43 43 … … 46 46 <cffunction name="setPluginName" access="public" hint="Set the instance's pluginName" returntype="string" output="false"> 47 47 <cfargument name="pluginName" required="true" type="string"> 48 <cfset variables.instance.pluginName = arguments.pluginName>48 <cfset instance.pluginName = arguments.pluginName> 49 49 </cffunction> 50 50 … … 52 52 53 53 <cffunction name="getPluginVersion" access="public" hint="Get the instance's pluginVersion" returntype="string" output="false"> 54 <cfreturn variables.instance.pluginVersion>54 <cfreturn instance.pluginVersion> 55 55 </cffunction> 56 56 … … 59 59 <cffunction name="setPluginVersion" access="public" hint="Set the instance's pluginVersion" returntype="string" output="false"> 60 60 <cfargument name="pluginVersion" required="true" type="string"> 61 <cfset variables.instance.pluginVersion = arguments.pluginVersion>61 <cfset instance.pluginVersion = arguments.pluginVersion> 62 62 </cffunction> 63 63 … … 65 65 66 66 <cffunction name="getPluginDescription" access="public" hint="Get the instance's pluginDescription" returntype="string" output="false"> 67 <cfreturn variables.instance.pluginDescription>67 <cfreturn instance.pluginDescription> 68 68 </cffunction> 69 69 … … 72 72 <cffunction name="setPluginDescription" access="public" hint="Set the instance's pluginDescription" returntype="string" output="false"> 73 73 <cfargument name="pluginDescription" required="true" type="string"> 74 <cfset variables.instance.pluginDescription = arguments.pluginDescription>74 <cfset instance.pluginDescription = arguments.pluginDescription> 75 75 </cffunction> 76 76 … … 78 78 79 79 <cffunction name="getpluginPath" access="public" hint="Get the instance's pluginPath" returntype="string" output="false"> 80 <cfreturn variables.instance.pluginPath>80 <cfreturn instance.pluginPath> 81 81 </cffunction> 82 82 -
coldbox/trunk/src/system/plugins/FileWriter.cfc
r634 r823 42 42 <cfset setpluginDescription("Uses the java native classes to perform buffered file writing.")> 43 43 <!--- This instance constructor ---> 44 <cfset variables.instance.joFileOutputStream = ''>45 <cfset variables.instance.joOutputStreamWriter = ''>46 <cfset variables.instance.joBufferedWriter = ''>44 <cfset instance.joFileOutputStream = ''> 45 <cfset instance.joOutputStreamWriter = ''> 46 <cfset instance.joBufferedWriter = ''> 47 47 <cfreturn this> 48 48 </cffunction> -
coldbox/trunk/src/system/plugins/JavaLoader.cfc
r634 r823 34 34 <cfset setpluginDescription("Java Loader plugin, based on Mark Mandel's brain.")> 35 35 <!--- This plugins' properties ---> 36 <cfset variables.instance.classLoader = "">36 <cfset instance.classLoader = ""> 37 37 <cfreturn this> 38 38 </cffunction> -
coldbox/trunk/src/system/plugins/StringBuffer.cfc
r634 r823 61 61 <cfset setpluginVersion("1.0")> 62 62 <cfset setpluginDescription("This is a facade to the java StringBuffer class.")> 63 <cfset variables.instance.joStringBuffer = createObject("java","java.lang.StringBuffer") />63 <cfset instance.joStringBuffer = createObject("java","java.lang.StringBuffer") /> 64 64 <cfreturn this> 65 65 </cffunction> -
coldbox/trunk/src/system/plugins/XMLParser.cfc
r815 r823 50 50 51 51 //Search Patterns for Config file 52 variables.instance.searchSettings = "//Settings/Setting";53 variables.instance.searchYourSettings = "//YourSettings/Setting";54 variables.instance.searchBugTracer = "//BugTracerReports/BugEmail";55 variables.instance.searchDevURLS = "//DevEnvironments/url";56 variables.instance.searchWS = "//WebServices/WebService";57 variables.instance.searchLayouts = "//Layouts/Layout";58 variables.instance.searchDefaultLayout = "//Layouts/DefaultLayout";59 variables.instance.searchDefaultView = "//Layouts/DefaultView";60 variables.instance.searchMailSettings = "//MailServerSettings";61 variables.instance.searchi18NSettings = "//i18N";62 variables.instance.searchDatasources = "//Datasources/Datasource";63 variables.instance.searchCache = "//Cache";52 instance.searchSettings = "//Settings/Setting"; 53 instance.searchYourSettings = "//YourSettings/Setting"; 54 instance.searchBugTracer = "//BugTracerReports/BugEmail"; 55 instance.searchDevURLS = "//DevEnvironments/url"; 56 instance.searchWS = "//WebServices/WebService"; 57 instance.searchLayouts = "//Layouts/Layout"; 58 instance.searchDefaultLayout = "//Layouts/DefaultLayout"; 59 instance.searchDefaultView = "//Layouts/DefaultView"; 60 instance.searchMailSettings = "//MailServerSettings"; 61 instance.searchi18NSettings = "//i18N"; 62 instance.searchDatasources = "//Datasources/Datasource"; 63 instance.searchCache = "//Cache"; 64 64 65 65 //Search patterns for fw xml 66 variables.instance.searchConventions = "//Conventions";66 instance.searchConventions = "//Conventions"; 67 67 68 68 //Properties 69 variables.instance.FileSeparator = createObject("java","java.lang.System").getProperty("file.separator");70 variables.instance.FrameworkConfigFile = ExpandPath("/coldbox/system/config/settings.xml");71 variables.instance.FrameworkConfigXSDFile = ExpandPath("/coldbox/system/config/config.xsd");69 instance.FileSeparator = createObject("java","java.lang.System").getProperty("file.separator"); 70 instance.FrameworkConfigFile = ExpandPath("/coldbox/system/config/settings.xml"); 71 instance.FrameworkConfigXSDFile = ExpandPath("/coldbox/system/config/config.xsd"); 72 72 //Return 73 73 return this; -
coldbox/trunk/src/system/plugins/cfcViewer.cfc
r634 r823 37 37 <cfset setpluginDescription("CFC metadata introspection plugin")> 38 38 <!--- Plugin properties ---> 39 <cfset variables.instance.dirpath = "">40 <cfset variables.instance.cfcpath = "">41 <cfset variables.instance.aCFC = ArrayNew(1)>42 <cfset variables.instance.aPacks = ArrayNew(1)>43 <cfset variables.instance.styleSheet = "/coldbox/system/includes/cfcviewer.css">44 <cfset variables.instance.lstAccessTypes = "public,private,remote,package">39 <cfset instance.dirpath = ""> 40 <cfset instance.cfcpath = ""> 41 <cfset instance.aCFC = ArrayNew(1)> 42 <cfset instance.aPacks = ArrayNew(1)> 43 <cfset instance.styleSheet = "/coldbox/system/includes/cfcviewer.css"> 44 <cfset instance.lstAccessTypes = "public,private,remote,package"> 45 45 <cfreturn this> 46 46 </cffunction> … … 73 73 74 74 <cfif arguments.accessTypesFilter neq ""> 75 <cfset variables.instance.lstAccessTypes = arguments.accessTypesFilter>75 <cfset instance.lstAccessTypes = arguments.accessTypesFilter> 76 76 </cfif> 77 77 -
coldbox/trunk/src/system/plugins/i18n.cfc
r815 r823 69 69 70 70 //<!--- This plugin's properties ---> 71 variables.instance.aDFSymbol=createObject("java","java.text.DecimalFormatSymbols");72 variables.instance.aDateFormat=createObject("java","java.text.DateFormat");73 variables.instance.sDateFormat=createObject("java","java.text.SimpleDateFormat");74 variables.instance.aLocale=createObject("java","java.util.Locale");75 variables.instance.timeZone=createObject("java","java.util.TimeZone");76 variables.instance.thisLocale = ""; //Setup by the loadLocale() method.71 instance.aDFSymbol=createObject("java","java.text.DecimalFormatSymbols"); 72 instance.aDateFormat=createObject("java","java.text.DateFormat"); 73 instance.sDateFormat=createObject("java","java.text.SimpleDateFormat"); 74 instance.aLocale=createObject("java","java.util.Locale"); 75 instance.timeZone=createObject("java","java.util.TimeZone"); 76 instance.thisLocale = ""; //Setup by the loadLocale() method. 77 77 loadLocale(); 78 variables.instance.aCalendar=createObject("java","java.util.GregorianCalendar").init(variables.instance.thisLocale);79 variables.instance.dateSymbols = createObject("java","java.text.DateFormatSymbols").init(variables.instance.thisLocale);80 variables.instance.I18NUtilDate="23-aug-2006"; //should be date of latest change78 instance.aCalendar=createObject("java","java.util.GregorianCalendar").init(instance.thisLocale); 79 instance.dateSymbols = createObject("java","java.text.DateFormatSymbols").init(instance.thisLocale); 80 instance.I18NUtilDate="23-aug-2006"; //should be date of latest change 81 81 return this; 82 82 </cfscript> -
coldbox/trunk/src/system/plugins/logger.cfc
r815 r823 37 37 <!--- This plugin's properties ---> 38 38 <!--- log name without extension ---> 39 <cfset variables.instance.logfilename = URLEncodedFormat(replace(replace(controller.getSetting("AppName")," ","","all"),".","_","all"))>39 <cfset instance.logfilename = URLEncodedFormat(replace(replace(controller.getSetting("AppName")," ","","all"),".","_","all"))> 40 40 <!--- The full absolute path of the log file ---> 41 41 <cfif controller.settingExists("ColdboxLogsLocation")> 42 <cfset variables.instance.logFullPath = controller.getSetting("ColdboxLogsLocation")>42 <cfset instance.logFullPath = controller.getSetting("ColdboxLogsLocation")> 43 43 <cfelse> 44 <cfset variables.instance.logFullPath = ''>44 <cfset instance.logFullPath = ''> 45 45 </cfif> 46 46 <!--- Available valid severities ---> 47 <cfset variables.instance.validSeverities = "information|fatal|warning|error|debug">47 <cfset instance.validSeverities = "information|fatal|warning|error|debug"> 48 48 <!--- Return ---> 49 49 <cfreturn this> -
coldbox/trunk/src/system/plugins/zip.cfc
r634 r823 70 70 setpluginDescription("This is a zip utility for the framework."); 71 71 //This plugin's properties 72 variables.instance.ioFile = CreateObject("java","java.io.File");73 variables.instance.ioInput = CreateObject("java","java.io.FileInputStream");74 variables.instance.ioOutput = CreateObject("java","java.io.FileOutputStream");75 variables.instance.ioBufOutput = CreateObject("java","java.io.BufferedOutputStream");76 variables.instance.zipFile = CreateObject("java","java.util.zip.ZipFile");77 variables.instance.zipEntry = CreateObject("java","java.util.zip.ZipEntry");78 variables.instance.zipInput = CreateObject("java","java.util.zip.ZipInputStream");79 variables.instance.zipOutput = CreateObject("java","java.util.zip.ZipOutputStream");80 variables.instance.gzInput = CreateObject("java","java.util.zip.GZIPInputStream");81 variables.instance.gzOutput = CreateObject("java","java.util.zip.GZIPOutputStream");82 variables.instance.objDate = CreateObject("java","java.util.Date");72 instance.ioFile = CreateObject("java","java.io.File"); 73 instance.ioInput = CreateObject("java","java.io.FileInputStream"); 74 instance.ioOutput = CreateObject("java","java.io.FileOutputStream"); 75 instance.ioBufOutput = CreateObject("java","java.io.BufferedOutputStream"); 76 instance.zipFile = CreateObject("java","java.util.zip.ZipFile"); 77 instance.zipEntry = CreateObject("java","java.util.zip.ZipEntry"); 78 instance.zipInput = CreateObject("java","java.util.zip.ZipInputStream"); 79 instance.zipOutput = CreateObject("java","java.util.zip.ZipOutputStream"); 80 instance.gzInput = CreateObject("java","java.util.zip.GZIPInputStream"); 81 instance.gzOutput = CreateObject("java","java.util.zip.GZIPOutputStream"); 82 instance.objDate = CreateObject("java","java.util.Date"); 83 83 84 84 /* Set Localized Variables */ 85 variables.instance.os = Server.OS.Name;86 variables.instance.slash = createObject("java","java.lang.System").getProperty("file.separator");85 instance.os = Server.OS.Name; 86 instance.slash = createObject("java","java.lang.System").getProperty("file.separator"); 87 87 88 88 //LM. To fix Overflow. 89 variables.instance.filename = "";89 instance.filename = ""; 90 90 91 91 //Return instance -
coldbox/trunk/src/system/services/requestService.cfc
r743 r823 31 31 <cfscript> 32 32 var Context = createContext(); 33 var DebugPassword = getController().getSetting("debugPassword");34 var EventName = getController().getSetting("EventName");33 var DebugPassword = controller.getSetting("debugPassword"); 34 var EventName = controller.getSetting("EventName"); 35 35 36 36 //Object Caching Garbage Collector … … 101 101 var DefaultView = ""; 102 102 var ViewLayouts = structNew(); 103 var EventName = getController().getSetting("EventName");103 var EventName = controller.getSetting("EventName"); 104 104 105 if ( getController().settingExists("DefaultLayout") ){106 DefaultLayout = getController().getSetting("DefaultLayout");105 if ( controller.settingExists("DefaultLayout") ){ 106 DefaultLayout = controller.getSetting("DefaultLayout"); 107 107 } 108 if ( getController().settingExists("DefaultView") ){109 DefaultView = getController().getSetting("DefaultView");108 if ( controller.settingExists("DefaultView") ){ 109 DefaultView = controller.getSetting("DefaultView"); 110 110 } 111 if ( getController().settingExists("ViewLayouts") ){112 ViewLayouts = getController().getSetting("ViewLayouts");111 if ( controller.settingExists("ViewLayouts") ){ 112 ViewLayouts = controller.getSetting("ViewLayouts"); 113 113 } 114 114 //Return context.
