|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.virtualweaver.xotics.dialect.xape.task.XapAbstractTask
This this an abstract implementation of XapTask, which contains base code common to any XAP Task implementations and a useful method to retrieve arguments.
Field Summary | |
protected java.lang.String |
taskLocation
this String is included in the message of a XapException to identify the task. |
Constructor Summary | |
XapAbstractTask()
|
Method Summary | |
java.lang.String |
getArgument(XapRuntimeEnvironment env,
java.lang.String argKey,
boolean mandatory)
returns argument value. |
java.lang.String |
getId()
Getter for property ID |
void |
init(XapRuntimeEnvironment env)
does nothing |
abstract void |
process(XapRuntimeEnvironment env)
This method performs any specific processing, with help of the application instance runtime environment. |
void |
setArguments(java.util.Map map)
stores arguments map |
void |
setId(java.lang.String id)
setter for property ID. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String taskLocation
Constructor Detail |
public XapAbstractTask()
Method Detail |
public void setId(java.lang.String id)
id
- Id valuepublic java.lang.String getId()
getId
in interface XapProcessable
XapProcessable.getId()
public void init(XapRuntimeEnvironment env) throws XapException
init
in interface XapTask
env
- XAPE runtime env
XapException
XapTask.init(com.virtualweaver.xotics.dialect.xape.engine.XapRuntimeEnvironment)
public abstract void process(XapRuntimeEnvironment env) throws XapException
XapProcessable
process()
method of its XapProcessable
children.
process
in interface XapProcessable
env
- the application instance runtime environment
XapException
- for any processing error occurrencepublic void setArguments(java.util.Map map) throws XapException
setArguments
in interface XapTask
map
- a map containing couples of name/value as strings
XapException
XapTask.setArguments(java.util.Map)
public java.lang.String getArgument(XapRuntimeEnvironment env, java.lang.String argKey, boolean mandatory) throws XapException
env
- XAPE runtime envargKey
- argument keymandatory
- if true, throws XapException when argument is not found.
Has no effect if false
XapException
- if param mandatory is true when argument is not found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |