Class 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 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 Detail

      • ModuleServiceImpl

        public ModuleServiceImpl()
        Default constructor
    • 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:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • 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:
        ModuleComponentHelper.startModules()
      • 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:
        getModule in interface ModuleService
        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:
        getAllModules in interface ModuleService
        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:
        getMissingModules in interface ModuleService
        Returns:
        module details of the modules missing from the system.