Package com.compomics.util.io
Class PropertiesManager
java.lang.Object
com.compomics.util.io.PropertiesManager
public class PropertiesManager extends Object
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 Type Method Description File
getApplicationFolder(CompomicsTools aTool)
Get the application folder that contains the appropriate properties.static PropertiesManager
getInstance()
Get the singleton instance to access properties of Computational Omics tools.Properties
getProperties(CompomicsTools aTool, String aPropertiesFileName)
Get a Properties instance for the parameter properties filename.static void
main(String[] args)
DO NOT RUN.void
updateLog4jConfiguration(org.apache.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 foldervoid
updateProperties(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.aNewProperties
- The Properties instance.aPropertiesFileName
- The properties filename (e.g., dbconnection.properties)
-
updateLog4jConfiguration
public void updateLog4jConfiguration(org.apache.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 folder- Parameters:
aLogger
- The loggeraCompomicsTools
- The tool
-