Class PropertyUtils

java.lang.Object
com.atlassian.crowd.util.PropertyUtils

public class PropertyUtils extends Object
PropertyUtils class to enable the writing back of Properties
  • Constructor Details

    • PropertyUtils

      public PropertyUtils()
  • Method Details

    • getProperties

      public Properties getProperties(String propertyResourceLocation)
      Retrieves the properties from the specified properties file
      Parameters:
      propertyResourceLocation - location of the properties file
      Returns:
      Properties retrieved from the properties file specified
    • getPropertiesFromStream

      public Properties getPropertiesFromStream(InputStream is)
      Loads Properties from an InputStream
      Parameters:
      is - InputStream containing properties to load
      Returns:
      Properties loaded from input stream
    • removeProperty

      public boolean removeProperty(String propertyResourceLocation, String key)
      Removes the specified property from the specified property file
      Parameters:
      propertyResourceLocation - location of the properties file. This location is assumed to be a safe file path.
      key - the key of the property to be removed
      Returns:
      true iff the specified property has been successfully removed from the properties file; false otherwise
    • updateProperty

      public void updateProperty(String propertyResourceLocation, String key, String value)
      Updates the specified properties file with the specified key/value property
      Parameters:
      propertyResourceLocation - location of the properties file. This location is assumed to be a safe file path.
      key - the key for the property to be added/updated
      value - the value of the property to be added/updated