Class AppConfigImpl

java.lang.Object
de.elo.ix.client.webapp.impl.AppConfigImpl
All Implemented Interfaces:
AppConfig

public class AppConfigImpl extends Object implements AppConfig
  • Field Details

    • configProps

      protected de.elo.utils.PropertiesEx configProps
    • configDir

      protected File configDir
    • propertyNames

      protected AppPropertyNames propertyNames
  • Constructor Details

    • AppConfigImpl

      public AppConfigImpl(AppPropertyNames propNames, de.elo.utils.PropertiesEx configProps, File configDir)
  • Method Details

    • getAppPropertyNames

      public AppPropertyNames getAppPropertyNames()
      Description copied from interface: AppConfig
      Get the property names of standard properties. Modify the returned object, if the application uses different property names.
      Specified by:
      getAppPropertyNames in interface AppConfig
      Returns:
      AppPropertyNames object
    • getProperties

      public de.elo.utils.PropertiesEx getProperties()
      Description copied from interface: AppConfig
      Get the configuration properties. The passwords are internally decrypted.
      Specified by:
      getProperties in interface AppConfig
      Returns:
      Properties object
    • encrypt

      public String encrypt(String value, boolean encryptNotDecrypt)
      Description copied from interface: AppConfig
      Encrypt or decrypt a string. This function can be used to encrypt or decrypt passwords in configuration files. It uses the encryption algorithm DES. Although DES is a strong encryption algorithm, the enrypted passwords should be kept a secret. This is because the encryption key is contained in the code and could be reverse engineered. Do not use this function to encrypt document files.
      Specified by:
      encrypt in interface AppConfig
      Parameters:
      value - String to be encrpyted or decrypted.
      encryptNotDecrypt - true, if this function should encrpty
      Returns:
      encrypted or decrypted value
    • getConfigDirectory

      public File getConfigDirectory()
      Description copied from interface: AppConfig
      Get the configuration directory.
      Specified by:
      getConfigDirectory in interface AppConfig
      Returns:
      E. g. d:\ELOprofessional\config\ix-elo\
    • setConfigDirectory

      public void setConfigDirectory(File v)
    • readUserProfile

      public de.elo.utils.PropertiesEx readUserProfile(IXConnection ix, String keyFilter) throws byps.RemoteException
      Description copied from interface: AppConfig
      Read the profile options that match the given key filter. Only the wildcard * is allowed in the parameter keyFilter. If keyFilter is null or empty, all profile options are read.
      Specified by:
      readUserProfile in interface AppConfig
      Parameters:
      ix - Indexserver connection
      keyFilter - filter, e.g. "Elo.search.*" or ""
      Returns:
      Properties object
      Throws:
      byps.RemoteException
      See Also:
    • writeUserProfile

      public void writeUserProfile(IXConnection ix, Properties props) throws byps.RemoteException
      Description copied from interface: AppConfig
      Write the given profile options.
      Specified by:
      writeUserProfile in interface AppConfig
      Parameters:
      ix - Indexserver connections
      props - Properties object
      Throws:
      byps.RemoteException
      See Also:
    • deleteUserProfile

      public void deleteUserProfile(IXConnection ix, String keyFilter) throws byps.RemoteException
      Description copied from interface: AppConfig
      Delete the profile options that match the given key filter.
      Specified by:
      deleteUserProfile in interface AppConfig
      Parameters:
      ix - Indexserver connection
      keyFilter - filter, e.g. "Elo.search.*" or ""
      Throws:
      byps.RemoteException
      See Also:
    • readUserProfileValue

      public String readUserProfileValue(IXConnection ix, String key) throws byps.RemoteException
      Description copied from interface: AppConfig
      Reads one value from the profile options.
      Specified by:
      readUserProfileValue in interface AppConfig
      Parameters:
      ix - Indexserver connection
      key - option key
      Returns:
      option value
      Throws:
      byps.RemoteException
    • writeUserProfileValue

      public void writeUserProfileValue(IXConnection ix, String key, String value) throws byps.RemoteException
      Description copied from interface: AppConfig
      Write one option into the profile.
      Specified by:
      writeUserProfileValue in interface AppConfig
      Parameters:
      ix - Indexserver connection
      key - option key
      value - option value
      Throws:
      byps.RemoteException
    • setLogLevel

      public void setLogLevel(String reportLevel)
      Modifies the report level of the root logger.
      Specified by:
      setLogLevel in interface AppConfig
      Parameters:
      reportLevel - one of "DEBUG", "INFO", "WARN", "ERROR"
    • getLogLevel

      public String getLogLevel()
      Returns the report level of the root logger.
      Specified by:
      getLogLevel in interface AppConfig
      Returns:
      "DEBUG", "INFO", "WARN", "ERROR"