|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.writersforge.catalan.process.workers.BaseMetadataHolder
org.writersforge.catalan.process.workers.BaseJob
Base implementation of BaseJob API. All BaseJob properties are passed into embedded IWorker objects as runtime or IWorkspace properties. However, properties of embedded Workers are not reflected in the properties of the owning BaseJob. When BaseJob.init() is called, the same init properties will be passed into each embedded IWorker.
| Constructor Summary | |
BaseJob(IWorkMetadata metadata)
Creates a new instance of BaseJob. |
|
| Method Summary | |
IWorkProperties |
getDefaultProperties()
Retrieves the default properties for this IWorker. |
protected IWorkProperties[] |
getWorkerRuntimeProperties()
Retrieves customized runtime properties for each IWorker returned in getWorkers(). |
abstract IWorker[] |
getWorkers()
Retrieves all embedded Workers associated with this BaseJob, in the order they will run for this BaseJob. |
void |
process(IWorkProperties runtimeProps,
IWorkspace workspace)
Perform one stage of processing in the workspace. |
void |
setDefaultProperties(IWorkProperties defaultProps)
Initializes IWorker with default properties. |
| Methods inherited from class org.writersforge.catalan.process.workers.BaseMetadataHolder |
getMetadata, setOptionalProperties, setRequiredProperties, validateProperties, validateType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.writersforge.catalan.process.workers.IMetadataHolder |
getMetadata, validateProperties, validateType |
| Constructor Detail |
public BaseJob(IWorkMetadata metadata)
metadata - metadata describing this job implementation| Method Detail |
public IWorkProperties getDefaultProperties()
getDefaultProperties in interface IWorker
public void setDefaultProperties(IWorkProperties defaultProps)
throws WorkPropertyException
setDefaultProperties in interface IWorkerdefaultProps - default initialization data
WorkPropertyException - if any given config parameters are invalid
for any embedded IWorker, or if init() is called from inside
process()public abstract IWorker[] getWorkers()
process() method will
run on each IWorker, using the runtime properties passed into
BaseJob.process() merged with the runtime properties for
each IWorker from getWorkerRuntimeProperties().
protected IWorkProperties[] getWorkerRuntimeProperties()
getWorkers(). The arrays returned by these two methods
must be the same size and contain no nulls. The BaseJob will pass the
runtime properties into each IWorker.process() method.
By default, returns EmptyProperties for all workers.
public void process(IWorkProperties runtimeProps,
IWorkspace workspace)
throws ProcessException
process() method can be called many times for a single
IWorker instance throughout a processing run; state should not be cached
between process() invocations.
This implementation calls process() on each of its
embedded IWorker objects, in the same order they appear in
getWorkers(). The BaseJob assembles runtime properties for
each IWorker in the following order of precedence:
process in interface IWorkerruntimeProps - extra runtime parametersworkspace - processing environment
ProcessException - if a fatal error occurs during processing;
throws WorkPropertyException if any mandatory parameters are
missing, or if any supplied parameters are invalid; throws
ProcessException if arrays returned by getWorkers() and
getRuntimeWorkerProperties() are null or do not match lengths
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||