Class Configuration


  • public class Configuration
    extends Object
    Implementation for Commons Configuration / Properties for the entire application
    Author:
    Niko Siltala
    • Method Detail

      • getInstance

        public static Configuration getInstance()
        Gets the common instance of this pool
        Returns:
        Singleton instance of this class
      • isConfigurationOK

        public boolean isConfigurationOK()
        Is configuration exist and is OK
        Returns:
        True if configuration can be used and utilised
      • testConfiguration

        public boolean testConfiguration()
        More thorough test that configuration is OK and valid
        Returns:
        true if config is existing, OK and (partially) valid.
      • getConfigurationFileName

        public String getConfigurationFileName()
        Returns:
        the configurationFileName
      • setConfigurationFileName

        public String setConfigurationFileName​(String configurationFileName)
        Sets the configuration file to desired one. If change occurs and requested file exist, this will reload the configuration.
        Parameters:
        configurationFileName - location of the configuration file. path + filename
        Returns:
        The configuration file name used
      • getConnectedXMLConfiguration

        public org.apache.commons.configuration2.XMLConfiguration getConnectedXMLConfiguration()
        Gets the prepared configuration instance (XMLConfiguration)
        Returns:
        XMLConfiguration object containing the application's configuration