@Singleton public class ModuleManagerImpl extends Object implements ModuleManager
ModuleManager.Factory, ModuleManager.ModuleAndDeltas, ModuleManager.ModuleManagementState
Modifier | Constructor and Description |
---|---|
protected |
ModuleManagerImpl()
Deprecated.
since 4.5 - use IoC - temporarily kept for tests ?
|
protected |
ModuleManagerImpl(InstallContextImpl installContext,
ModuleDefinitionReader moduleDefinitionReader)
Deprecated.
since 4.5 - use IoC - temporarily kept for tests ?
|
|
ModuleManagerImpl(InstallContextImpl installContext,
ModuleDefinitionReader moduleDefinitionReader,
ModuleRegistry moduleRegistry,
DependencyChecker dependencyChecker,
Node2BeanProcessor nodeToBean) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyDeltas(ModuleDefinition moduleDef,
List<Delta> deltas,
InstallContextImpl ctx)
Applies to given deltas for the given module.
|
void |
checkForInstallOrUpdates()
In addition to checking for install or updates, this method also loads
repositories when there are no pending install or update tasks.
|
protected void |
executeStartupTasks()
Process startup tasks.
|
InstallContext |
getInstallContext() |
protected Map<String,Object> |
getModuleInstanceProperties(ModuleDefinition moduleDefinition)
Builds a map of properties to be set on the module instance, the properties are "moduleDefinition", "name",
"moduleNode" and "configNode".
|
ModuleManager.ModuleManagementState |
getStatus()
Returns the status as discovered by checkForInstallOrUpdates().
|
ModuleManagerUI |
getUI() |
protected void |
installOrUpdateModule(ModuleManager.ModuleAndDeltas moduleAndDeltas,
InstallContextImpl ctx) |
List<ModuleDefinition> |
loadDefinitions()
Loads modules definitions, validates dependencies and sorts modules
by dependencies.
|
protected ModuleVersionHandler |
newVersionHandler(ModuleDefinition module) |
void |
performInstallOrUpdate() |
protected void |
populateModuleInstance(Object moduleInstance,
Map<String,Object> moduleProperties) |
protected void |
startModule(Object moduleInstance,
ModuleDefinition moduleDefinition,
ModuleLifecycleContextImpl lifecycleContext) |
void |
startModules() |
protected void |
stopModule(Object moduleInstance,
ModuleDefinition moduleDefinition,
ModuleLifecycleContextImpl lifecycleContext) |
void |
stopModules() |
@Deprecated protected ModuleManagerImpl()
@Deprecated protected ModuleManagerImpl(InstallContextImpl installContext, ModuleDefinitionReader moduleDefinitionReader)
@Inject public ModuleManagerImpl(InstallContextImpl installContext, ModuleDefinitionReader moduleDefinitionReader, ModuleRegistry moduleRegistry, DependencyChecker dependencyChecker, Node2BeanProcessor nodeToBean)
public List<ModuleDefinition> loadDefinitions() throws ModuleManagementException
ModuleManager
loadDefinitions
in interface ModuleManager
ModuleManagementException
public void checkForInstallOrUpdates()
checkForInstallOrUpdates
in interface ModuleManager
ModuleManager.checkForInstallOrUpdates()
public ModuleManager.ModuleManagementState getStatus()
ModuleManager
getStatus
in interface ModuleManager
public ModuleManagerUI getUI()
getUI
in interface ModuleManager
protected ModuleVersionHandler newVersionHandler(ModuleDefinition module)
public void performInstallOrUpdate()
performInstallOrUpdate
in interface ModuleManager
public InstallContext getInstallContext()
getInstallContext
in interface ModuleManager
public void startModules()
startModules
in interface ModuleManager
protected void executeStartupTasks()
ModuleDefinition.getStartupTasks()
are always executed and
do not require manual intervention.protected void startModule(Object moduleInstance, ModuleDefinition moduleDefinition, ModuleLifecycleContextImpl lifecycleContext)
protected void stopModule(Object moduleInstance, ModuleDefinition moduleDefinition, ModuleLifecycleContextImpl lifecycleContext)
protected Map<String,Object> getModuleInstanceProperties(ModuleDefinition moduleDefinition)
protected void populateModuleInstance(Object moduleInstance, Map<String,Object> moduleProperties)
public void stopModules()
stopModules
in interface ModuleManager
protected void installOrUpdateModule(ModuleManager.ModuleAndDeltas moduleAndDeltas, InstallContextImpl ctx)
protected void applyDeltas(ModuleDefinition moduleDef, List<Delta> deltas, InstallContextImpl ctx)
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.