org.alfresco.repo.module
Class ModuleServiceImpl

java.lang.Object
  extended by org.alfresco.repo.module.ModuleServiceImpl
All Implemented Interfaces:
ModuleService, 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

Constructor Summary
ModuleServiceImpl()
          Default constructor
 
Method Summary
 java.util.List getAllModules()
          Gets a list of all the modules currently installed.
 ModuleDetails getModule(java.lang.String moduleId)
          Gets the module details for a given module id.
 void registerComponent(ModuleComponent component)
          Register a component of a module for execution.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setDescriptorService(DescriptorService descriptorService)
           
 void setRegistryService(RegistryService registryService)
           
 void setServiceRegistry(ServiceRegistry serviceRegistry)
           
 void setTenantAdminService(TenantAdminService tenantAdminService)
           
 void startModules()
          Start all the modules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)

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:
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:
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 getAllModules()
Gets a list of all the modules currently installed.

Specified by:
getAllModules in interface ModuleService
Returns:
module details of the currently installed modules.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.