protoj.core
Class PropertyStore

java.lang.Object
  extended by protoj.core.PropertyStore

public final class PropertyStore
extends java.lang.Object

Responsible for managing the available properties. The property values can be obtained simply by querying the reference returned by getConfig().

Alternatively consider calling PropertyInfo.getValue(), which provides for customized default behavior. These info objects can be added by calling addInfo(String, String, String, String) and are used for example in ProtoJ help.

Author:
Ashley Williams

Constructor Summary
PropertyStore(CoreProject parent)
          Creates an instance with the owning project.
 
Method Summary
 PropertyInfo addInfo(java.lang.String key, java.lang.String missingDefault, java.lang.String emptyDefault, java.lang.String description)
          Convenience method that creates a PropertyInfo instance with the given arguments and adds it to this store.
 org.apache.commons.configuration.Configuration getConfig()
          The instance responsible for obtaining property values.
 PropertyInfo getInfo(java.lang.String key)
          Looks up the PropertyInfo with the given key.
 java.util.Collection<PropertyInfo> getInfos()
          Read-only access to the added PropertyInfo instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyStore

public PropertyStore(CoreProject parent)
Creates an instance with the owning project.

Parameters:
parent -
Method Detail

addInfo

public PropertyInfo addInfo(java.lang.String key,
                            java.lang.String missingDefault,
                            java.lang.String emptyDefault,
                            java.lang.String description)
Convenience method that creates a PropertyInfo instance with the given arguments and adds it to this store.

Parameters:
key -
missingDefault -
emptyDefault -
description -
Returns:

getInfos

public java.util.Collection<PropertyInfo> getInfos()
Read-only access to the added PropertyInfo instances.

Returns:

getInfo

public PropertyInfo getInfo(java.lang.String key)
Looks up the PropertyInfo with the given key.

Parameters:
key -
Returns:

getConfig

public org.apache.commons.configuration.Configuration getConfig()
The instance responsible for obtaining property values. See createConfig().

Returns: