| java.lang.Object org.unitils.core.ModulesLoader
ModulesLoader | public class ModulesLoader (Code) | | A class for loading unitils modules.
The core names set by the
ModulesLoader.PROPKEY_MODULES property which modules will be loaded. These names can then
be used to construct properties that define the classnames and optionally the dependencies of these modules. E.g.
unitils.modules= a, b, c, d
unitils.module.a.className= org.unitils.A
unitils.module.a.runAfter= b, c
unitils.module.b.className= org.unitils.B
unitils.module.b.runAfter= c
unitils.module.c.className= org.unitils.C
unitils.module.d.enabled= false
The above configuration will load 3 core classes A, B and C and will always perform processing in
order C, B, A.
If a circular dependency is found in the runAfter configuration, a runtime exception will be thrown.
author: Filip Neven author: Tim Ducheyne |
PROPKEY_MODULES | final public static String PROPKEY_MODULES(Code) | | Property that contains the names of the modules that are to be loaded
|
PROPKEY_MODULE_PREFIX | final public static String PROPKEY_MODULE_PREFIX(Code) | | First part of all core specific properties
|
PROPKEY_MODULE_SUFFIX_CLASS_NAME | final public static String PROPKEY_MODULE_SUFFIX_CLASS_NAME(Code) | | Last part of the core specific property that specifies the classname of the core
|
PROPKEY_MODULE_SUFFIX_ENABLED | final public static String PROPKEY_MODULE_SUFFIX_ENABLED(Code) | | Last part of the core specific property that specifies whehter the core should be loaded
|
PROPKEY_MODULE_SUFFIX_RUN_AFTER | final public static String PROPKEY_MODULE_SUFFIX_RUN_AFTER(Code) | | Last part of the core specific property that specifies the names of the modules that should be run before this core
|
createAndInitializeModules | protected List<Module> createAndInitializeModules(List<String> moduleNameList, Properties configuration)(Code) | | Creates the modules with the given class names and calls initializes them with the given configuration.
Parameters: moduleNameList - the module class names, not null Parameters: configuration - the configuration, not null the modules, not null |
loadModules | public List<Module> loadModules(Properties configuration)(Code) | | Loads all unitils modules as described in the class javadoc.
Parameters: configuration - the configuration, not null the modules, not null |
removeDisabledModules | protected void removeDisabledModules(Set<String> moduleNames, Properties configuration)(Code) | | Removes all modules that have a value false for the enabled property.
Parameters: moduleNames - the module names, not null Parameters: configuration - the configuration, not null |
|
|