Changeset 1999
- Timestamp:
- 02/03/09 09:27:54 (4 years ago)
- Location:
- coldbox/trunk
- Files:
-
- 6 modified
-
system/config/config.xsd (modified) (1 diff)
-
system/config/settings.xml (modified) (1 diff)
-
system/plugins/XMLParser.cfc (modified) (1 diff)
-
system/plugins/beanFactory.cfc (modified) (18 diffs)
-
system/services/LoaderService.cfc (modified) (1 diff)
-
testharness/config/coldbox.xml.cfm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
coldbox/trunk/system/config/config.xsd
r1996 r1999 76 76 <xs:enumeration value="ViewsExternalLocation" /> 77 77 <xs:enumeration value="ModelsExternalLocation" /> 78 <xs:enumeration value="ModelsObjectCaching" /> 78 <xs:enumeration value="ModelsObjectCaching" /> 79 <xs:enumeration value="ModelsSetterInjection" /> 80 <xs:enumeration value="ModelsDebugMode" /> 81 <xs:enumeration value="ModelsStopRecursion" /> 82 <xs:enumeration value="ModelsDICompleteUDF" /> 79 83 </xs:restriction> 80 84 </xs:simpleType> -
coldbox/trunk/system/config/settings.xml
r1975 r1999 60 60 <Setting name="expandedCachePanel" value="false"/> 61 61 <Setting name="showRCPanel" value="true"/> 62 <Setting name="expandedRCPanel" value="false"/> 62 <Setting name="expandedRCPanel" value="false"/> 63 <!-- Model Integration --> 64 <Setting name="ModelsObjectCaching" value="true" /> 65 <Setting name="ModelsSetterInjection" value="false" /> 66 <Setting name="ModelsDebugMode" value="false" /> 67 <Setting name="ModelsStopRecursion" value="" /> 68 <Setting name="ModelsDICompleteUDF" value="onDIComplete" /> 63 69 </Settings> 64 70 -
coldbox/trunk/system/plugins/XMLParser.cfc
r1996 r1999 492 492 if ( not structKeyExists(ConfigStruct, "ModelsExternalLocation") or len(ConfigStruct["ModelsExternalLocation"]) eq 0 ) 493 493 ConfigStruct["ModelsExternalLocation"] = ""; 494 495 494 //Check for Models ObjectCaching 496 495 if ( not structKeyExists(ConfigStruct, "ModelsObjectCaching") or not isBoolean(ConfigStruct["ModelsObjectCaching"]) ) 497 496 ConfigStruct["ModelsObjectCaching"] = true; 498 497 //Check for ModelsDebugMode 498 if ( not structKeyExists(ConfigStruct, "ModelsDebugMode") or not isBoolean(ConfigStruct["ModelsDebugMode"]) ) 499 ConfigStruct["ModelsDebugMode"] = fwSettingsStruct["ModelsDebugMode"]; 500 //Check for ModelsSetterInjection 501 if ( not structKeyExists(ConfigStruct, "ModelsSetterInjection") or not isBoolean(ConfigStruct["ModelsSetterInjection"]) ) 502 ConfigStruct["ModelsSetterInjection"] = fwSettingsStruct["ModelsSetterInjection"]; 503 //Check for ModelsDICompleteUDF 504 if ( not structKeyExists(ConfigStruct, "ModelsDICompleteUDF") or len(ConfigStruct["ModelsDICompleteUDF"]) eq 0 ) 505 ConfigStruct["ModelsDICompleteUDF"] = fwSettingsStruct["ModelsDICompleteUDF"]; 506 //Check for ModelsStopRecursion 507 if ( not structKeyExists(ConfigStruct, "ModelsStopRecursion") or len(ConfigStruct["ModelsStopRecursion"]) eq 0 ) 508 ConfigStruct["ModelsStopRecursion"] = fwSettingsStruct["ModelsStopRecursion"]; 509 499 510 /* Flash URL Persist Scope Override */ 500 511 if( structKeyExists(ConfigStruct,"FlashURLPersistScope") and reFindnocase("^(session|client)$",ConfigStruct["FlashURLPersistScope"]) ){ -
coldbox/trunk/system/plugins/beanFactory.cfc
r1980 r1999 11 11 -----------------------------------------------------------------------> 12 12 <cfcomponent name="beanFactory" 13 hint="I am a simple bean factory and you can use me if you want."13 hint="I am the ColdBox beanFactory plugin that takes care of autowiring and dependency injection" 14 14 extends="coldbox.system.plugin" 15 15 output="false" … … 38 38 /* Model Mappings */ 39 39 instance.modelMappings = structnew(); 40 /* Run Model Mappings */40 /* Run Model Mappings template */ 41 41 if( fileExists(getSetting("ApplicationPath") & "config/modelMappings.cfm") ){ 42 42 try{ … … 54 54 } 55 55 56 /* Constructor Argument Marker */56 /* Default Constructor Argument Marker */ 57 57 instance.dslMarker = "_wireme"; 58 58 /* Check setting For Argument Marker Override */ … … 60 60 instance.dslMarker = getSetting("beanFactory_dslMarker"); 61 61 } 62 62 63 /* Not Found Marker Constant */ 63 64 instance.NOT_FOUND = "_NOT_FOUND_"; … … 124 125 <!--- ************************************************************* ---> 125 126 <cfargument name="name" required="true" type="string" hint="The name of the model to retrieve"> 126 <cfargument name="useSetterInjection" required="false" type="boolean" default="false" hint="Whether to use setter injection alongside the annotations property injection. cfproperty injection takes precedence."> 127 <cfargument name="onDICompleteUDF" required="false" type="string" default="onDIComplete" hint="After Dependencies are injected, this method will look for this UDF and call it if it exists. The default value is onDIComplete"> 128 <cfargument name="debugMode" required="false" type="boolean" default="false" hint="Debugging Mode or not"> 127 <cfargument name="useSetterInjection" required="false" type="boolean" hint="Whether to use setter injection alongside the annotations property injection. cfproperty injection takes precedence."> 128 <cfargument name="onDICompleteUDF" required="false" type="string" hint="After Dependencies are injected, this method will look for this UDF and call it if it exists. The default value is onDIComplete"> 129 <cfargument name="debugMode" required="false" type="boolean" hint="Debugging Mode or not"> 130 <cfargument name="stopRecursion" required="false" type="string" hint="A comma-delimmited list of stoprecursion classpaths."> 129 131 <!--- ************************************************************* ---> 130 132 <cfscript> … … 139 141 var md = 0; 140 142 var modelMappings = getModelMappings(); 143 144 /* Setting Overrides, else grab from setting */ 145 if( not structKeyExists(arguments,"useSetterInjection") ){ 146 arguments.useSetterInjection = getSetting("ModelsSetterInjection"); 147 } 148 if( not structKeyExists(arguments,"onDICompleteUDF") ){ 149 arguments.onDICompleteUDF = getSetting("ModelsDICompleteUDF"); 150 } 151 if( not structKeyExists(arguments,"debugMode") ){ 152 arguments.debugMode = getSetting("ModelsDebugMode"); 153 } 154 if( not structKeyExists(arguments,"stopRecursion") ){ 155 arguments.stopRecursion = getSetting("ModelsStopRecursion"); 156 } 141 157 142 158 /* Resolve name in Alias Checks */ … … 197 213 annotationCheck=false, 198 214 onDICompleteUDF=arguments.onDICompleteUDF, 199 debugMode=arguments.debugmode); 215 debugMode=arguments.debugmode, 216 stopRecursion=arguments.stopRecursion); 200 217 } 201 218 </cfscript> … … 355 372 356 373 <!--- Autowire ---> 357 <cffunction name="autowire" access="public" returntype="void" output="false" hint="Autowire an object using the IoC plugin.">374 <cffunction name="autowire" access="public" returntype="void" output="false" hint="Autowire an object using the ColdBox DSL"> 358 375 <!--- ************************************************************* ---> 359 376 <cfargument name="target" required="true" type="any" hint="The object to autowire"> … … 431 448 for(x=1; x lte dependenciesLength; x=x+1){ 432 449 /* Get Dependency */ 433 thisDependency = getDSLDependency(targetDIEntry.dependencies[x],arguments.debugmode); 450 thisDependency = getDSLDependency(definition=targetDIEntry.dependencies[x], 451 debugMode=arguments.debugmode); 434 452 /* Validate it */ 435 453 if( isSimpleValue(thisDependency) and thisDependency eq instance.NOT_FOUND ){ … … 467 485 <!--- ************************************************************* ---> 468 486 <cfargument name="model" required="true" type="any" default="" hint="The model object"/> 469 <cfargument name="useSetterInjection" required="false" type="boolean" default="true" hint="Whether to use setter injection alongside the annotations property injection. cfproperty injection takes precedence.">470 <cfargument name="onDICompleteUDF" required="false" type="string" default="onDIComplete" hint="After Dependencies are injected, this method will look for this UDF and call it if it exists. The default value is onDIComplete">471 487 <cfargument name="debugMode" required="false" type="boolean" default="false" hint="Whether to log debug messages. Default is false"> 472 488 <!--- ************************************************************* ---> … … 487 503 definition.scope=""; 488 504 /* Get Dependency */ 489 args[definition.name] = getDSLDependency(Definition=definition, 490 useSetterInjection=arguments.useSetterINjection, 491 onDICompleteUDF=arguments.onDICompleteUDF, 505 args[definition.name] = getDSLDependency(definition=definition, 492 506 debugMode=arguments.debugMode); 493 507 } … … 501 515 <cffunction name="getDSLDependency" output="false" access="private" returntype="any" hint="get a dsl dependency"> 502 516 <!--- ************************************************************* ---> 503 <cfargument name="Definition" required="true" type="any" hint="The dependency definition structure"> 504 <cfargument name="useSetterInjection" required="false" type="boolean" default="true" hint="Whether to use setter injection alongside the annotations property injection. cfproperty injection takes precedence."> 505 <cfargument name="onDICompleteUDF" required="false" type="string" default="onDIComplete" hint="After Dependencies are injected, this method will look for this UDF and call it if it exists. The default value is onDIComplete"> 517 <cfargument name="definition" required="true" type="any" hint="The dependency definition structure"> 506 518 <cfargument name="debugMode" required="false" type="boolean" default="false" hint="Whether to log debug messages. Default is false"> 507 519 <!--- ************************************************************* ---> … … 523 535 else if ( thisType eq "model" ){ 524 536 /* Try to inject model dependencies */ 525 dependency = getModelDSL(Definition=arguments.Definition, 526 useSetterInjection=arguments.useSetterInjection, 527 onDICompleteUDF=arguments.onDICompleteUDF, 537 dependency = getModelDSL(definition=arguments.Definition, 528 538 debugMode=arguments.debugMode); 529 539 } … … 590 600 <cffunction name="getModelDSL" access="private" returntype="any" hint="Get dependencies using the model dependency DSL" output="false" > 591 601 <!--- ************************************************************* ---> 592 <cfargument name="Definition" required="true" type="any" hint="The dependency definition structure"> 593 <cfargument name="useSetterInjection" required="false" type="boolean" default="true" hint="Whether to use setter injection alongside the annotations property injection. cfproperty injection takes precedence."> 594 <cfargument name="onDICompleteUDF" required="false" type="string" default="onDIComplete" hint="After Dependencies are injected, this method will look for this UDF and call it if it exists. The default value is onDIComplete"> 602 <cfargument name="definition" required="true" type="any" hint="The dependency definition structure"> 595 603 <cfargument name="debugMode" required="false" type="boolean" default="false" hint="Whether to log debug messages. Default is false"> 596 604 <!--- ************************************************************* ---> … … 605 613 606 614 /* Prepare Arguments */ 607 args.useSetterInjection = arguments.useSetterInjection;608 args.onDICompleteUDF = arguments.onDICompleteUDF;609 615 args.debugmode = arguments.debugMode; 610 616 … … 638 644 <cffunction name="getColdboxDSL" access="private" returntype="any" hint="Get dependencies using the coldbox dependency DSL" output="false" > 639 645 <!--- ************************************************************* ---> 640 <cfargument name=" Definition" required="true" type="any" hint="The dependency definition structure">646 <cfargument name="definition" required="true" type="any" hint="The dependency definition structure"> 641 647 <!--- ************************************************************* ---> 642 648 <cfscript> … … 687 693 <cffunction name="getIOCDependency" access="private" returntype="any" hint="Get an IOC dependency" output="false" > 688 694 <!--- ************************************************************* ---> 689 <cfargument name=" Definition" required="true" type="any" hint="The dependency definition structure">695 <cfargument name="definition" required="true" type="any" hint="The dependency definition structure"> 690 696 <!--- ************************************************************* ---> 691 697 <cfscript> … … 720 726 <cffunction name="getOCMDependency" access="private" returntype="any" hint="Get OCM dependencies" output="false" > 721 727 <!--- ************************************************************* ---> 722 <cfargument name=" Definition" required="true" type="any" hint="The dependency definition structure">728 <cfargument name="definition" required="true" type="any" hint="The dependency definition structure"> 723 729 <!--- ************************************************************* ---> 724 730 <cfscript> -
coldbox/trunk/system/services/LoaderService.cfc
r1956 r1999 136 136 } 137 137 138 //JavaLoader Setup will go here.139 140 138 /* Set Debugging Mode according to configuration File */ 141 139 controller.getDebuggerService().setDebugMode(controller.getSetting("DebugMode")); -
coldbox/trunk/testharness/config/coldbox.xml.cfm
r1966 r1999 36 36 <Setting name="EventCaching" value="true"/> 37 37 <Setting name="IOCFramework" value="lightwire"/> 38 <Setting name="IOCFrameworkReload" value="true"/> 38 39 <Setting name="IOCDefinitionFile" value="config/coldspring.xml.cfm"/> 39 40 <Setting name="IOCObjectCaching" value="false"/>
