|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.lightest.core.LightestContextAware
com.googlecode.lightest.core.LightestTask
public abstract class LightestTask
A convenient base class for implementations of ITask.
| Field Summary | |
|---|---|
protected TaskNode |
config
|
protected ITaskResult |
parentResult
|
protected ITaskResult |
taskResult
|
| Constructor Summary | |
|---|---|
LightestTask()
|
|
| Method Summary | |
|---|---|
protected Set |
configurableProperties()
Returns a Set of this class' bean property name String's that can be automatically set based on the TaskNode passed to the configure() method. |
void |
configure(TaskNode config,
ITaskResult parentResult)
Configures the task by making member variables available to concrete subclasses, and automatically setting configurable bean properties. |
abstract void |
doPerform(ITaskResult result)
Concrete subclasses must implement this method, which is wrapped by the perform() method. |
TaskNodeBuilder |
getBuilder()
Returns the builder this task provider uses to create task nodes to be sent for dispatch. |
String |
getDescription()
Returns a user supplied description of the task instance, its purpose, etc. |
groovy.lang.MetaClass |
getMetaClass()
|
String |
getName()
Returns the name of this task, which is the binary name of the class. |
Map |
getParams()
Returns a new Map of names to values of the paremeters to the task. |
Object |
getProperty(String name)
|
String |
getShortName()
Returns the short name of the task, which is the unqualified class name. |
Object |
getValue()
Returns the value set as the node value in the configuration. |
Object |
invokeMethod(String name,
Object args)
|
boolean |
isBreakpoint()
Returns true if this task has its breakpoint set, and false otherwise. |
ITaskResult |
perform()
Performs the task in an environment, and returns the result. |
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
void |
setProperty(String name,
Object value)
|
| Methods inherited from class com.googlecode.lightest.core.LightestContextAware |
|---|
getContext, getDispatcher, getEnv, getPrefs, setDispatcher |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.googlecode.lightest.core.ITask |
|---|
setDispatcher |
| Field Detail |
|---|
protected TaskNode config
protected ITaskResult parentResult
protected ITaskResult taskResult
| Constructor Detail |
|---|
public LightestTask()
| Method Detail |
|---|
protected Set configurableProperties()
public void configure(TaskNode config,
ITaskResult parentResult)
configure in interface ITaskconfig - parentResult - the result of performing the parent task. May be
null if this task has no parent.public String getName()
getName in interface ITaskpublic String getShortName()
getShortName in interface ITaskpublic String getDescription()
ITask
getDescription in interface ITaskpublic Map getParams()
ITask
getParams in interface ITaskpublic Object getValue()
ITask
getValue in interface ITaskpublic boolean isBreakpoint()
IBreakpointTask
isBreakpoint in interface IBreakpointTaskpublic abstract void doPerform(ITaskResult result)
result - the result which will be returned by the outer call to
perform().public ITaskResult perform()
perform in interface ITaskpublic TaskNodeBuilder getBuilder()
ITaskProvider
getBuilder in interface ITaskProviderpublic groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectgetMetaClass in class LightestContextAwarepublic void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass in interface groovy.lang.GroovyObjectsetMetaClass in class LightestContextAware
public Object invokeMethod(String name,
Object args)
invokeMethod in interface groovy.lang.GroovyObjectinvokeMethod in class LightestContextAwarepublic Object getProperty(String name)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class LightestContextAware
public void setProperty(String name,
Object value)
setProperty in interface groovy.lang.GroovyObjectsetProperty in class LightestContextAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||