org.writersforge.catalan.process.commands
Class BaseCommandWorker

java.lang.Object
  extended byorg.writersforge.catalan.process.workers.BaseMetadataHolder
      extended byorg.writersforge.catalan.process.workers.BaseWorker
          extended byorg.writersforge.catalan.process.commands.BaseCommandWorker
All Implemented Interfaces:
IMetadataHolder, IWorker
Direct Known Subclasses:
HtmlWorker, IoWorker, JavaBeanWorker, TextWorker, XmlWorker

public abstract class BaseCommandWorker
extends BaseWorker

BaseWorker extension with support for the ICommand interface.

Author:
jsheets

Constructor Summary
BaseCommandWorker()
           
 
Method Summary
protected  void doWork()
          Core executor for descendents of BaseWorker.
protected abstract  ICommand[] getCommands()
          Retrieves all command objects for this worker.
 
Methods inherited from class org.writersforge.catalan.process.workers.BaseWorker
getActiveNodes, getActiveQueue, getDefaultProperties, getRuntimeProperties, getWorkspace, handleErrorProblem, handleFatalProblem, handleInfoProblem, handleWarningProblem, isProcessing, process, setDefaultProperties, setTerminalPriority
 
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

BaseCommandWorker

public BaseCommandWorker()
Method Detail

getCommands

protected abstract ICommand[] getCommands()
                                   throws MetadataException
Retrieves all command objects for this worker.

Returns:
worker commands
Throws:
MetadataException - if unable to initialize metadata

doWork

protected void doWork()
               throws ProcessException
Core executor for descendents of BaseWorker. The process() method sets up the in-process properties, then calls into this method.

Specified by:
doWork in class BaseWorker
Throws:
ProcessException - if a fatal error occurs during processing