org.oddjob.values
Class SetJob
java.lang.Object
org.oddjob.framework.BaseComponent
org.oddjob.framework.BasePrimary
org.oddjob.framework.SimpleJob
org.oddjob.values.SetJob
- All Implemented Interfaces:
- Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful
public class SetJob
- extends SimpleJob
Description
A job which sets properties in other
jobs when it executes.Example
Setting lots of properties.
<oddjob>
<job>
<sequential>
<jobs>
<set>
<values>
<value key="check.checkBoolean" value="true"/>
<value key="check.checkByte" value="127"/>
<value key="check.checkChar" value="a"/>
<date key="check.checkDate" date="2005-12-25" timeZone="GMT"/>
<value key="check.checkDouble" value="9E99"/>
<value key="check.checkFloat" value="1.23"/>
<value key="check.checkInt" value="1234567"/>
<value key="check.checkLong" value="2345678"/>
<value key="check.checkShort" value="123"/>
<value key="check.checkString" value="hello"/>
</values>
</set>
<bean id="check" class="org.oddjob.values.CheckBasicSetters"/>
</jobs>
</sequential>
</job>
</oddjob>
This is the configuration for one
of the tests.
Methods inherited from class org.oddjob.framework.SimpleJob |
fireDestroyedState, force, getStateChanger, hardReset, onDestroy, onReset, onStop, run, sleep, softReset, stateHandler, stop |
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 |
SetJob
public SetJob()
setValues
public void setValues(String name,
ArooaValue value)
- Add a name value pair.
Property: values
Description: The thing to set on the property that is given by
the key of this mapped property.
Required: No, but pointless if not provided.
- Parameters:
name
- The name of the variable.value
- The runtime configurable for the value.
execute
protected int execute()
throws Exception
- Description copied from class:
SimpleJob
- Execute this job.
- Specified by:
execute
in class SimpleJob
- Returns:
- 0 if the job is complete, anything else otherwise.
- Throws:
Exception
- If the unexpected occurs.