Class ModuleCache
- java.lang.Object
-
- com.aquima.interactions.portal.model.ModuleCache
-
- All Implemented Interfaces:
IModuleVisitor
,IModuleCache
public class ModuleCache extends Object implements IModuleCache
This class is used to initialize the modules of an application.- Since:
- 7.1
- Author:
- O. Kerpershoek
-
-
Constructor Summary
Constructors Constructor Description ModuleCache(Solution solution, IInitializationReport report, IApplicationDS datasource, boolean processEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addModule(IModuleDS datasource)
This method should be invoked for each module that is used by the application.IModule
getMainModule()
This method returns the main module of the application.IModule
getModule(ModuleID moduleId)
This method returns the module definition for the specified ID.String[]
getModuleNames()
This method returns the names of the all modules in the cache.protected IModule
loadModule(IModuleDS datasource)
-
-
-
Constructor Detail
-
ModuleCache
public ModuleCache(Solution solution, IInitializationReport report, IApplicationDS datasource, boolean processEnabled) throws InitializationException
- Throws:
InitializationException
-
-
Method Detail
-
addModule
public void addModule(IModuleDS datasource) throws InitializationException
Description copied from interface:IModuleVisitor
This method should be invoked for each module that is used by the application.- Specified by:
addModule
in interfaceIModuleVisitor
- Parameters:
datasource
- The data source providing the information needed to initialize the module.- Throws:
InitializationException
- This exception is thrown when the module could not be initialized.
-
getMainModule
public IModule getMainModule()
Description copied from interface:IModuleCache
This method returns the main module of the application.- Specified by:
getMainModule
in interfaceIModuleCache
- Returns:
- The main module of the application.
-
getModule
public IModule getModule(ModuleID moduleId) throws InitializationException, UnknownModuleException
Description copied from interface:IModuleCache
This method returns the module definition for the specified ID.- Specified by:
getModule
in interfaceIModuleCache
- Parameters:
moduleId
- The ID of the requested module.- Returns:
- The module definition for the specified ID.
- Throws:
InitializationException
- This exception is thrown when the module could not be loaded.UnknownModuleException
- This exception is thrown when the module is not available.
-
loadModule
protected IModule loadModule(IModuleDS datasource) throws InitializationException
- Throws:
InitializationException
-
getModuleNames
public String[] getModuleNames()
Description copied from interface:IModuleCache
This method returns the names of the all modules in the cache.- Specified by:
getModuleNames
in interfaceIModuleCache
- Returns:
- The names of all modules.
-
-