com.compomics.util.io
Class PropertiesManager

java.lang.Object
  extended by 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
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getApplicationFolder

public File getApplicationFolder(CompomicsTools aTool)
Get the application folder that contains the appropriate properties.

Parameters:
aTool - The tool for which the properties are requisted.
Returns:
File (Directory) that contains the properties.

getInstance

public static PropertiesManager getInstance()
Get the singleton instance to access properties of Computational Omics tools.

Returns:
The Propertiesmanger to access user properties in their home directory.

main

public static void main(String[] args)
DO NOT RUN. For testing purpose.

Parameters:
args -

getProperties

public Properties getProperties(CompomicsTools aTool,
                                String aPropertiesFileName)
Get a Properties instance for the parameter properties filename.

Parameters:
aTool -
aPropertiesFileName - - 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 -
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 -
aCompomicsTools - The tool


Copyright © 2012. All Rights Reserved.