Changeset 2209

Show
Ignore:
Timestamp:
04/22/09 04:22:32 (4 years ago)
Author:
lmajano
Message:

Ticket #711
Handler registration is out of sequence, now fixed so interceptors can actually use events also.

Location:
coldbox/trunk
Files:
1 added
9 modified
2 moved

Legend:

Unmodified
Added
Removed
  • coldbox/trunk/system/Coldbox.cfc

    r2194 r2209  
    6363                        application[COLDBOX_APP_KEY] = CreateObject("component","coldbox.system.Controller").init(COLDBOX_APP_ROOT_PATH); 
    6464                        /* Setup the Framework And Application */ 
    65                         application[COLDBOX_APP_KEY].getLoaderService().setupCalls(COLDBOX_CONFIG_FILE);                         
     65                        application[COLDBOX_APP_KEY].getLoaderService().configLoader(COLDBOX_CONFIG_FILE);                       
    6666                </cfscript> 
    6767        </cffunction> 
     
    8585                                        <cflock type="exclusive" name="#getAppHash()#" timeout="#getLockTimeout()#" throwontimeout="true"> 
    8686                                                <cfset application[COLDBOX_APP_KEY].setAppStartHandlerFired(false)> 
    87                                                 <cfset application[COLDBOX_APP_KEY].getLoaderService().setupCalls(COLDBOX_CONFIG_FILE)> 
     87                                                <cfset application[COLDBOX_APP_KEY].getLoaderService().configLoader(COLDBOX_CONFIG_FILE)> 
    8888                                        </cflock> 
    8989                                <cfelse> 
  • coldbox/trunk/system/plugins/BeanFactory.cfc

    r2206 r2209  
    3535                         
    3636                        /* Setup the Autowire DI Dictionary */ 
    37                         setDICacheDictionary(CreateObject("component","coldbox.system.util.BaseDictionary").init('DIMetadata')); 
     37                        setDICacheDictionary(CreateObject("component","coldbox.system.util.collections.BaseDictionary").init('DIMetadata')); 
    3838                        /* Model Mappings */ 
    3939                        instance.modelMappings = structnew(); 
     
    952952 
    953953        <!--- Get Set DI CACHE Dictionary ---> 
    954         <cffunction name="getDICacheDictionary" access="private" output="false" returntype="coldbox.system.util.BaseDictionary" hint="Get DICacheDictionary"> 
     954        <cffunction name="getDICacheDictionary" access="private" output="false" returntype="coldbox.system.util.collections.BaseDictionary" hint="Get DICacheDictionary"> 
    955955                <cfreturn instance.DICacheDictionary/> 
    956956        </cffunction> 
    957957        <cffunction name="setDICacheDictionary" access="private" output="false" returntype="void" hint="Set DICacheDictionary"> 
    958                 <cfargument name="DICacheDictionary" type="coldbox.system.util.BaseDictionary" required="true"/> 
     958                <cfargument name="DICacheDictionary" type="coldbox.system.util.collections.BaseDictionary" required="true"/> 
    959959                <cfset instance.DICacheDictionary = arguments.DICacheDictionary/> 
    960960        </cffunction> 
  • coldbox/trunk/system/remote/ColdboxProxy.cfc

    r2191 r2209  
    306306                                        application[COLDBOX_APP_KEY] = cbController; 
    307307                                        /* Setup Calls */ 
    308                                         cbController.getLoaderService().setupCalls(arguments.configLocation);                                    
     308                                        cbController.getLoaderService().configLoader(arguments.configLocation);                                  
    309309                                }                                
    310310                                </cfscript> 
  • coldbox/trunk/system/services/HandlerService.cfc

    r2193 r2209  
    2222                        setController(arguments.controller); 
    2323                        /* Setup the Event Handler Cache Dictionary */ 
    24                         setHandlerCacheDictionary(CreateObject("component","coldbox.system.util.BaseDictionary").init('HandlersMetadata')); 
     24                        setHandlerCacheDictionary(CreateObject("component","coldbox.system.util.collections.BaseDictionary").init('HandlersMetadata')); 
    2525                        /* Setup the Event Cache Dictionary */ 
    26                         setEventCacheDictionary(CreateObject("component","coldbox.system.util.BaseDictionary").init('EventCache')); 
     26                        setEventCacheDictionary(CreateObject("component","coldbox.system.util.collections.BaseDictionary").init('EventCache')); 
    2727                         
    2828                        /* Return Service */                     
     
    324324         
    325325        <!--- Handler Cache Dictionary ---> 
    326         <cffunction name="getHandlerCacheDictionary" access="public" returntype="coldbox.system.util.BaseDictionary" output="false"> 
     326        <cffunction name="getHandlerCacheDictionary" access="public" returntype="coldbox.system.util.collections.BaseDictionary" output="false"> 
    327327                <cfreturn instance.HandlerCacheDictionary> 
    328328        </cffunction> 
    329329        <cffunction name="setHandlerCacheDictionary" access="public" returntype="void" output="false"> 
    330                 <cfargument name="HandlerCacheDictionary" type="coldbox.system.util.BaseDictionary" required="true"> 
     330                <cfargument name="HandlerCacheDictionary" type="coldbox.system.util.collections.BaseDictionary" required="true"> 
    331331                <cfset instance.HandlerCacheDictionary = arguments.HandlerCacheDictionary> 
    332332        </cffunction> 
    333333         
    334334        <!--- Event Cache Dictionary ---> 
    335         <cffunction name="getEventCacheDictionary" access="public" returntype="coldbox.system.util.BaseDictionary" output="false"> 
     335        <cffunction name="getEventCacheDictionary" access="public" returntype="coldbox.system.util.collections.BaseDictionary" output="false"> 
    336336                <cfreturn instance.EventCacheDictionary> 
    337337        </cffunction> 
    338338        <cffunction name="setEventCacheDictionary" access="public" returntype="void" output="false"> 
    339                 <cfargument name="EventCacheDictionary" type="coldbox.system.util.BaseDictionary" required="true"> 
     339                <cfargument name="EventCacheDictionary" type="coldbox.system.util.collections.BaseDictionary" required="true"> 
    340340                <cfset instance.EventCacheDictionary = arguments.EventCacheDictionary> 
    341341        </cffunction> 
  • coldbox/trunk/system/services/LoaderService.cfc

    r2149 r2209  
    2727<!------------------------------------------- PUBLIC -------------------------------------------> 
    2828 
    29         <!--- Setup Calls ---> 
    30         <cffunction name="setupCalls" returntype="void" access="public" hint="I execute the framework and application loading scripts" output="false"> 
    31                 <!--- ************************************************************* ---> 
    32                 <cfargument name="overrideConfigFile" type="string" required="false" default="" hint="Only used for unit testing or reparsing of a specific coldbox config file."> 
    33                 <cfargument name="overrideAppMapping" type="string" required="false" default="" hint="Only used for unit testing or reparsing of a specific coldbox config file."/> 
    34                 <!--- ************************************************************* ---> 
    35                 <cfscript> 
    36                         //execute the configLoader 
    37                         configLoader(argumentCollection=arguments); 
    38                         //execute the handler registrations after configurations loaded 
    39                         getController().getHandlerService().registerHandlers(); 
    40                 </cfscript> 
    41         </cffunction> 
    42  
    4329        <!--- Config Loader Method ---> 
    4430        <cffunction name="configLoader" returntype="void" access="Public" hint="I Load the configurations only, init the framework variables and more." output="false"> 
    4531                <!--- ************************************************************* ---> 
    4632                <cfargument name="overrideConfigFile" required="false" type="string" default="" hint="Only used for unit testing or reparsing of a specific coldbox config file."> 
    47                 <cfargument name="overrideAppMapping" type="string" required="false" default="" hint="Only used for unit testing or reparsing of a specific coldbox config file."/> 
     33                <cfargument name="overrideAppMapping" required="false" type="string" default="" hint="Only used for unit testing or reparsing of a specific coldbox config file."/> 
    4834                <!--- ************************************************************* ---> 
    4935                <cfscript> 
     
    5844                        controller.getHandlerService().clearDictionaries(); 
    5945                         
    60                         //Prepare Parser 
     46                        /* Prepare Parser */ 
    6147                        XMLParser = controller.getPlugin("XMLParser"); 
    6248                         
    63                         //Load Coldbox Config Settings Structure 
     49                        /* Load Coldbox Config Settings Structure */ 
    6450                        FrameworkSettings = XMLParser.loadFramework(arguments.overrideConfigFile); 
    6551                        controller.setColdboxSettings(FrameworkSettings); 
    6652                         
    67                         //Create the Cache Config Bean with data from the framework's settings.xml 
     53                        /* Create the Cache Config Bean with data from the framework's settings.xml */ 
    6854                        CacheConfigBean.populate(FrameworkSettings); 
    69                         //Configure the Object Cache for first usage. 
     55                        /* Configure the Object Cache for first usage. */ 
    7056                        controller.getColdboxOCM().configure(CacheConfigBean); 
    7157                         
    72                         //Load Application Config Settings Now that framework has been loaded. 
     58                        /* Load Application Config Settings Now that framework has been loaded. */ 
    7359                        ConfigSettings = XMLParser.parseConfig(arguments.overrideAppMapping); 
    7460                        controller.setConfigSettings(ConfigSettings); 
    7561                         
    76                         //Check for Cache OVerride Settings in Config 
     62                        /* Check for Cache OVerride Settings in Config */ 
    7763                        if ( ConfigSettings.CacheSettings.OVERRIDE ){ 
    7864                                //Recreate the Config Bean 
     
    8874                        } 
    8975                         
    90                         /* Populate Debugger with settings from the framework */ 
    91                         DebuggerConfigBean.populate(FrameworkSettings); 
    92                          
    9376                        /* Check for Debugger Override, if true, then overpopulate with configuration settings overriding framework settings. */ 
    9477                        if( ConfigSettings.DebuggerSettings.OVERRIDE ){ 
    9578                                DebuggerConfigBean.populate(ConfigSettings.DebuggerSettings); 
    9679                        } 
     80                        else{ 
     81                                /* Populate Debugger with settings from the framework */ 
     82                                DebuggerConfigBean.populate(FrameworkSettings); 
     83                        } 
    9784                         
    98                         /* Configure the Debugger with framework wide settings.*/ 
     85                        /* Configure the Debugger For Usage*/ 
    9986                        controller.getDebuggerService().setDebuggerConfigBean(DebuggerConfigBean); 
     87                         
     88                        /* execute the handler registrations after configurations loaded */ 
     89                        controller.getHandlerService().registerHandlers(); 
    10090                         
    10191                        /* Register The Interceptors */ 
  • coldbox/trunk/system/services/PluginService.cfc

    r2195 r2209  
    2727                        /* Set Service Properties */ 
    2828                        setColdBoxPluginsPath('coldbox.system.plugins'); 
    29                         setCacheDictionary(CreateObject("component","coldbox.system.util.BaseDictionary").init('PluginMetadata')); 
     29                        setCacheDictionary(CreateObject("component","coldbox.system.util.collections.BaseDictionary").init('PluginMetadata')); 
    3030                         
    3131                        /* Return instance */ 
     
    167167        <cffunction name="setcacheDictionary" access="private" output="false" returntype="void" hint="Set the plugin cache dictionary. NOT EXPOSED to avoid screwups"> 
    168168                <!--- ************************************************************* ---> 
    169                 <cfargument name="cacheDictionary" type="coldbox.system.util.BaseDictionary" required="true"/> 
     169                <cfargument name="cacheDictionary" type="coldbox.system.util.collections.BaseDictionary" required="true"/> 
    170170                <!--- ************************************************************* ---> 
    171171                <cfset instance.cacheDictionary = arguments.cacheDictionary/> 
  • coldbox/trunk/system/testing/BaseTestCase.cfc

    r2173 r2209  
    5252                        } 
    5353                        /* Setup */ 
    54                         instance.controller.getLoaderService().setupCalls(instance.ConfigMapping,instance.AppMapping); 
     54                        instance.controller.getLoaderService().configLoader(instance.ConfigMapping,instance.AppMapping); 
    5555                } 
    5656                 
  • coldbox/trunk/testing/cases/interceptors/securityTest.cfc

    r2173 r2209  
    8888                         
    8989                        //resetup 
    90                         getController().getLoaderService().setupCalls(getConfigMapping(),getAppMapping()); 
     90                        getController().getLoaderService().configLoader(getConfigMapping(),getAppMapping()); 
    9191                </cfscript> 
    9292                <!--- Login a user ---> 
     
    121121                 
    122122                //resetup 
    123                 getController().getLoaderService().setupCalls(getConfigMapping(),getAppMapping()); 
     123                getController().getLoaderService().configLoader(getConfigMapping(),getAppMapping()); 
    124124         
    125125                </cfscript> 
     
    136136                 
    137137                //resetup 
    138                 getController().getLoaderService().setupCalls(getConfigMapping(),getAppMapping()); 
     138                getController().getLoaderService().configLoader(getConfigMapping(),getAppMapping()); 
    139139                                 
    140140                </cfscript> 
     
    151151                 
    152152                //resetup 
    153                 getController().getLoaderService().setupCalls(getConfigMapping(),getAppMapping()); 
     153                getController().getLoaderService().configLoader(getConfigMapping(),getAppMapping()); 
    154154                                 
    155155                </cfscript> 
     
    166166                 
    167167                //resetup 
    168                 getController().getLoaderService().setupCalls(getConfigMapping(),getAppMapping()); 
     168                getController().getLoaderService().configLoader(getConfigMapping(),getAppMapping()); 
    169169                 
    170170                /* Place rules on OCM */ 
     
    204204                 
    205205                //resetup 
    206                 getController().getLoaderService().setupCalls(getConfigMapping(),getAppMapping()); 
     206                getController().getLoaderService().configLoader(getConfigMapping(),getAppMapping()); 
    207207                 
    208208                /* Test */ 
  • coldbox/trunk/testing/cases/services/loaderserviceTest.cfc

    r2173 r2209  
    2222        </cffunction> 
    2323         
    24         <cffunction name="testSetupCalls" access="public" returntype="void" output="false"> 
     24        <cffunction name="testconfigLoader" access="public" returntype="void" output="false"> 
    2525                <cfscript> 
    2626                var service = getController().getservice("loader"); 
     
    2929                getController().setSetting("dummyVar", true); 
    3030                 
    31                 service.setupCalls(getConfigMapping(),getAppMapping()); 
     31                service.configLoader(getConfigMapping(),getAppMapping()); 
    3232                 
    3333                AssertFalse( getController().settingExists("dummyVar") );                
  • coldbox/trunk/testing/cases/util/collections/BaseDictionaryTest.cfc

    r2174 r2209  
    44        <cffunction name="setup" output="false" access="public" returntype="any" hint=""> 
    55                <cfscript> 
    6                         dictionary = CreateObject("component","coldbox.system.util.baseDictionary").init('MyTest'); 
     6                        dictionary = CreateObject("component","coldbox.system.util.collections.BaseDictionary").init('MyTest'); 
    77                </cfscript> 
    88        </cffunction>