org.writersforge.catalan.process.properties
Class CommonProperties

java.lang.Object
  extended byorg.writersforge.catalan.process.properties.BaseWorkProperties
      extended byorg.writersforge.catalan.process.properties.ChainedProperties
          extended byorg.writersforge.catalan.process.properties.CommonProperties
All Implemented Interfaces:
IWorkProperties
Direct Known Subclasses:
IoProperties, JavaBeanProperties, PartitionProperties, QueueProperties, SqlProperties, TextProperties, VelocityProperties, XmlCommonProperties

public class CommonProperties
extends ChainedProperties
implements IWorkProperties

IWorkProperties wrapper to add accessors for universally used properties.

Author:
jsheets

Constructor Summary
CommonProperties(IWorkProperties baseProps)
          Creates a new instance of CommonProperties.
 
Method Summary
 java.lang.String getCommand()
          Retrieves the value of the "command" property.
 int getCount(int defaultValue)
          Retrieves the value of the "count" property.
 int getEndIndex(int defaultValue)
          Retrieves the value of the "end-index" property.
 int getStartIndex(int defaultValue)
          Retrieves the value of the "start-index" property.
 
Methods inherited from class org.writersforge.catalan.process.properties.ChainedProperties
addPropertySet, getProperty, getPropertyNames, getPropertySets, toString
 
Methods inherited from class org.writersforge.catalan.process.properties.BaseWorkProperties
asMap, asMap, getPropertyAsBoolean, getPropertyAsDatum, getPropertyAsMap, getPropertyAsNumber, getPropertyAsString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.writersforge.catalan.process.properties.IWorkProperties
getProperty, getPropertyAsBoolean, getPropertyAsDatum, getPropertyAsMap, getPropertyAsNumber, getPropertyAsString, getPropertyNames
 

Constructor Detail

CommonProperties

public CommonProperties(IWorkProperties baseProps)
Creates a new instance of CommonProperties.

Parameters:
baseProps - properties to wrap
Method Detail

getCommand

public java.lang.String getCommand()
Retrieves the value of the "command" property.

Returns:
the "separator" property

getCount

public int getCount(int defaultValue)
Retrieves the value of the "count" property. This property specifies the number of iterations to perform. The exact interpretation of this property may differ between IWorker implementations.

Parameters:
defaultValue - value to return if property is not set
Returns:
value of property

getStartIndex

public int getStartIndex(int defaultValue)
Retrieves the value of the "start-index" property. This property specifies the index of the first node in the queue to start processing. Negative values count backwards from the end, e.g., an index of -1 is the last node, and -2 is the second to last.

Parameters:
defaultValue - value to return if property is not set
Returns:
value of property

getEndIndex

public int getEndIndex(int defaultValue)
Retrieves the value of the "end-index" property. This property specifies the index of the last node in the queue to process. Negative values count backwards from the end, e.g., an index of -1 is the last node, and -2 is the second to last.

Parameters:
defaultValue - value to return if property is not set
Returns:
value of property