org.schmant.task.meta
Class RecursiveActionTask
java.lang.Object
org.schmant.support.AbstractArgumentChecker
org.schmant.task.stub.AbstractTask<T>
org.schmant.task.stub.AbstractActionTask<T>
org.schmant.task.stub.AbstractCallbackRecursiveActionTask<RecursiveActionTask>
org.schmant.task.meta.RecursiveActionTask
- All Implemented Interfaces:
- TaskDependency, ActionTaskConfigurable<RecursiveActionTask>, ActionTaskSpec<RecursiveActionTask>, LoggingConfigurable<RecursiveActionTask>, SourceConfigurable<RecursiveActionTask>, SourceConfigured, RecursiveActionTaskConfigurable<RecursiveActionTask>, RecursiveActionTaskSpec<RecursiveActionTask>, Task, TaskRunnable, TaskSpecification<RecursiveActionTask>
public final class RecursiveActionTask
- extends AbstractCallbackRecursiveActionTask<RecursiveActionTask>
See RecursiveActionTF
- Since:
- 0.5
- Author:
- Karl Gustafsson
- Task_package:
- org.schmant.task.base
Methods inherited from class org.schmant.task.stub.AbstractTask |
cancel, createTask, getDefaultLogFooter, getDefaultLogHeader, getDependencyObservable, getFailureCause, getLogFooter, getLogHeader, getSatisfiedStateLock, getThis, isCancelled, isDone, isInterrupted, isRunning, isSatisfied, isSuccessful, run, setLogFooter, setLogHeader, setReportLevel, setTraceLogging |
runTask
protected void runTask(Report r,
Task t)
validate
protected Collection<String> validate(Report r)
- Description copied from class:
AbstractActionTask
- Override the method inherited from
AbstractTask
to give a validation
error if no source is set (and AbstractActionTask.isSourcesMandatory()
is true
).
Subclasses may override this to add their own validations.
- Overrides:
validate
in class AbstractActionTask<RecursiveActionTask>
- Parameters:
r
- A report to log warning and debug messages to. Validation errors
should not be logged, though. They are logged later.
- Returns:
- A collection of error messages.
callback
protected void callback(Report r,
EntityView ev,
RelativeLocation rel)
- Description copied from class:
AbstractCallbackRecursiveActionTask
- This method is called for each entity returned when iterating over the
sources.
- Specified by:
callback
in class AbstractCallbackRecursiveActionTask<RecursiveActionTask>
- Parameters:
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.
getDependencyForTasksScheduledByThisTask
public TaskDependency getDependencyForTasksScheduledByThisTask()
- Description copied from class:
AbstractTask
- This implementation returns
this
. Subclasses that use
TaskExecutor
:s must override this method to
return a dependency object for all of its scheduled tasks.
- Specified by:
getDependencyForTasksScheduledByThisTask
in interface Task
- Overrides:
getDependencyForTasksScheduledByThisTask
in class AbstractTask<RecursiveActionTask>
- Returns:
this
copyProperties
public void copyProperties(RecursiveActionTask spec)
- Description copied from class:
AbstractActionTask
- Override the implementation from
AbstractTask
to copy the
source properties. Subclasses must override this to copy their own
properties.
- Specified by:
copyProperties
in interface TaskSpecification<RecursiveActionTask>
- Overrides:
copyProperties
in class AbstractCallbackRecursiveActionTask<RecursiveActionTask>
- Parameters:
spec
- The specification to copy properties to.
toString
public String toString()
- Description copied from class:
AbstractTask
- Default implementation for tasks. Task implementations may override this.
It is used in the default log header that is written (level INFO) before
a task is run.
This implementation just returns the class name.
- Overrides:
toString
in class AbstractActionTask<RecursiveActionTask>