Class DalInitializingTask

  • All Implemented Interfaces:
    Cloneable
    Direct Known Subclasses:
    ActivationTask, ApplyModuleTask, CheckLocalConsistency, ExtractModuleTask, SystemValidationTask

    public class DalInitializingTask
    extends org.apache.tools.ant.Task
    This class can be sub-classed by java ant tasks which need to make use of the Data Access Layer. This class reads the Openbravo.properties and initializes the Dal. The user context is set using the userid. Then the doExecute method is called. This method should be implemented by the subclass.
    Author:
    mtaal
    • Field Detail

      • propertiesFile

        protected String propertiesFile
      • userId

        protected String userId
    • Constructor Detail

      • DalInitializingTask

        public DalInitializingTask()
    • Method Detail

      • getPropertiesFile

        public String getPropertiesFile()
      • setPropertiesFile

        public void setPropertiesFile​(String propertiesFile)
        Sets the path to the Openbravo.properties file.
        Parameters:
        propertiesFile - the full filesystem path to the Openbravo.properties file
      • getUserId

        public String getUserId()
        The user used to run the task.
        Returns:
        the id of the user
      • setUserId

        public void setUserId​(String userId)
        Sets the user which will be used to run the task.
        Parameters:
        userId - the id of the user which will be used to run the task
      • execute

        public void execute()
        Performs Dal layer initialization and then calls the doExecute method.
        Overrides:
        execute in class org.apache.tools.ant.Task
      • doExecute

        protected void doExecute()
        The method which should be implemented by the subclass
      • getProviderConfigDirectory

        public String getProviderConfigDirectory()
      • setProviderConfigDirectory

        public void setProviderConfigDirectory​(String providerConfigDirectory)
      • isReInitializeModel

        public boolean isReInitializeModel()
      • setReInitializeModel

        public void setReInitializeModel​(boolean reInitializeModel)
      • isAdminMode

        public boolean isAdminMode()
      • setAdminMode

        public void setAdminMode​(boolean adminMode)