Package fi.tut.mei.resdescapi.rescatapi
Class Configuration
- java.lang.Object
-
- fi.tut.mei.resdescapi.rescatapi.Configuration
-
public class Configuration extends Object
Implementation for Commons Configuration / Properties for the entire application- Author:
- Niko Siltala
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getConfigurationFileName()
org.apache.commons.configuration2.XMLConfiguration
getConnectedXMLConfiguration()
Gets the prepared configuration instance (XMLConfiguration)static Configuration
getInstance()
Gets the common instance of this poolboolean
isConfigurationOK()
Is configuration exist and is OKString
setConfigurationFileName(String configurationFileName)
Sets the configuration file to desired one.boolean
testConfiguration()
More thorough test that configuration is OK and valid
-
-
-
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
-
-