Class PropertiesHelper

java.lang.Object
be.gaudry.model.config.PropertiesHelper

public class PropertiesHelper extends Object
Helps to use the Properties. Provided by the broldev.core.model project.
Since:
1.0 Jun 30, 2008, broldev.core.model 0.0.1-SNAPSHOT dependency
Version:
1.0 Jun 30, 2008
Author:
Steph GAUDRY
See Also:
RememberHelper(to use also specific operating system user properties)
  • Field Details

  • Constructor Details

    • PropertiesHelper

      public PropertiesHelper(String propertiesFilePath)
      Builds a PropertiesHelper with a dot separated path.
      Parameters:
      propertiesFilePath -
    • PropertiesHelper

      public PropertiesHelper()
      Builds a PropertiesHelper with a default path.
  • Method Details

    • getComments

      public String getComments()
      Comments to put on the top of the property file.
      Returns:
      the comments
    • setComments

      public void setComments(String comments)
      Parameters:
      comments - the comments to set
      See Also:
      getComments()
    • saveProperties

      public boolean saveProperties(Properties props)
      Saves the property file in the selected path See the logging information to know how the logging is implemented.
      Parameters:
      props - properties to save
      Returns:
      true if the properties have been saved.
    • loadProperties

      public Properties loadProperties()
      Reads a property file at the selected location. In case of FileNotFoundException or IOException, returns an empty Properties. See the logging information to know how the logging is implemented.
      Returns:
      loaded Properties
    • debugProperties

      public void debugProperties(Properties props)
      Outputs each key/value pair on the logger with a debug level See the logging information to know how the logging is implemented.
      Parameters:
      props - properties to debug