Class ExecutionLimits

  • Direct Known Subclasses:
    ModuleScriptExecutionLimits

    public class ExecutionLimits
    extends Object
    This class is used by ExecutionLimitBaseProcess subclasses to store the limits that define if they should be executed or not. This class holds a String with a module version id, together with the first and last module versions that establish under which versions they must be executed.
    • Constructor Detail

      • ExecutionLimits

        public ExecutionLimits​(String moduleId,
                               OpenbravoVersion firstVersion,
                               OpenbravoVersion lastVersion)
        Basic ExecutionLimits constructor. Used to define a dependency between ExecutionLimitBaseProcess subclasses and a module. When upgrading the module whose id is moduleId, they will be executed only if its version before upgrading is higher than firstVersion and lower than lastVersion. Otherwise they will not be executed.
        Parameters:
        moduleId - A String with the module id
        firstVersion - An OpenbravoVersion which defines the first version of the module with id = moduleId since an ExecutionLimitBaseProcess subclass can be executed.
        lastVersion - An OpenbravoVersion with the last version of the module with id = moduleId which allows the execution of an ExecutionLimitBaseProcess subclass.
    • Method Detail

      • getModuleId

        public String getModuleId()
        Returns the dependent module id
        Returns:
        a String with the module id
      • getFirstVersion

        public OpenbravoVersion getFirstVersion()
        Returns the first version of the dependent module for which an ExecutionLimitBaseProcess subclass should be executed.
        Returns:
        a OpenbravoVersion with the first execution version of the dependent module
      • getLastVersion

        public OpenbravoVersion getLastVersion()
        Returns the last version of the dependent module for which an ExecutionLimitBaseProcess subclass should be executed.
        Returns:
        a OpenbravoVersion with the last execution version of the dependent module
      • areCorrect

        public boolean areCorrect()
        This method returns true when the last version and first version values are correctly defined.
        Returns:
        false in case first version is higher than last version. Otherwise, it returns true.