public class PropertiesManager extends Object
Modifier and Type | Method and 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 folder
|
void |
updateProperties(CompomicsTools aTool,
String aPropertiesFileName,
Properties aNewProperties)
Update the content of a user properties instance to the ms_lims properties directory.
|
public File getApplicationFolder(CompomicsTools aTool)
aTool
- The tool for which the properties are requested.public static PropertiesManager getInstance()
public static void main(String[] args)
args
- the argumentspublic Properties getProperties(CompomicsTools aTool, String aPropertiesFileName)
aTool
- the name of the toolaPropertiesFileName
- - e.g.: "mascotdaemon.properties"public void updateProperties(CompomicsTools aTool, String aPropertiesFileName, Properties aNewProperties)
aTool
- The name of the tool.aNewProperties
- The Properties instance.aPropertiesFileName
- The properties filename (e.g., dbconnection.properties)public void updateLog4jConfiguration(org.apache.log4j.Logger aLogger, CompomicsTools aCompomicsTools)
aLogger
- The loggeraCompomicsTools
- The toolCopyright © 2016. All rights reserved.