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 Details

    • ModuleServiceImpl

      public ModuleServiceImpl()
      Default constructor
  • Method Details

    • 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:
      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:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • registerComponent

      public void registerComponent(ModuleComponent component)
      Description copied from interface: ModuleService
      Register a component of a module for execution.
      Specified by:
      registerComponent in interface ModuleService
      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:
      startModules in interface ModuleService
      See Also:
    • shutdownModules

      public void shutdownModules()
      Specified by:
      shutdownModules in interface ModuleService
      See Also:
    • getModule

      public ModuleDetails getModule(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:
      getModule in interface ModuleService
      Parameters:
      moduleId - a module id
      Returns:
      the module details
    • getAllModules

      public List<ModuleDetails> getAllModules()
      Gets a list of all the modules currently installed.
      Specified by:
      getAllModules in interface ModuleService
      Returns:
      module details of the currently installed modules.
    • getMissingModules

      public List<ModuleDetails> getMissingModules()
      Gets a list of the modules missing from the system.
      Specified by:
      getMissingModules in interface ModuleService
      Returns:
      module details of the modules missing from the system.