Class 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 and update.database.mod)
    • Constructor Detail

      • ModuleScript

        public ModuleScript()
    • 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 or the update.database.mod tasks are being executed
      • doExecute

        protected void doExecute()
        This method prints some log information before calling the execute() method
        Specified by:
        doExecute in class ExecutionLimitBaseProcess
      • 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 class ExecutionLimitBaseProcess
        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)