net.aerith.misao.util
Class MultiTaskOperation

java.lang.Object
  |
  +--net.aerith.misao.util.OperationObservable
        |
        +--net.aerith.misao.util.Operation
              |
              +--net.aerith.misao.util.MultiTaskOperation
Direct Known Subclasses:
BatchExaminationOperation, HtmlImageGalleryOperation, ImageConversionOperation, RecordSearchOperation, ReportBatchOperation

public abstract class MultiTaskOperation
extends Operation

The MultiTaskOperation represents a multi task operation on several objects.


Field Summary
protected  MultiTaskConductor conductor
          The conductor of multi task operation.
 
Fields inherited from class net.aerith.misao.util.Operation
monitor_set, stopped
 
Fields inherited from class net.aerith.misao.util.OperationObservable
observer_list
 
Constructor Summary
MultiTaskOperation()
           
 
Method Summary
protected  void operate()
          Operates.
abstract  void operate(java.lang.Object object)
          Operates on one item.
 boolean ready()
          Returns true if the operation is ready to start.
abstract  int showSettingDialog()
          Shows the dialog to set parameters.
 
Methods inherited from class net.aerith.misao.util.Operation
addMonitor, isStopped, perform, run, stop
 
Methods inherited from class net.aerith.misao.util.OperationObservable
addObserver, deleteObserver, notifyEnd, notifyFailed, notifyStart, notifySucceeded, notifyWarned
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

conductor

protected MultiTaskConductor conductor
The conductor of multi task operation.
Constructor Detail

MultiTaskOperation

public MultiTaskOperation()
Method Detail

showSettingDialog

public abstract int showSettingDialog()
Shows the dialog to set parameters.
Returns:
0 if OK button is pushed, or 2 if Cancel button is pushed.

ready

public boolean ready()
Returns true if the operation is ready to start.
Overrides:
ready in class Operation
Returns:
true if the operation is ready to start.

operate

protected void operate()
                throws java.lang.Exception
Operates.
Overrides:
operate in class Operation
Throws:
java.lang.Exception - if an error occurs.

operate

public abstract void operate(java.lang.Object object)
                      throws java.lang.Exception
Operates on one item. This is invoked from the conductor of multi task operation.
Parameters:
object - the target object to operate.
Throws:
java.lang.Exception - if an error occurs.