Class OBConfigFileProvider

  • All Implemented Interfaces:
    OBProvidable, OBSingleton

    public class OBConfigFileProvider
    extends Object
    implements OBSingleton
    Is used to read config files from specific locations and initialize the OBProvider.
    Author:
    Martin Taal
    • Constructor Detail

      • OBConfigFileProvider

        public OBConfigFileProvider()
    • Method Detail

      • getFileLocation

        public String getFileLocation()
        Returns:
        the directory containing the Openbravo.properties file, so not the full path including the filename (Openbravo.properties) but the path to and including the directory.
      • setFileLocation

        public void setFileLocation​(String fileLocation)
        Parameters:
        fileLocation - the path to the directory which contains the openbravo properties file (Openbravo.properties). The path does not include the Openbravo.properties file itself.
        See Also:
        getFileLocation()
      • getClassPathLocation

        public String getClassPathLocation()
      • setClassPathLocation

        public void setClassPathLocation​(String classPathLocation)
      • setConfigInProvider

        public void setConfigInProvider()
        This method will read the ob-provider config files (with bean specifications) and pass them to the OBProvider. It reads the file from the class path or from a file location. Depending on what is set: getClassPathLocation() and/or getFileLocation().
      • readModuleConfigsFromFile

        protected void readModuleConfigsFromFile()
      • readModuleConfigsFromClassPath

        protected void readModuleConfigsFromClassPath()
      • getServletContext

        public javax.servlet.ServletContext getServletContext()
      • setServletContext

        public void setServletContext​(javax.servlet.ServletContext servletContext)