org.schmant.task.at4j.bzip2
Class BZip2Task

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.stub.AbstractProcessOneFileTask<BZip2Task>
                      extended by org.schmant.task.at4j.bzip2.BZip2Task
All Implemented Interfaces:
Producer<WritableFile>, TaskDependency, ActionTaskConfigurable<BZip2Task>, ActionTaskSpec<BZip2Task>, LoggingConfigurable<BZip2Task>, OverwriteConfigurable<BZip2Task>, SourceConfigurable<BZip2Task>, SourceConfigured, TargetConfigurable<BZip2Task>, TargetConfigured, GeneratorTaskConfigurable<BZip2Task>, GeneratorTaskSpec<BZip2Task>, ProcessTaskConfigurable<BZip2Task>, ProcessTaskSpec<BZip2Task>, Task, TaskRunnable, TaskSpecification<BZip2Task>

public final class BZip2Task
extends AbstractProcessOneFileTask<BZip2Task>

See BZip2TF

Since:
0.8
Author:
Karl Gustafsson
Task_package:
org.at4j

Field Summary
 
Fields inherited from interface org.schmant.task.confable.OverwriteConfigurable
DEFAULT_OVERWRITE_STRATEGY
 
Method Summary
 void copyProperties(BZip2Task spec)
          Override the implementation from AbstractTask to copy the source properties.
protected  String getDefaultTargetFileExtension()
          Subclasses implement this to return the default file extension for target files (such as ".gz").
protected  OutputStream proxyOutputStream(OutputStream os)
           
protected  Collection<String> validate(Report r)
          Override the method inherited from AbstractTask to give a validation error if no source is set (and AbstractActionTask.isSourcesMandatory() is true).
 
Methods inherited from class org.schmant.task.stub.AbstractProcessOneFileTask
get, isTargetMandatory, runInternal, setDeleteSourceFile
 
Methods inherited from class org.schmant.task.stub.AbstractProcessTask
getOverwriteStrategy, getTarget, setOverwrite, setOverwriteStrategy, setTarget, toString
 
Methods inherited from class org.schmant.task.stub.AbstractActionTask
addSource, addSources, clearSources, getRelativeToBase, getSource, getSources, isMoreThanOneSourceAllowed, 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
 

Method Detail

getDefaultTargetFileExtension

protected String getDefaultTargetFileExtension()
Description copied from class: AbstractProcessOneFileTask
Subclasses implement this to return the default file extension for target files (such as ".gz"). This is used when inferring the target entity.

Specified by:
getDefaultTargetFileExtension in class AbstractProcessOneFileTask<BZip2Task>
Returns:
The default target file name extension.

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 AbstractProcessTask<BZip2Task>
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.

proxyOutputStream

protected OutputStream proxyOutputStream(OutputStream os)
                                  throws IOException
Specified by:
proxyOutputStream in class AbstractProcessOneFileTask<BZip2Task>
Throws:
IOException

copyProperties

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