org.apache.maven.scm.provider.svn
Class AbstractSvnScmProvider

java.lang.Object
  extended by org.apache.maven.scm.provider.AbstractScmProvider
      extended by org.apache.maven.scm.provider.svn.AbstractSvnScmProvider
All Implemented Interfaces:
ScmProvider
Direct Known Subclasses:
SvnExeScmProvider

public abstract class AbstractSvnScmProvider
extends AbstractScmProvider

SCM Provider for Subversion

Version:
$Id: AbstractSvnScmProvider.java 1380486 2012-09-04 08:33:18Z olamy $
Author:
Emmanuel Venisse

Field Summary
 
Fields inherited from interface org.apache.maven.scm.provider.ScmProvider
ROLE
 
Constructor Summary
AbstractSvnScmProvider()
           
 
Method Summary
 AddScmResult add(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
protected  BlameScmResult blame(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
protected  BranchScmResult branch(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 ChangeLogScmResult changelog(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 CheckInScmResult checkin(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 CheckOutScmResult checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 DiffScmResult diff(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
protected  ScmResult executeCommand(SvnCommand command, ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
           
protected  ExportScmResult export(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
protected abstract  SvnCommand getAddCommand()
           
protected abstract  SvnCommand getBlameCommand()
           
protected abstract  SvnCommand getBranchCommand()
           
protected abstract  SvnCommand getChangeLogCommand()
           
protected abstract  SvnCommand getCheckInCommand()
           
protected abstract  SvnCommand getCheckOutCommand()
           
protected abstract  SvnCommand getDiffCommand()
           
protected abstract  SvnCommand getExportCommand()
           
protected abstract  SvnCommand getInfoCommand()
           
protected abstract  SvnCommand getListCommand()
           
protected abstract  SvnCommand getMkdirCommand()
           
protected abstract  SvnCommand getRemoveCommand()
           
protected abstract  String getRepositoryURL(File path)
           
 String getScmSpecificFilename()
          Returns the scm reserved file name where the SCM stores information like 'CVS', '.svn'.
 String getScmType()
          
protected abstract  SvnCommand getStatusCommand()
           
protected abstract  SvnCommand getTagCommand()
           
protected abstract  SvnCommand getUpdateCommand()
           
 InfoScmResult info(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
           
 ListScmResult list(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          List each element (files and directories) of fileSet as they exist in the repository.
 ScmProviderRepository makeProviderScmRepository(File path)
          
 ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl, char delimiter)
          
 MkdirScmResult mkdir(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          Create directory/directories in the repository.
abstract  boolean remoteUrlExist(ScmProviderRepository repository, CommandParameters parameters)
           
 RemoveScmResult remove(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 StatusScmResult status(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 UpdateScmResult update(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
 List<String> validateScmUrl(String scmSpecificUrl, char delimiter)
          Validate the scm url.
 
Methods inherited from class org.apache.maven.scm.provider.AbstractScmProvider
add, add, add, addListener, blame, blame, branch, branch, branch, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, checkIn, checkIn, checkIn, checkOut, checkOut, checkOut, checkOut, checkOut, checkOut, diff, diff, edit, edit, export, export, export, export, export, getLogger, list, list, login, mkdir, remoteInfo, remove, requiresEditMode, sanitizeTagName, status, tag, tag, tag, unedit, unedit, update, update, update, update, update, update, update, update, update, update, update, update, validateTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSvnScmProvider

public AbstractSvnScmProvider()
Method Detail

getScmSpecificFilename

public String getScmSpecificFilename()
Returns the scm reserved file name where the SCM stores information like 'CVS', '.svn'.

Specified by:
getScmSpecificFilename in interface ScmProvider
Overrides:
getScmSpecificFilename in class AbstractScmProvider
Returns:
the scm reserved file name

makeProviderScmRepository

public ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl,
                                                       char delimiter)
                                                throws ScmRepositoryException

Throws:
ScmRepositoryException

makeProviderScmRepository

public ScmProviderRepository makeProviderScmRepository(File path)
                                                throws ScmRepositoryException,
                                                       UnknownRepositoryStructure

Specified by:
makeProviderScmRepository in interface ScmProvider
Overrides:
makeProviderScmRepository in class AbstractScmProvider
Throws:
ScmRepositoryException
UnknownRepositoryStructure

getRepositoryURL

protected abstract String getRepositoryURL(File path)
                                    throws ScmException
Throws:
ScmException

validateScmUrl

public List<String> validateScmUrl(String scmSpecificUrl,
                                   char delimiter)
Validate the scm url.

Specified by:
validateScmUrl in interface ScmProvider
Overrides:
validateScmUrl in class AbstractScmProvider
Parameters:
scmSpecificUrl - The SCM url
delimiter - The delimiter used in the SCM url
Returns:
Returns a list of messages if the validation failed

getScmType

public String getScmType()


getAddCommand

protected abstract SvnCommand getAddCommand()

add

public AddScmResult add(ScmProviderRepository repository,
                        ScmFileSet fileSet,
                        CommandParameters parameters)
                 throws ScmException

Overrides:
add in class AbstractScmProvider
Throws:
ScmException

getBranchCommand

protected abstract SvnCommand getBranchCommand()

branch

protected BranchScmResult branch(ScmProviderRepository repository,
                                 ScmFileSet fileSet,
                                 CommandParameters parameters)
                          throws ScmException

Overrides:
branch in class AbstractScmProvider
Throws:
ScmException

getChangeLogCommand

protected abstract SvnCommand getChangeLogCommand()

changelog

public ChangeLogScmResult changelog(ScmProviderRepository repository,
                                    ScmFileSet fileSet,
                                    CommandParameters parameters)
                             throws ScmException

Overrides:
changelog in class AbstractScmProvider
Throws:
ScmException

getCheckInCommand

protected abstract SvnCommand getCheckInCommand()

checkin

public CheckInScmResult checkin(ScmProviderRepository repository,
                                ScmFileSet fileSet,
                                CommandParameters parameters)
                         throws ScmException

Overrides:
checkin in class AbstractScmProvider
Throws:
ScmException

getCheckOutCommand

protected abstract SvnCommand getCheckOutCommand()

checkout

public CheckOutScmResult checkout(ScmProviderRepository repository,
                                  ScmFileSet fileSet,
                                  CommandParameters parameters)
                           throws ScmException

Overrides:
checkout in class AbstractScmProvider
Throws:
ScmException

getDiffCommand

protected abstract SvnCommand getDiffCommand()

diff

public DiffScmResult diff(ScmProviderRepository repository,
                          ScmFileSet fileSet,
                          CommandParameters parameters)
                   throws ScmException

Overrides:
diff in class AbstractScmProvider
Throws:
ScmException

getExportCommand

protected abstract SvnCommand getExportCommand()

export

protected ExportScmResult export(ScmProviderRepository repository,
                                 ScmFileSet fileSet,
                                 CommandParameters parameters)
                          throws ScmException

Overrides:
export in class AbstractScmProvider
Throws:
ScmException

getRemoveCommand

protected abstract SvnCommand getRemoveCommand()

remove

public RemoveScmResult remove(ScmProviderRepository repository,
                              ScmFileSet fileSet,
                              CommandParameters parameters)
                       throws ScmException

Overrides:
remove in class AbstractScmProvider
Throws:
ScmException

getStatusCommand

protected abstract SvnCommand getStatusCommand()

status

public StatusScmResult status(ScmProviderRepository repository,
                              ScmFileSet fileSet,
                              CommandParameters parameters)
                       throws ScmException

Overrides:
status in class AbstractScmProvider
Throws:
ScmException

getTagCommand

protected abstract SvnCommand getTagCommand()

tag

public TagScmResult tag(ScmProviderRepository repository,
                        ScmFileSet fileSet,
                        CommandParameters parameters)
                 throws ScmException

Overrides:
tag in class AbstractScmProvider
Throws:
ScmException

getUpdateCommand

protected abstract SvnCommand getUpdateCommand()

update

public UpdateScmResult update(ScmProviderRepository repository,
                              ScmFileSet fileSet,
                              CommandParameters parameters)
                       throws ScmException

Overrides:
update in class AbstractScmProvider
Throws:
ScmException

executeCommand

protected ScmResult executeCommand(SvnCommand command,
                                   ScmProviderRepository repository,
                                   ScmFileSet fileSet,
                                   CommandParameters parameters)
                            throws ScmException
Throws:
ScmException

getListCommand

protected abstract SvnCommand getListCommand()

list

public ListScmResult list(ScmProviderRepository repository,
                          ScmFileSet fileSet,
                          CommandParameters parameters)
                   throws ScmException
List each element (files and directories) of fileSet as they exist in the repository.

Overrides:
list in class AbstractScmProvider
Parameters:
repository - the source control system
fileSet - the files to list
Returns:
The list of files in the repository
Throws:
NoSuchCommandScmException - unless overriden by subclass
ScmException - if any

getInfoCommand

protected abstract SvnCommand getInfoCommand()

info

public InfoScmResult info(ScmProviderRepository repository,
                          ScmFileSet fileSet,
                          CommandParameters parameters)
                   throws ScmException
Specified by:
info in interface ScmProvider
Overrides:
info in class AbstractScmProvider
Parameters:
repository - the source control system
fileSet - location of your local copy
parameters - some parameters (not use currently but for future use)
Returns:
if the scm implementation doesn't support "info" result will null
Throws:
ScmException

blame

protected BlameScmResult blame(ScmProviderRepository repository,
                               ScmFileSet fileSet,
                               CommandParameters parameters)
                        throws ScmException

Overrides:
blame in class AbstractScmProvider
Throws:
ScmException

getBlameCommand

protected abstract SvnCommand getBlameCommand()

mkdir

public MkdirScmResult mkdir(ScmProviderRepository repository,
                            ScmFileSet fileSet,
                            CommandParameters parameters)
                     throws ScmException
Create directory/directories in the repository.

Overrides:
mkdir in class AbstractScmProvider
Returns:
Throws:
ScmException

getMkdirCommand

protected abstract SvnCommand getMkdirCommand()

remoteUrlExist

public abstract boolean remoteUrlExist(ScmProviderRepository repository,
                                       CommandParameters parameters)
                                throws ScmException
Parameters:
repository -
parameters -
Returns:
true if remote url exists
Throws:
ScmException
Since:
1.8


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.