Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.module
Interface ModuleComponent
All Known Implementing Classes:
AbstractModuleComponent, ImporterModuleComponent

@org.alfresco.api.AlfrescoPublicApi
public interface ModuleComponent
Interface for classes that control the startup and shutdown behaviour of modules.

Note that the execution order of these components is on the basis of dependencies only. The version numbering determines only whether a component will be executed and doesn't imply any ordering.

Equals and Hashcode method must be implemented.

Since:
2.0
Author:
Derek Hulley

Method Summary
void
execute()
          Perform the actual component's work.
org.alfresco.repo.module.ModuleVersionNumber
getAppliesFromVersionNumber()
org.alfresco.repo.module.ModuleVersionNumber
getAppliesToVersionNumber()
getDependsOn()
          A list of module components that must be executed prior to this instance.
getDescription()
getModuleId()
getName()
org.alfresco.repo.module.ModuleVersionNumber
getSinceVersionNumber()
boolean
isExecuteOnceOnly()
void
shutdown()
          Perform any cleanup required to remove module.
Method Detail
getModuleId
String getModuleId()
Returns:
Returns the globally unique module ID.

getName
String getName()
Returns:
Returns the name of the component in the context of the module ID. It does not have to be globally unique.

getDescription
String getDescription()
Returns:
Returns a description of the component.

getSinceVersionNumber
org.alfresco.repo.module.ModuleVersionNumber getSinceVersionNumber()
Returns:
Returns the version number of the module for which this component was introduced.

getAppliesFromVersionNumber
org.alfresco.repo.module.ModuleVersionNumber getAppliesFromVersionNumber()
Returns:
Returns the smallest version number of the module to which this component applies.

getAppliesToVersionNumber
org.alfresco.repo.module.ModuleVersionNumber getAppliesToVersionNumber()
Returns:
Returns the largest version number of the module to which this component applies.

getDependsOn
List<ModuleComponentgetDependsOn()
A list of module components that must be executed prior to this instance. This is the only way to guarantee ordered execution. The dependencies may include components from other modules, guaranteeing an early failure if a module is missing.
Returns:
Returns a list of components that must be executed prior to this component.

isExecuteOnceOnly
boolean isExecuteOnceOnly()
Returns:
Returns true if the component is to be successfully executed exactly once, or false if the component must be executed with each startup.

execute
void execute()
Perform the actual component's work. Execution will be done within the context of a system account with an enclosing transaction. Long-running processes should be spawned from the calling thread, if required.

All failures should just be thrown out as runtime exceptions and will be dealt with by the associated module infrastructure.


shutdown
void shutdown()
Perform any cleanup required to remove module.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.