org.umber.catalan.process.workers
Interface IMetadataHolder

All Known Subinterfaces:
ICommand, IWorker
All Known Implementing Classes:
BaseCommand, BaseJob, BaseMetadataHolder, BaseWorker

public interface IMetadataHolder

Interface for accessing an object's metadata.

Author:
jsheets

Method Summary
 IWorkMetadata getMetadata()
          Retrieves metadata associated with this object.
 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.
 

Method Detail

getMetadata

public IWorkMetadata getMetadata()
Retrieves metadata associated with this object.

Returns:
worker metadata

validateProperties

public void validateProperties(IWorkProperties props,
                               boolean required)
                        throws WorkPropertyException
Validate properties against IWorkMetadata.

Parameters:
props - properties to validate
required - true if property must be contain a non-null value
Throws:
WorkPropertyException - if properties fail to match constraints

validateType

public void validateType(PropertyInfo info,
                         java.lang.String name,
                         java.lang.Object value)
                  throws WorkPropertyException
Make sure property type matches any of the required types.

Parameters:
info - property metadata
name - property name
value - property value
Throws:
WorkPropertyException - if property value is not valid