org.schmant.task.jdk.jar
Class AbstractJarTask<T extends AbstractJarTask<T>>

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<T>
                  extended by org.schmant.task.template.io.zip.AbstractZipTask<T>
                      extended by org.schmant.task.io.zip.AbstractJavaZipTask<T>
                          extended by org.schmant.task.jdk.jar.AbstractJarTask<T>
All Implemented Interfaces:
Producer<EFile>, TaskDependency, ActionTaskConfigurable<T>, ActionTaskSpec<T>, LoggingConfigurable<T>, OverwriteConfigurable<T>, SourceConfigurable<T>, SourceConfigured, TargetConfigurable<T>, TargetConfigured, GeneratorTaskConfigurable<T>, GeneratorTaskSpec<T>, ProcessTaskConfigurable<T>, ProcessTaskSpec<T>, Task, TaskRunnable, TaskSpecification<T>
Direct Known Subclasses:
EarTask, JarTask, WarTask

public abstract class AbstractJarTask<T extends AbstractJarTask<T>>
extends AbstractJavaZipTask<T>
implements Producer<EFile>

This is an abstract base class for Jar tasks.

Since:
0.5
Author:
Karl Gustafsson
Task_package:
org.schmant.task.base

Field Summary
 
Fields inherited from interface org.schmant.task.confable.OverwriteConfigurable
DEFAULT_OVERWRITE_STRATEGY
 
Constructor Summary
AbstractJarTask()
           
 
Method Summary
 void copyProperties(T spec)
          Override the implementation from AbstractTask to copy the source properties.
protected  Iterator<ZipEntryInfo> createIterator(SortedMap<AbsoluteLocation,EntityOrReadableFile> m)
          Subclasses implement this to create an iterator that will return ZipEntryInfo objects for each entry in the supplied map.
 EFile get()
          Returns the produced object, or null if nothing is produced yet.
protected  Manifest getManifest()
           
protected  Object getManifestFile()
           
protected  void runInternal(Report r)
          Subclasses implement this.
 void setManifest(Manifest m)
           
 void setManifest(Object o)
           
 
Methods inherited from class org.schmant.task.io.zip.AbstractJavaZipTask
createIterator, getEntryInfoProvider, getLevel, getMethod, setEntryInfoProvider, setLevel, setMethod, setMethod
 
Methods inherited from class org.schmant.task.template.io.zip.AbstractZipTask
getComment, isMoreThanOneSourceAllowed
 
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, 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.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
 

Constructor Detail

AbstractJarTask

public AbstractJarTask()
Method Detail

get

public final EFile get()
Description copied from interface: Producer
Returns the produced object, or null if nothing is produced yet.

This method should be implemented thread-safe.

Specified by:
get in interface Producer<EFile>
Returns:
The produced object.

setManifest

public final void setManifest(Object o)

setManifest

public final void setManifest(Manifest m)

getManifestFile

protected final Object getManifestFile()

getManifest

protected final Manifest getManifest()

createIterator

protected Iterator<ZipEntryInfo> createIterator(SortedMap<AbsoluteLocation,EntityOrReadableFile> m)
Description copied from class: AbstractJavaZipTask
Subclasses implement this to create an iterator that will return ZipEntryInfo objects for each entry in the supplied map.

Specified by:
createIterator in class AbstractJavaZipTask<T extends AbstractJarTask<T>>
Parameters:
m - A map with the contents of the Zip file.
Returns:
A Zip entry info iterator.

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<T extends AbstractJarTask<T>>
Parameters:
r - The current thread's Report.

copyProperties

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