Package org.openbravo.test.modularity
Class ExecutionLimitsTest.FakeModuleScript
- java.lang.Object
-
- org.openbravo.base.ExecutionLimitBaseProcess
-
- org.openbravo.modulescript.ModuleScript
-
- org.openbravo.test.modularity.ExecutionLimitsTest.FakeModuleScript
-
- Enclosing class:
- ExecutionLimitsTest
public class ExecutionLimitsTest.FakeModuleScript extends ModuleScript
Fake module script with version limits, it simply flags when it is executed
-
-
Field Summary
-
Fields inherited from class org.openbravo.base.ExecutionLimitBaseProcess
log4j
-
-
Constructor Summary
Constructors Constructor Description FakeModuleScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
This method must be implemented by the ModuleScripts, and is used to define the actions that the script itself will take.boolean
executeOnInstall()
This method can be overridden by the subclasses of this class, to specify if they should be executed when installing the dependent module.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.-
Methods inherited from class org.openbravo.modulescript.ModuleScript
doExecute, getExecutionLimits, getTypeName, handleError
-
Methods inherited from class org.openbravo.base.ExecutionLimitBaseProcess
getConnectionProvider, getPropertiesFile, getSourcePath, preExecute
-
-
-
-
Method Detail
-
execute
public void execute()
Description copied from class:ModuleScript
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- Specified by:
execute
in classModuleScript
-
getModuleScriptExecutionLimits
public ModuleScriptExecutionLimits getModuleScriptExecutionLimits()
Description copied from class:ModuleScript
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.- Overrides:
getModuleScriptExecutionLimits
in classModuleScript
- Returns:
- a ModuleScriptExecutionLimits object which contains the dependent module id and the first and last versions of the module that define the execution logic.
-
executeOnInstall
public boolean executeOnInstall()
Description copied from class:ExecutionLimitBaseProcess
This method can be overridden by the subclasses of this class, to specify if they should be executed when installing the dependent module.- Overrides:
executeOnInstall
in classExecutionLimitBaseProcess
- Returns:
- a boolean that indicates if they should be executed when installing the dependent module.
-
-