org.schmant.task.svnkit
Class SvnExportTask

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.task.stub.AbstractTask<T>
          extended by org.schmant.task.svnkit.AbstractSvnTask<SvnExportTask>
              extended by org.schmant.task.svnkit.SvnExportTask
All Implemented Interfaces:
TaskDependency, LoggingConfigurable<SvnExportTask>, OverwriteConfigurable<SvnExportTask>, TargetConfigurable<SvnExportTask>, TargetConfigured, GeneratorTaskConfigurable<SvnExportTask>, GeneratorTaskSpec<SvnExportTask>, Task, TaskRunnable, TaskSpecification<SvnExportTask>

public final class SvnExportTask
extends AbstractSvnTask<SvnExportTask>
implements GeneratorTaskSpec<SvnExportTask>

See SvnExportTF

Since:
0.7
Author:
Karl Gustafsson
Task_package:
org.tmatesoft.svn

Field Summary
 
Fields inherited from interface org.schmant.task.confable.OverwriteConfigurable
DEFAULT_OVERWRITE_STRATEGY
 
Method Summary
 void copyProperties(SvnExportTask spec)
          Copy the properties to the target object.
protected  String getDefaultLogFooter()
          Get the default log footer to log after the task has been successfully run if no other log footer is set.
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.
 Object getTarget()
          Get the target.
protected  void runInternal(Report r)
          Subclasses implement this.
 SvnExportTask setOverwrite(boolean b)
          Should things be overwritten? If this is set to true, it is equivalent to setting the overwrite strategy to DoOverwriteAndLogWarning.
 SvnExportTask setOverwriteStrategy(OverwriteStrategy strat)
          Set a strategy for how to react to existing entities in locations where the task wants to write.
 SvnExportTask setTarget(Object o)
          Set the target.
 String toString()
          Default implementation for tasks.
protected  Collection<String> validate(Report r)
          This method may be overridden by subclasses to validate their configuration (including their TaskFactory:s) before the task is run.
 
Methods inherited from class org.schmant.task.svnkit.AbstractSvnTask
getAuthenticationManager, getAuthenticationProvider, getRepositoryLocation
 
Methods inherited from class org.schmant.task.stub.AbstractTask
cancel, createTask, 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.TaskSpecification
createTask
 
Methods inherited from interface org.schmant.task.confable.LoggingConfigurable
setLogFooter, setLogHeader, setReportLevel, setTraceLogging
 

Method Detail

setTarget

public SvnExportTask setTarget(Object o)
Description copied from interface: TargetConfigurable
Set the target.

Specified by:
setTarget in interface TargetConfigurable<SvnExportTask>
Parameters:
o - The target.
Returns:
this

getTarget

public Object getTarget()
Description copied from interface: TargetConfigured
Get the target.

Specified by:
getTarget in interface TargetConfigured
Returns:
The target or null if it is not set.

setOverwrite

public SvnExportTask setOverwrite(boolean b)
Description copied from interface: OverwriteConfigurable
Should things be overwritten? If this is set to true, it is equivalent to setting the overwrite strategy to DoOverwriteAndLogWarning. If this is set to false, it is equivalent to setting the overwrite strategy to DontOverwriteAndLogWarning.

Specified by:
setOverwrite in interface OverwriteConfigurable<SvnExportTask>
Parameters:
b - Should things be overwritten?
Returns:
this

setOverwriteStrategy

public SvnExportTask setOverwriteStrategy(OverwriteStrategy strat)
Description copied from interface: OverwriteConfigurable
Set a strategy for how to react to existing entities in locations where the task wants to write.

Specified by:
setOverwriteStrategy in interface OverwriteConfigurable<SvnExportTask>
Parameters:
strat - The overwrite strategy.
Returns:
this

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<SvnExportTask>
Returns:
"Running " + toString()

getDefaultLogFooter

protected String getDefaultLogFooter()
Description copied from class: AbstractTask
Get the default log footer to log after the task has been successfully run if no other log footer is set. This implementation returns null (= no logging). Subclasses may override this to return something else.

Overrides:
getDefaultLogFooter in class AbstractTask<SvnExportTask>
Returns:
null

validate

protected Collection<String> validate(Report r)
Description copied from class: AbstractTask
This method may be overridden by subclasses to validate their configuration (including their TaskFactory:s) before the task is run.

Validation errors are collected as strings. If this method is overridden, always call super.validate.

Overrides:
validate in class AbstractSvnTask<SvnExportTask>
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.

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

copyProperties

public void copyProperties(SvnExportTask spec)
Description copied from class: AbstractTask
Copy the properties to the target object.

Subclasses must override this to copy their properties. The overriding method must call super.copyProperties.

Specified by:
copyProperties in interface TaskSpecification<SvnExportTask>
Overrides:
copyProperties in class AbstractSvnTask<SvnExportTask>
Parameters:
spec - The specification to copy properties to.

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 AbstractTask<SvnExportTask>