Package com.compomics.util.io
Class PropertiesManager
java.lang.Object
com.compomics.util.io.PropertiesManager
This class holds all user properties for ms_lims.
Created by IntelliJ IDEA.
User: kenny
Date: Feb 22, 2010
Time: 1:27:41 PM
-
Method Summary
Modifier and TypeMethodDescriptionGet the application folder that contains the appropriate properties.static PropertiesManagerGet the singleton instance to access properties of Computational Omics tools.getProperties(CompomicsTools aTool, String aPropertiesFileName) Get a Properties instance for the parameter properties filename.static voidDO NOT RUN.voidupdateLog4jConfiguration(org.apache.logging.log4j.Logger aLogger, CompomicsTools aCompomicsTools) This method will delete the log4j log file in the folder of the package and will create a log file in the CompomicsTools specific .compomics foldervoidupdateProperties(CompomicsTools aTool, String aPropertiesFileName, Properties aNewProperties) Update the content of a user properties instance to the ms_lims properties directory.
-
Method Details
-
getApplicationFolder
Get the application folder that contains the appropriate properties.- Parameters:
aTool- The tool for which the properties are requested.- Returns:
- File (Directory) that contains the properties.
-
getInstance
Get the singleton instance to access properties of Computational Omics tools.- Returns:
- The PropertiesManger to access user properties in their home directory.
-
main
DO NOT RUN. For testing purpose.- Parameters:
args- the arguments
-
getProperties
Get a Properties instance for the parameter properties filename.- Parameters:
aTool- the name of the toolaPropertiesFileName- - e.g.: "mascotdaemon.properties"- Returns:
- Properties instance of the given properties file. Null if the filename was not found.
-
updateProperties
public void updateProperties(CompomicsTools aTool, String aPropertiesFileName, Properties aNewProperties) Update the content of a user properties instance to the ms_lims properties directory.- Parameters:
aTool- The name of the tool.aPropertiesFileName- The properties filename (e.g., dbconnection.properties)aNewProperties- The Properties instance.
-
updateLog4jConfiguration
public void updateLog4jConfiguration(org.apache.logging.log4j.Logger aLogger, CompomicsTools aCompomicsTools) throws IOException This method will delete the log4j log file in the folder of the package and will create a log file in the CompomicsTools specific .compomics folder- Parameters:
aLogger- The loggeraCompomicsTools- The tool- Throws:
IOException- Thrown as the method is not currently implemented
-