pfg.gca
Class PersistProps
java.lang.Object
|
+--pfg.gca.PersistProps
- public class PersistProps
- extends java.lang.Object
Manage properties in a property file rather than in memory.
This class's intent is to persist user perferences. The
preferences are read from storage when this class is instantiated
and written back to storage with each property set.
The filename is determined by BaseFilename
. The
directory is determined by the user.home system
property.
Field Summary |
static java.lang.String |
BaseFilename
Base filename for property file - currently "gca.properties". |
Constructor Summary |
PersistProps()
Read properties from a file if they exist. |
Method Summary |
java.lang.String |
getProperty(java.lang.String propName)
|
java.util.Enumeration |
propertyNames()
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Each set invokes the persistence mechanism. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseFilename
public static final java.lang.String BaseFilename
- Base filename for property file - currently "gca.properties".
PersistProps
public PersistProps()
- Read properties from a file if they exist.
The filename is determined by
BaseFilename
. The
directory is determined by the user.home system
property.
getProperty
public java.lang.String getProperty(java.lang.String propName)
propertyNames
public java.util.Enumeration propertyNames()
setProperty
public void setProperty(java.lang.String name,
java.lang.String value)
- Each set invokes the persistence mechanism.
- Parameters:
name
- name of property to persistvalue
- value of property to persist
Generated: February 24 2005