org.eigenbase.util.property
Class PersistentStringProperty

java.lang.Object
  extended by org.eigenbase.util.property.Property
      extended by org.eigenbase.util.property.StringProperty
          extended by org.eigenbase.util.property.PersistentStringProperty

public class PersistentStringProperty
extends StringProperty

Definition and accessor for a string property that is capable of storing itself in a .properties file.

Since:
December 3, 2004
Version:
$Id: //open/dt/dev/farrago/src/org/eigenbase/util/property/PersistentStringProperty.java#6 $
Author:
Stephan Zuercher

Field Summary
 
Fields inherited from class org.eigenbase.util.property.Property
properties
 
Constructor Summary
PersistentStringProperty(java.util.Properties properties, java.lang.String path, java.lang.String defaultValue, StringProperty propertyFileLocation)
          Creates a persistent string property.
 
Method Summary
 void set(java.lang.String value)
          Sets the value of this property.
 
Methods inherited from class org.eigenbase.util.property.StringProperty
get, get, get
 
Methods inherited from class org.eigenbase.util.property.Property
addTrigger, booleanValue, getDefaultValue, getInternal, getPath, getString, isSet, onChange, removeTrigger, setString, stringValue, toBoolean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentStringProperty

public PersistentStringProperty(java.util.Properties properties,
                                java.lang.String path,
                                java.lang.String defaultValue,
                                StringProperty propertyFileLocation)
Creates a persistent string property.

Parameters:
properties - Properties object which holds values for this property.
path - Name by which this property is serialized to a properties file, for example "com.acme.trace.Verbosity".
defaultValue - Default value, null if there is no default.
propertyFileLocation - Location of the property file where this property's value should be persisted.
Method Detail

set

public void set(java.lang.String value)
Sets the value of this property. This method is synchronized to prevent multiple threads from attempting to initialize the property storage (storage) simultaneously.

Overrides:
set in class StringProperty