org.schmant.task.tp.taskref
Class SchmantTaskrefTask

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.task.stub.AbstractTask<T>
          extended by org.schmant.task.stub.AbstractActionTask<T>
              extended by org.schmant.task.stub.AbstractProcessTask<SchmantTaskrefTask>
                  extended by org.schmant.task.tp.taskref.SchmantTaskrefTask
All Implemented Interfaces:
TaskDependency, ActionTaskConfigurable<SchmantTaskrefTask>, ActionTaskSpec<SchmantTaskrefTask>, LoggingConfigurable<SchmantTaskrefTask>, OverwriteConfigurable<SchmantTaskrefTask>, SourceConfigurable<SchmantTaskrefTask>, SourceConfigured, TargetConfigurable<SchmantTaskrefTask>, TargetConfigured, GeneratorTaskConfigurable<SchmantTaskrefTask>, GeneratorTaskSpec<SchmantTaskrefTask>, ProcessTaskConfigurable<SchmantTaskrefTask>, ProcessTaskSpec<SchmantTaskrefTask>, Task, TaskRunnable, TaskSpecification<SchmantTaskrefTask>

public final class SchmantTaskrefTask
extends AbstractProcessTask<SchmantTaskrefTask>

Task for building Schmant task package reference documentation.

Since:
0.8
Author:
Karl Gustafsson
Task_package:
org.schmant.task.taskpackage

Field Summary
static String DEFAULT_TRANSFORMER_FACTORY_CLASS_NAME
           
static String DEFAULT_URL_FOR_API_DOCS
           
static String DEFAULT_URL_FOR_STYLESHEET
           
 
Fields inherited from interface org.schmant.task.confable.OverwriteConfigurable
DEFAULT_OVERWRITE_STRATEGY
 
Method Summary
 void copyProperties(SchmantTaskrefTask spec)
          Override the implementation from AbstractTask to copy the source properties.
protected  String getDefaultLogHeader()
          Get the default log header to log (to level INFO) before the task is run if the task user has not set a custom header.
 TaskDependency getDependencyForTasksScheduledByThisTask()
          This implementation returns this.
protected  List<DirectoryView> interpretSources(List<Object> l)
          Interpret the source objects.
protected  boolean isMoreThanOneSourceAllowed()
          Is more than one source object allowed? This method returns false .
protected  void runInternal(Report r)
          Subclasses implement this.
 
Methods inherited from class org.schmant.task.stub.AbstractProcessTask
getOverwriteStrategy, getTarget, isTargetMandatory, setOverwrite, setOverwriteStrategy, setTarget, toString, validate
 
Methods inherited from class org.schmant.task.stub.AbstractActionTask
addSource, addSources, clearSources, getRelativeToBase, getSource, getSources, isSourcesMandatory, setRelativeToBase, setSource, setSources
 
Methods inherited from class org.schmant.task.stub.AbstractTask
cancel, createTask, getDefaultLogFooter, 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.confable.SourceConfigurable
addSource, addSources, clearSources, setRelativeToBase, setSource, setSources
 
Methods inherited from interface org.schmant.task.confable.SourceConfigured
getSource, getSources
 
Methods inherited from interface org.schmant.task.TaskSpecification
createTask
 
Methods inherited from interface org.schmant.task.confable.LoggingConfigurable
setLogFooter, setLogHeader, setReportLevel, setTraceLogging
 

Field Detail

DEFAULT_TRANSFORMER_FACTORY_CLASS_NAME

public static final String DEFAULT_TRANSFORMER_FACTORY_CLASS_NAME
See Also:
Constant Field Values

DEFAULT_URL_FOR_API_DOCS

public static final String DEFAULT_URL_FOR_API_DOCS
See Also:
Constant Field Values

DEFAULT_URL_FOR_STYLESHEET

public static final String DEFAULT_URL_FOR_STYLESHEET
See Also:
Constant Field Values
Method Detail

getDefaultLogHeader

protected String getDefaultLogHeader()
Description copied from class: AbstractTask
Get the default log header to log (to level INFO) before the task is run if the task user has not set a custom header. Subclasses may override this to return better headers.

This is called after validating the task.

Return null to disable logging.

Overrides:
getDefaultLogHeader in class AbstractTask<SchmantTaskrefTask>
Returns:
"Running " + toString()

isMoreThanOneSourceAllowed

protected boolean isMoreThanOneSourceAllowed()
Description copied from class: AbstractActionTask
Is more than one source object allowed? This method returns false . Subclasses override this method to return true if they allow several sources.

This method will only be called if AbstractActionTask.isSourcesMandatory() returns true.

Overrides:
isMoreThanOneSourceAllowed in class AbstractActionTask<SchmantTaskrefTask>
Returns:
true.

interpretSources

protected List<DirectoryView> interpretSources(List<Object> l)
Interpret the source objects.

Each object is interpreted using the InterpretAsReadOnlyEntityStrategy. If the object is a directory, we're happy. If the object is a file, it is assumed to be a Zip file, and the Zip file's single directory in its root directory.

Parameters:
l - The list of objects to interpret.
Returns:
The interpreted sources.

runInternal

protected void runInternal(Report r)
Description copied from class: AbstractTask
Subclasses implement this. The task is AbstractTask.validate(Report):d before this method is called, see AbstractTask.run().

Specified by:
runInternal in class AbstractTask<SchmantTaskrefTask>
Parameters:
r - The current thread's Report.

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<SchmantTaskrefTask>
Returns:
this

copyProperties

public void copyProperties(SchmantTaskrefTask 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<SchmantTaskrefTask>
Overrides:
copyProperties in class AbstractProcessTask<SchmantTaskrefTask>
Parameters:
spec - The specification to copy properties to.