Package helma.util

Class SystemProperties

All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public final class SystemProperties extends Properties
A property dictionary that is updated from a property file each time the file is modified. It is also case insensitive.
See Also:
  • Constructor Details

    • SystemProperties

      public SystemProperties()
      Construct an empty properties object.
    • SystemProperties

      public SystemProperties(String filename)
      Construct a properties object from a properties file.
    • SystemProperties

      public SystemProperties(SystemProperties defaultProps)
      Contstruct a properties object with the given default properties.
    • SystemProperties

      public SystemProperties(String filename, SystemProperties defaultProps)
      Construct a properties object from a file name with the given default properties (ignoring case)
  • Method Details

    • lastModified

      public long lastModified()
      Return the modify-time of the underlying properties file.
    • update

      public void update()
      Update/re-read the properties from file if necessary.
    • getChecksum

      public long getChecksum()
      Return a checksum that changes when something in the properties changes.
    • getFile

      public File getFile()
      Get the properties file
      Returns:
      the properties file
    • addProps

      public void addProps(String key, InputStream in) throws IOException
      Similar to load(), but adds to the existing properties instead of discarding them.
      Throws:
      IOException
    • removeProps

      public void removeProps(String key)
      Remove an additional properties dictionary.
    • put

      public Object put(Object key, Object value)
      Specified by:
      put in interface Map<Object,Object>
      Overrides:
      put in class Properties
    • get

      public Object get(Object key)
      Overrides method to act on the wrapped properties object.
      Specified by:
      get in interface Map<Object,Object>
      Overrides:
      get in class Properties
    • remove

      public Object remove(Object key)
      Overrides method to act on the wrapped properties object.
      Specified by:
      remove in interface Map<Object,Object>
      Overrides:
      remove in class Properties
    • contains

      public boolean contains(Object obj)
      Overrides method to act on the wrapped properties object.
      Overrides:
      contains in class Properties
    • containsKey

      public boolean containsKey(Object key)
      Overrides method to act on the wrapped properties object.
      Specified by:
      containsKey in interface Map<Object,Object>
      Overrides:
      containsKey in class Properties
    • isEmpty

      public boolean isEmpty()
      Overrides method to act on the wrapped properties object.
      Specified by:
      isEmpty in interface Map<Object,Object>
      Overrides:
      isEmpty in class Properties
    • getProperty

      public String getProperty(String name)
      Overrides method to act on the wrapped properties object.
      Overrides:
      getProperty in class Properties
    • getProperty

      public String getProperty(String name, String defaultValue)
      Overrides method to act on the wrapped properties object.
      Overrides:
      getProperty in class Properties
    • keys

      public Enumeration keys()
      Overrides method to act on the wrapped properties object.
      Overrides:
      keys in class Properties
    • keySet

      public Set keySet()
      Overrides method to act on the wrapped properties object.
      Specified by:
      keySet in interface Map<Object,Object>
      Overrides:
      keySet in class Properties
    • elements

      public Enumeration elements()
      Overrides method to act on the wrapped properties object.
      Overrides:
      elements in class Properties
    • size

      public int size()
      Overrides method to act on the wrapped properties object.
      Specified by:
      size in interface Map<Object,Object>
      Overrides:
      size in class Properties
    • toString

      public String toString()
      Overrides method to act on the wrapped properties object.
      Overrides:
      toString in class Properties
    • setIgnoreCase

      public void setIgnoreCase(boolean ignore)
      Turns case sensitivity for keys in this Map on or off.
    • isIgnoreCase

      public boolean isIgnoreCase()
      Returns true if this property map ignores key case