org.oddjob.state
Class OrState
java.lang.Object
org.oddjob.framework.BaseComponent
org.oddjob.framework.BasePrimary
org.oddjob.framework.StructuralJob<Object>
org.oddjob.framework.SimultaneousStructural
org.oddjob.state.StateReflector
org.oddjob.state.OrState
- All Implemented Interfaces:
- Serializable, Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful, Stoppable, Structural
public class OrState
- extends StateReflector
Description
A job who's return state is a logical OR of the child states.
Example
COMPLETE if either files exist, INCOMPLETE otherwise.
<or:and xmlns:state="http://rgordon.co.uk/oddjob/state">
<jobs>
<exists file="doesntexist1">/>
<exists file="doesntexist2">/>
</jobs>
</or:and>
- See Also:
- Serialized Form
- Author:
- Rob Gordon
Methods inherited from class org.oddjob.framework.StructuralJob |
addStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, isStop, onDestroy, onReset, removeStructuralListener, run, softReset, stateHandler |
Methods inherited from class org.oddjob.framework.BaseComponent |
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSession |
OrState
public OrState()
getInitialStateOp
protected StateOperator getInitialStateOp()
- Description copied from class:
StructuralJob
- Subclasses must provide the
StateOperator
that will decide
how to evaluate the children's state.
- Specified by:
getInitialStateOp
in class StructuralJob<Object>
- Returns:
- A State Operator. Must not be null.