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 Details

    • getApplicationFolder

      public File getApplicationFolder​(CompomicsTools aTool)
      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

      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 - the arguments
    • getProperties

      public Properties getProperties​(CompomicsTools aTool, String aPropertiesFileName)
      Get a Properties instance for the parameter properties filename.
      Parameters:
      aTool - the name of the tool
      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 - 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 logger
      aCompomicsTools - The tool