public abstract class ModuleFactory
extends com.streamscape.sef.dispatcher.AbstractFabricContextFactory
Title: Service Event Fabric Core
Description: Defines a factory managing ModuleConfiguration
objects.
Module
class and
invoke addModule(String, String, String, java.util.Map)
method.
activateModule(String)
method.
Only one module can be active.
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
addModule(java.lang.String name,
java.lang.String description,
java.lang.String moduleClass,
java.util.Map parameters)
Adds a new module with the specified parameters.
|
boolean |
existsModule(java.lang.String name)
Checks if the specified module exists.
|
ModuleConfiguration |
getActiveModuleConfiguration()
Returns a configuration object of the active module.
|
ModuleConfiguration |
getModuleConfiguration(java.lang.String name)
Returns a configuration object of to the specified module.
|
boolean |
isModuleActive(java.lang.String name)
Checks if the specified module is active.
|
java.util.List |
listModules()
Returns the list of names of all modules.
|
void |
removeModule(java.lang.String name)
Removes the specified module.
|
void |
saveModule(ModuleConfiguration configuration)
Updates the specified configuration of existing module in the Repository.
|
getContext, getContextType, hasContext
clone, getSerialVersionUID
public void addModule(java.lang.String name, java.lang.String description, java.lang.String moduleClass, java.util.Map parameters) throws ModuleFactoryException
moduleClass
must contain the name of the class implementing Module
interface.name
- the name of the module.description
- the description of the module.moduleClass
- the implementing class of the module.parameters
- the parameters of the module.ModuleFactoryException
- if the specified module already exists or
if some error occurs in the Repository.public void removeModule(java.lang.String name) throws ModuleFactoryException
name
- the name of the module.ModuleFactoryException
- if the specified module is default or active module or
if some error occurs in the Repository.public ModuleConfiguration getActiveModuleConfiguration()
public ModuleConfiguration getModuleConfiguration(java.lang.String name)
name
- the module name.null
if this does not exist.public boolean existsModule(java.lang.String name)
name
- the name of the module to be checked.true
if the specified module exists, false
otherwise.public java.util.List listModules()
public boolean isModuleActive(java.lang.String name)
name
- the module name.true
if the specified module is active, false
otherwise.public void saveModule(ModuleConfiguration configuration) throws ModuleFactoryException
configuration
- the module configuration to be saved.ModuleFactoryException
- if the specified module does not exist or
if some error occurs in the Repository.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.