org.oddjob.input
Class InputJob
java.lang.Object
org.oddjob.framework.BaseComponent
org.oddjob.framework.BasePrimary
org.oddjob.framework.SimpleJob
org.oddjob.framework.SerializableJob
org.oddjob.values.properties.PropertiesJobBase
org.oddjob.input.InputJob
- All Implemented Interfaces:
- Serializable, Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful
public class InputJob
- extends PropertiesJobBase
Description
Ask for input from the user.
The medium with
which Oddjob asks for input will depend on how it's running. When
running in Oddjob Explorer a GUI dialogue will be used. When running
from the console, input from the console will be requested.
Example
Request lots of input.
<oddjob>
<job>
<sequential>
<jobs>
<input>
<requests>
<input-file prompt="Install Directory" default="/home/oddjob/foo" property="config.install"/>
<input-text prompt="System" default="Development" property="config.system"/>
<input-text prompt="Username" property="config.username"/>
<input-password prompt="Password" property="config.password"/>
<input-confirm prompt="Agree To Licence" default="false" property="config.agree"/>
</requests>
</input>
<check value="${config.agree}" eq="true"/>
<echo>Password for ${config.username} is ${config.password}</echo>
<input>
<requests>
<input-message>Logging On to ${config.system} Now!</input-message>
</requests>
</input>
</jobs>
</sequential>
</job>
</oddjob>
- See Also:
- Serialized Form
- Author:
- rob
Methods inherited from class org.oddjob.framework.BaseComponent |
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaSession |
InputJob
public InputJob()
execute
protected int execute()
- Description copied from class:
SimpleJob
- Execute this job.
- Specified by:
execute
in class SimpleJob
- Returns:
- 0 if the job is complete, anything else otherwise.
getInputHandler
public InputHandler getInputHandler()
setInputHandler
@Inject
public void setInputHandler(InputHandler inputHandler)
getRequests
public InputRequest getRequests(int index)
setRequests
public void setRequests(int index,
InputRequest request)
isOverride
protected boolean isOverride()
- Description copied from class:
PropertiesJobBase
- Are the properties override properties.
- Specified by:
isOverride
in class PropertiesJobBase
- Returns: