|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.writersforge.catalan.process.workers.BaseMetadataHolder
Minimal implementation of IWorker interface. Includes metadata and default properties, but not the process() method.
BaseWorker| Constructor Summary | |
BaseMetadataHolder(IWorkMetadata metadata)
Creates a new instance of BaseWorker with full metadata. |
|
BaseMetadataHolder(java.lang.String name,
java.lang.String description)
Creates a new instance of BaseWorker with no property metadata. |
|
BaseMetadataHolder(java.lang.String name,
java.lang.String description,
PropertyInfo[] required,
OptionalPropertyInfo[] optional)
Creates a new instance of BaseWorker with no property metadata. |
|
| Method Summary | |
IWorkMetadata |
getMetadata()
Retrieves metadata associated with this object. |
protected void |
setOptionalProperties(OptionalPropertyInfo[] info)
Assigns metadata for all optional properties in this command. |
protected void |
setRequiredProperties(PropertyInfo[] info)
Assigns metadata for all required properties in this command. |
void |
validateProperties(IWorkProperties props,
boolean required)
Validate properties against IWorkMetadata. |
void |
validateType(PropertyInfo info,
java.lang.String name,
java.lang.Object value)
Make sure property type matches any of the required types. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BaseMetadataHolder(java.lang.String name,
java.lang.String description)
name - name of associated objectdescription - user-friendly description of associated object
public BaseMetadataHolder(java.lang.String name,
java.lang.String description,
PropertyInfo[] required,
OptionalPropertyInfo[] optional)
name - name of associated objectdescription - user-friendly description of associated objectrequired - property info for all required propertiesoptional - property info for all optional propertiespublic BaseMetadataHolder(IWorkMetadata metadata)
metadata - metadata for associated object| Method Detail |
public IWorkMetadata getMetadata()
getMetadata in interface IMetadataHolder
protected final void setRequiredProperties(PropertyInfo[] info)
throws MetadataException
info - property metadata
MetadataException - if unable to assign new required properties
protected final void setOptionalProperties(OptionalPropertyInfo[] info)
throws MetadataException
info - property metadata
MetadataException - if unable to assign new required properties
public void validateProperties(IWorkProperties props,
boolean required)
throws WorkPropertyException
validateProperties in interface IMetadataHolderprops - properties to validaterequired - true if property must be contain a non-null value
WorkPropertyException - if properties fail to match constraints
public void validateType(PropertyInfo info,
java.lang.String name,
java.lang.Object value)
throws WorkPropertyException
validateType in interface IMetadataHolderinfo - property metadataname - property namevalue - property value
WorkPropertyException - if property value is not valid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||