org.schmant.task.io.zip
Class ZipTask
java.lang.Object
org.schmant.support.AbstractArgumentChecker
org.schmant.task.stub.AbstractTask<T>
org.schmant.task.stub.AbstractActionTask<T>
org.schmant.task.stub.AbstractProcessTask<T>
org.schmant.task.template.io.zip.AbstractZipTask<T>
org.schmant.task.io.zip.AbstractJavaZipTask<ZipTask>
org.schmant.task.io.zip.ZipTask
- All Implemented Interfaces:
- Producer<EFile>, TaskDependency, ActionTaskConfigurable<ZipTask>, ActionTaskSpec<ZipTask>, LoggingConfigurable<ZipTask>, OverwriteConfigurable<ZipTask>, SourceConfigurable<ZipTask>, SourceConfigured, TargetConfigurable<ZipTask>, TargetConfigured, GeneratorTaskConfigurable<ZipTask>, GeneratorTaskSpec<ZipTask>, ProcessTaskConfigurable<ZipTask>, ProcessTaskSpec<ZipTask>, Task, TaskRunnable, TaskSpecification<ZipTask>
public final class ZipTask
- extends AbstractJavaZipTask<ZipTask>
- implements Producer<EFile>
See ZipTF
- Since:
- 0.5
- Author:
- Karl Gustafsson
- Task_package:
- org.schmant.task.base
Methods inherited from class org.schmant.task.stub.AbstractTask |
cancel, createTask, getDefaultLogFooter, getDependencyForTasksScheduledByThisTask, getDependencyObservable, getFailureCause, getLogFooter, getLogHeader, getSatisfiedStateLock, getThis, isCancelled, isDone, isInterrupted, isRunning, isSatisfied, isSuccessful, run, setLogFooter, setLogHeader, setReportLevel, setTraceLogging |
get
public 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.
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<ZipTask>
- Returns:
- "Running " + toString()
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<ZipTask>
- 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<ZipTask>
- Parameters:
r
- The current thread's Report
.
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 AbstractProcessTask<ZipTask>