org.schmant.task.svnkit
Class AbstractSvnTask<T extends AbstractSvnTask<T>>

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.task.stub.AbstractTask<T>
          extended by org.schmant.task.svnkit.AbstractSvnTask<T>
Type Parameters:
T - Concrete task type
All Implemented Interfaces:
TaskDependency, LoggingConfigurable<T>, Task, TaskRunnable, TaskSpecification<T>
Direct Known Subclasses:
AbstractSvnCommitTask, SvnExportTask

public abstract class AbstractSvnTask<T extends AbstractSvnTask<T>>
extends AbstractTask<T>

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

Constructor Summary
AbstractSvnTask()
           
 
Method Summary
 void copyProperties(T spec)
          Copy the properties to the target object.
protected  ISVNAuthenticationManager getAuthenticationManager()
          If an authentication manager is set on the factory, return that.
protected  ISVNAuthenticationProvider getAuthenticationProvider()
           
protected  SVNURL getRepositoryLocation()
           
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.stub.AbstractTask
cancel, createTask, getDefaultLogFooter, getDefaultLogHeader, getDependencyForTasksScheduledByThisTask, getDependencyObservable, getFailureCause, getLogFooter, getLogHeader, getSatisfiedStateLock, getThis, isCancelled, isDone, isInterrupted, isRunning, isSatisfied, isSuccessful, run, runInternal, setLogFooter, setLogHeader, setReportLevel, setTraceLogging, toString
 
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
 

Constructor Detail

AbstractSvnTask

public AbstractSvnTask()
Method Detail

getRepositoryLocation

protected final SVNURL getRepositoryLocation()

getAuthenticationProvider

protected final ISVNAuthenticationProvider getAuthenticationProvider()

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 AbstractTask<T extends AbstractSvnTask<T>>
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.

getAuthenticationManager

protected final ISVNAuthenticationManager getAuthenticationManager()
If an authentication manager is set on the factory, return that. Otherwise, return an authentication manager created by calling SVNWCUtil.createDefaultAuthenticationManager(), and let it use a supplied authentication provider, if set.

Returns:
An authentication manager.

copyProperties

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