org.writersforge.catalan.process.properties
Interface IWorkProperties

All Known Implementing Classes:
BaseWorkProperties, CommonProperties

public interface IWorkProperties

Configuration information for a single IWorker.

Author:
jsheets

Method Summary
 java.lang.Object getProperty(java.lang.String name)
          Retrieves the value of a named property.
 boolean getPropertyAsBoolean(java.lang.String name, boolean defaultValue)
          Retrieves the named property as a boolean; if the property exists but cannot be converted into a boolean, returns the default.
 org.writersforge.bellows.Datum getPropertyAsDatum(java.lang.String name, org.writersforge.bellows.Datum defaultValue)
          Retrieves the named property as a Datum; if the property cannot be converted into a Datum, returns the default.
 java.util.Map getPropertyAsMap(java.lang.String name, java.util.Map defaultValue)
          Retrieves the named property as a Map; if the property cannot be converted into a Map, returns the default.
 java.lang.Number getPropertyAsNumber(java.lang.String name, java.lang.Number defaultValue)
          Retrieves the named property as an Number; if the property exists but cannot be converted into an Number, returns the default.
 java.lang.String getPropertyAsString(java.lang.String name, java.lang.String defaultValue)
          Retrieves the named property as a String; if the property is not already a String, calls toString() on it before returning it.
 java.lang.String[] getPropertyNames()
          Retrieves the names of all properties currently set on this holder.
 

Method Detail

getPropertyNames

public java.lang.String[] getPropertyNames()
Retrieves the names of all properties currently set on this holder.

Returns:
array of all property names

getProperty

public java.lang.Object getProperty(java.lang.String name)
Retrieves the value of a named property.

Parameters:
name - property name
Returns:
the value of the property, or null if not set

getPropertyAsString

public java.lang.String getPropertyAsString(java.lang.String name,
                                            java.lang.String defaultValue)
Retrieves the named property as a String; if the property is not already a String, calls toString() on it before returning it.

Parameters:
name - the name of the property
defaultValue - value to return if property not found
Returns:
the String value of the property, or default if property not set

getPropertyAsNumber

public java.lang.Number getPropertyAsNumber(java.lang.String name,
                                            java.lang.Number defaultValue)
Retrieves the named property as an Number; if the property exists but cannot be converted into an Number, returns the default. The returned value can be any implementation of Number; which subclass it returns is up to the implementation of IWorkProperties.

Parameters:
name - the name of the property
defaultValue - value to return if property not found
Returns:
the Number value of the property, or default if property not set or cannot be coerced into a Number

getPropertyAsBoolean

public boolean getPropertyAsBoolean(java.lang.String name,
                                    boolean defaultValue)
Retrieves the named property as a boolean; if the property exists but cannot be converted into a boolean, returns the default. The property value can be a Boolean object, or an arbitrary Object whose toString() method resolves to "true" or "yes" for true, or to "false" or "no" for false.

Parameters:
name - the name of the property
defaultValue - value to return if property not found
Returns:
the Boolean value of the property, or default if property not set or cannot be coerced into a Boolean

getPropertyAsMap

public java.util.Map getPropertyAsMap(java.lang.String name,
                                      java.util.Map defaultValue)
Retrieves the named property as a Map; if the property cannot be converted into a Map, returns the default.

Parameters:
name - the name of the property
defaultValue - value to return if property not found
Returns:
the Map value of the property, or default if property not set or cannot be coerced into a Map

getPropertyAsDatum

public org.writersforge.bellows.Datum getPropertyAsDatum(java.lang.String name,
                                                         org.writersforge.bellows.Datum defaultValue)
Retrieves the named property as a Datum; if the property cannot be converted into a Datum, returns the default.

Parameters:
name - the name of the property
defaultValue - value to return if property not found
Returns:
the Datum value of the property, or default if property not set or cannot be coerced into a Datum