|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.support.AbstractArgumentChecker
org.schmant.task.stub.AbstractTask<T>
org.schmant.task.stub.AbstractActionTask<T>
org.schmant.task.stub.AbstractCallbackRecursiveActionTask<T>
public abstract class AbstractCallbackRecursiveActionTask<T extends RecursiveActionTaskSpec<T>>
This is an abstract base class for recursive action task
implementations. The runInternal(Report)
method iterates over all
sources recursively and calls the
callback(Report, EntityView, RelativeLocation)
for each returned
entity.
This class interprets the sources property using
InterpretAsDirectoryStrategy
.
Constructor Summary | |
---|---|
AbstractCallbackRecursiveActionTask()
|
Method Summary | |
---|---|
protected abstract void |
callback(Report r,
EntityView ev,
RelativeLocation rel)
This method is called for each entity returned when iterating over the sources. |
void |
copyProperties(T spec)
Override the implementation from AbstractTask to copy the
source properties. |
protected boolean |
isDisableHeaderLogging()
|
protected boolean |
isMoreThanOneSourceAllowed()
This is overridden to return true . |
protected void |
runInternal(Report r)
Iterates recursively over all sources (interpreted by InterpretAsDirectoryStrategy ) and calls the
callback(Report, EntityView, RelativeLocation) method for each
returned entity. |
T |
setDepthFirstIterator(boolean b)
Should a depth first iterator be used? |
T |
setDisableHeaderLogging(boolean b)
Should logging for nested tasks be disabled? |
Methods inherited from class org.schmant.task.stub.AbstractActionTask |
---|
addSource, addSources, clearSources, getRelativeToBase, getSource, getSources, isSourcesMandatory, setRelativeToBase, setSource, setSources, toString, validate |
Methods inherited from class org.schmant.task.stub.AbstractTask |
---|
cancel, createTask, getDefaultLogFooter, getDefaultLogHeader, getDependencyForTasksScheduledByThisTask, getDependencyObservable, getFailureCause, getLogFooter, getLogHeader, getSatisfiedStateLock, getThis, isCancelled, isDone, isInterrupted, isRunning, isSatisfied, isSuccessful, run, setLogFooter, setLogHeader, setReportLevel, setTraceLogging |
Methods inherited from class org.schmant.support.AbstractArgumentChecker |
---|
check, check, check, check |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.schmant.task.TaskSpecification |
---|
createTask |
Methods inherited from interface org.schmant.task.confable.LoggingConfigurable |
---|
setLogFooter, setLogHeader, setReportLevel, setTraceLogging |
Methods inherited from interface org.schmant.task.confable.SourceConfigured |
---|
getSource, getSources |
Methods inherited from interface org.schmant.task.confable.SourceConfigurable |
---|
addSource, addSources, clearSources, setRelativeToBase, setSource, setSources |
Constructor Detail |
---|
public AbstractCallbackRecursiveActionTask()
Method Detail |
---|
public final T setDepthFirstIterator(boolean b)
RecursiveActionTaskConfigurable
setDepthFirstIterator
in interface RecursiveActionTaskConfigurable<T extends RecursiveActionTaskSpec<T>>
b
- true
if a depth first iterator should be used.
this
public final T setDisableHeaderLogging(boolean b)
RecursiveActionTaskConfigurable
By default, logging is disabled.
setDisableHeaderLogging
in interface RecursiveActionTaskConfigurable<T extends RecursiveActionTaskSpec<T>>
b
- true
if logging for nested tasks should be disabled.
this
protected final boolean isDisableHeaderLogging()
protected abstract void callback(Report r, EntityView ev, RelativeLocation rel)
r
- The current report.ev
- The entity.rel
- The entity's location, relative to the source it was returned
from. If the source object was a file, the relative location is the
file's name.protected boolean isMoreThanOneSourceAllowed()
true
.
isMoreThanOneSourceAllowed
in class AbstractActionTask<T extends RecursiveActionTaskSpec<T>>
false
, alwaysprotected final void runInternal(Report r)
InterpretAsDirectoryStrategy
) and calls the
callback(Report, EntityView, RelativeLocation)
method for each
returned entity.
runInternal
in class AbstractTask<T extends RecursiveActionTaskSpec<T>>
r
- The current thread's Report
.public void copyProperties(T spec)
AbstractActionTask
AbstractTask
to copy the
source properties. Subclasses must override this to copy their own
properties.
copyProperties
in interface TaskSpecification<T extends RecursiveActionTaskSpec<T>>
copyProperties
in class AbstractActionTask<T extends RecursiveActionTaskSpec<T>>
spec
- The specification to copy properties to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |