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 Object
implements org.springframework.context.ApplicationContextAware, ModuleService
This component controls the execution of
module 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 the
service registry to be used when the
server starts up again.- Since:
- 2.0
- Author:
- Roy Wetherall, Derek Hulley
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a list of all the modules currently installed.Gets a list of the modules missing from the system.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) voidvoidStart all the modules.
-
Constructor Details
-
ModuleServiceImpl
public ModuleServiceImpl()Default constructor
-
-
Method Details
-
setServiceRegistry
-
setDescriptorService
-
setRegistryService
- Parameters:
registryService- the service used to persist component execution details.
-
setTenantAdminService
-
setApplyToTenants
public void setApplyToTenants(boolean applyToTenants) - Throws:
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
Description copied from interface:ModuleServiceRegister a component of a module for execution.- Specified by:
registerComponentin interfaceModuleService- Parameters:
component- the module component.- See Also:
-
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:
-
shutdownModules
public void shutdownModules()- Specified by:
shutdownModulesin interfaceModuleService- See Also:
-
getModule
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
Gets a list of all the modules currently installed.- Specified by:
getAllModulesin interfaceModuleService- Returns:
- module details of the currently installed modules.
-
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.
-