org.schmant.task.stub
Class AbstractActionTaskFactory<T extends AbstractActionTaskFactory<T,U>,U extends ActionTaskSpec<U>>

java.lang.Object
  extended by org.schmant.task.stub.AbstractTaskFactory<T,U>
      extended by org.schmant.task.stub.AbstractActionTaskFactory<T,U>
All Implemented Interfaces:
ActionTaskConfigurable<T>, ActionTaskFactory<T,U>, LoggingConfigurable<T>, SourceConfigurable<T>, TaskFactory<T,U>, TaskRunnable
Direct Known Subclasses:
AbstractJavadocTaskFactory, AbstractParseXmlTaskFactory, AbstractProcessTaskFactory, AbstractRecursiveActionTaskFactory, AbstractXmlCatalogActionTaskFactory, ChmodTF, DeleteTF, ForEachSourceTF, HtmlLinkValidationTF, ReplaceSourceFileTF, TemplateCompilerTF, TreeDeleteTF

public abstract class AbstractActionTaskFactory<T extends AbstractActionTaskFactory<T,U>,U extends ActionTaskSpec<U>>
extends AbstractTaskFactory<T,U>
implements ActionTaskFactory<T,U>

This is a starting point for ActionTaskFactory implementations.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
AbstractActionTaskFactory()
           
 
Method Summary
 T addSource(Object o)
          Add one or several sources.
 T addSources(Object o)
          This method does the same as SourceConfigurable.addSource(Object)
 T clearSources()
          Clear the collection of sources.
 T setRelativeToBase(RelativeLocation rel)
          This property is set with the task's source's location relative to a base location if the task is run within a recursive task.
 T setSource(Object o)
          Set one or several sources, discarding previously set sources.
 T setSources(Object o)
          This method does the same as SourceConfigurable.setSource(Object)
 
Methods inherited from class org.schmant.task.stub.AbstractTaskFactory
copy, create, createSpecification, getLastCreated, getSpecification, getThis, run, setLogFooter, setLogHeader, setReportLevel, setTraceLogging, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.schmant.task.TaskFactory
copy, create, getLastCreated, getSpecification
 
Methods inherited from interface org.schmant.task.confable.LoggingConfigurable
setLogFooter, setLogHeader, setReportLevel, setTraceLogging
 
Methods inherited from interface org.schmant.task.TaskRunnable
run
 

Constructor Detail

AbstractActionTaskFactory

public AbstractActionTaskFactory()
Method Detail

setSource

public final T setSource(Object o)
Description copied from interface: SourceConfigurable
Set one or several sources, discarding previously set sources.

Specified by:
setSource in interface SourceConfigurable<T extends AbstractActionTaskFactory<T,U>>
Parameters:
o - The source. If this is a Collection or an array, it is flattened (see FlatteningList), and all objects in the collection or array are set.
Returns:
this

setSources

public final T setSources(Object o)
Description copied from interface: SourceConfigurable
This method does the same as SourceConfigurable.setSource(Object)

Specified by:
setSources in interface SourceConfigurable<T extends AbstractActionTaskFactory<T,U>>
Parameters:
o - The source or sources.
Returns:
this

addSource

public final T addSource(Object o)
Description copied from interface: SourceConfigurable
Add one or several sources.

Specified by:
addSource in interface SourceConfigurable<T extends AbstractActionTaskFactory<T,U>>
Parameters:
o - The source. If this is a Collection or an array, it is flattened (see FlatteningList), and all sources in the collection or array are added.
Returns:
this

addSources

public final T addSources(Object o)
Description copied from interface: SourceConfigurable
This method does the same as SourceConfigurable.addSource(Object)

Specified by:
addSources in interface SourceConfigurable<T extends AbstractActionTaskFactory<T,U>>
Parameters:
o - The source or sources.
Returns:
this

clearSources

public final T clearSources()
Description copied from interface: SourceConfigurable
Clear the collection of sources.

Specified by:
clearSources in interface SourceConfigurable<T extends AbstractActionTaskFactory<T,U>>
Returns:
this.

setRelativeToBase

public final T setRelativeToBase(RelativeLocation rel)
Description copied from interface: SourceConfigurable
This property is set with the task's source's location relative to a base location if the task is run within a recursive task. The base location is the location of the source of the recursive task.

If the SourceConfigurable (this object) is an action task factory that is used in a recursive action task, the recursive action task sets this property for each created task.

Specified by:
setRelativeToBase in interface SourceConfigurable<T extends AbstractActionTaskFactory<T,U>>
Parameters:
rel - The source's location relative to the base location.
Returns:
this