Package org.alfresco.repo.module
Class ModuleServiceImpl
- java.lang.Object
-
- org.alfresco.repo.module.ModuleServiceImpl
-
- All Implemented Interfaces:
ModuleService,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class ModuleServiceImpl extends java.lang.Object implements org.springframework.context.ApplicationContextAware, ModuleService
This component controls the execution ofmodule startup components. All required startup executions are performed in a single transaction, so this component guarantees that the module initialization is consistent. Module components are executed in dependency order only. The version numbering is not to be used for ordering purposes. Afterwards, execution details are persisted in theservice registryto be used when the server starts up again.- Since:
- 2.0
- Author:
- Roy Wetherall, Derek Hulley
-
-
Constructor Summary
Constructors Constructor Description ModuleServiceImpl()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ModuleDetails>getAllModules()Gets a list of all the modules currently installed.java.util.List<ModuleDetails>getMissingModules()Gets a list of the modules missing from the system.ModuleDetailsgetModule(java.lang.String moduleId)Gets the module details for a given module id.voidregisterComponent(ModuleComponent component)Register a component of a module for execution.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetApplyToTenants(boolean applyToTenants)voidsetDescriptorService(DescriptorService descriptorService)voidsetRegistryService(RegistryService registryService)voidsetServiceRegistry(ServiceRegistry serviceRegistry)voidsetTenantAdminService(TenantAdminService tenantAdminService)voidshutdownModules()voidstartModules()Start all the modules.
-
-
-
Method Detail
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry serviceRegistry)
-
setDescriptorService
public void setDescriptorService(DescriptorService descriptorService)
-
setRegistryService
public void setRegistryService(RegistryService registryService)
- Parameters:
registryService- the service used to persist component execution details.
-
setTenantAdminService
public void setTenantAdminService(TenantAdminService tenantAdminService)
-
setApplyToTenants
public void setApplyToTenants(boolean applyToTenants)
- Throws:
java.lang.UnsupportedOperationException- This feature was never active and cannot be used (ALF-19207)
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
registerComponent
public void registerComponent(ModuleComponent component)
Description copied from interface:ModuleServiceRegister a component of a module for execution.- Specified by:
registerComponentin interfaceModuleService- Parameters:
component- the module component.- See Also:
ModuleComponentHelper.registerComponent(ModuleComponent)
-
startModules
public void startModules()
Start all the modules. For transaction purposes, each module should be regarded as a self-contained unit and started in its own transaction. Where inter-module dependencies exist, these will be pulled into the transaction.- Specified by:
startModulesin interfaceModuleService- See Also:
ModuleComponentHelper.startModules()
-
shutdownModules
public void shutdownModules()
- Specified by:
shutdownModulesin interfaceModuleService- See Also:
ModuleComponentHelper.shutdownModules()
-
getModule
public ModuleDetails getModule(java.lang.String moduleId)
Gets the module details for a given module id. If the module does not exist or is not installed then null is returned.- Specified by:
getModulein interfaceModuleService- Parameters:
moduleId- a module id- Returns:
- the module details
-
getAllModules
public java.util.List<ModuleDetails> getAllModules()
Gets a list of all the modules currently installed.- Specified by:
getAllModulesin interfaceModuleService- Returns:
- module details of the currently installed modules.
-
getMissingModules
public java.util.List<ModuleDetails> getMissingModules()
Gets a list of the modules missing from the system.- Specified by:
getMissingModulesin interfaceModuleService- Returns:
- module details of the modules missing from the system.
-
-