Package org.openbravo.modulescript
Class ModuleScript
- java.lang.Object
-
- org.openbravo.base.ExecutionLimitBaseProcess
-
- org.openbravo.modulescript.ModuleScript
-
- Direct Known Subclasses:
ExecutionLimitsTest.FakeModuleScript
public abstract class ModuleScript extends ExecutionLimitBaseProcess
Classes extending ModuleScript can be included in Openbravo Core or a module and will be automatically executed when the system is rebuilt (technically in: update.database)
-
-
Field Summary
-
Fields inherited from class org.openbravo.base.ExecutionLimitBaseProcess
log4j
-
-
Constructor Summary
Constructors Constructor Description ModuleScript()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
doExecute()
This method prints some log information before calling the execute() methodabstract void
execute()
This method must be implemented by the ModuleScripts, and is used to define the actions that the script itself will take.protected ExecutionLimits
getExecutionLimits()
This method can be overridden by the subclasses of this class, to specify the module and the limit versions to define whether they should be executed or not.protected ModuleScriptExecutionLimits
getModuleScriptExecutionLimits()
This method can be overridden by the ModuleScript subclasses, to specify the module and the limit versions to define whether the ModuleScript should be executed or not.protected String
getTypeName()
This method returns the name of the class.protected void
handleError(Throwable t)
-
Methods inherited from class org.openbravo.base.ExecutionLimitBaseProcess
executeOnInstall, getConnectionProvider, getPropertiesFile, getSourcePath, preExecute
-
-
-
-
Method Detail
-
execute
public abstract void execute()
This method must be implemented by the ModuleScripts, and is used to define the actions that the script itself will take. This method will be automatically called by the ModuleScriptHandler when the update.database task is being executed
-
doExecute
protected void doExecute()
This method prints some log information before calling the execute() method- Specified by:
doExecute
in classExecutionLimitBaseProcess
-
getTypeName
protected String getTypeName()
This method returns the name of the class.- Specified by:
getTypeName
in classExecutionLimitBaseProcess
- Returns:
- Name of the process type.
-
getModuleScriptExecutionLimits
protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits()
This method can be overridden by the ModuleScript subclasses, to specify the module and the limit versions to define whether the ModuleScript should be executed or not.- Returns:
- a ModuleScriptExecutionLimits object which contains the dependent module id and the first and last versions of the module that define the execution logic.
-
getExecutionLimits
protected ExecutionLimits getExecutionLimits()
Description copied from class:ExecutionLimitBaseProcess
This method can be overridden by the subclasses of this class, to specify the module and the limit versions to define whether they should be executed or not.- Specified by:
getExecutionLimits
in classExecutionLimitBaseProcess
- Returns:
- a ExecutionLimits object which contains the dependent module id and the first and last versions of the module that define the execution logic.
-
handleError
protected void handleError(Throwable t)
-
-