org.apache.maven.scm.provider.git
Class AbstractGitScmProvider

java.lang.Object
  extended by org.apache.maven.scm.provider.AbstractScmProvider
      extended by org.apache.maven.scm.provider.git.AbstractGitScmProvider
All Implemented Interfaces:
ScmProvider
Direct Known Subclasses:
GitExeScmProvider

public abstract class AbstractGitScmProvider
extends AbstractScmProvider

SCM Provider for git

Version:
$Id: AbstractGitScmProvider.java 687472 2008-08-20 21:33:40Z olamy $
Author:
Emmanuel Venisse

Field Summary
 
Fields inherited from interface org.apache.maven.scm.provider.ScmProvider
ROLE
 
Constructor Summary
AbstractGitScmProvider()
           
 
Method Summary
 AddScmResult add(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(GitCommand command, ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
           
protected  ExportScmResult export(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
          
protected abstract  GitCommand getAddCommand()
           
protected abstract  GitCommand getBranchCommand()
           
protected abstract  GitCommand getChangeLogCommand()
           
protected abstract  GitCommand getCheckInCommand()
           
protected abstract  GitCommand getCheckOutCommand()
           
protected abstract  GitCommand getDiffCommand()
           
protected abstract  GitCommand getExportCommand()
           
protected abstract  GitCommand getInfoCommand()
           
protected abstract  GitCommand getListCommand()
           
protected abstract  GitCommand getRemoveCommand()
           
protected abstract  java.lang.String getRepositoryURL(java.io.File path)
           
 java.lang.String getScmSpecificFilename()
          Returns the scm reserved file name where the SCM stores information like 'CVS', '.svn'.
 java.lang.String getScmType()
          
protected abstract  GitCommand getStatusCommand()
           
protected abstract  GitCommand getTagCommand()
           
protected abstract  GitCommand getUpdateCommand()
           
 GitInfoScmResult 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(java.io.File path)
          
 ScmProviderRepository makeProviderScmRepository(java.lang.String scmSpecificUrl, char delimiter)
          
 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)
          
 java.util.List validateScmUrl(java.lang.String scmSpecificUrl, char delimiter)
          Validate the scm url.
 
Methods inherited from class org.apache.maven.scm.provider.AbstractScmProvider
add, add, addListener, branch, branch, 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, remove, requiresEditMode, sanitizeTagName, status, 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

AbstractGitScmProvider

public AbstractGitScmProvider()
Method Detail

getScmSpecificFilename

public java.lang.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(java.lang.String scmSpecificUrl,
                                                       char delimiter)
                                                throws ScmRepositoryException

Throws:
ScmRepositoryException

makeProviderScmRepository

public ScmProviderRepository makeProviderScmRepository(java.io.File path)
                                                throws ScmRepositoryException,
                                                       UnknownRepositoryStructure

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

getRepositoryURL

protected abstract java.lang.String getRepositoryURL(java.io.File path)
                                              throws ScmException
Throws:
ScmException

validateScmUrl

public java.util.List validateScmUrl(java.lang.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 java.lang.String getScmType()


getAddCommand

protected abstract GitCommand getAddCommand()

add

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

Overrides:
add in class AbstractScmProvider
Throws:
ScmException

getBranchCommand

protected abstract GitCommand getBranchCommand()

branch

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

Overrides:
branch in class AbstractScmProvider
Throws:
ScmException

getChangeLogCommand

protected abstract GitCommand getChangeLogCommand()

changelog

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

Overrides:
changelog in class AbstractScmProvider
Throws:
ScmException

getCheckInCommand

protected abstract GitCommand getCheckInCommand()

checkin

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

Overrides:
checkin in class AbstractScmProvider
Throws:
ScmException

getCheckOutCommand

protected abstract GitCommand getCheckOutCommand()

checkout

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

Overrides:
checkout in class AbstractScmProvider
Throws:
ScmException

getDiffCommand

protected abstract GitCommand getDiffCommand()

diff

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

Overrides:
diff in class AbstractScmProvider
Throws:
ScmException

getExportCommand

protected abstract GitCommand getExportCommand()

export

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

Overrides:
export in class AbstractScmProvider
Throws:
ScmException

getRemoveCommand

protected abstract GitCommand getRemoveCommand()

remove

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

Overrides:
remove in class AbstractScmProvider
Throws:
ScmException

getStatusCommand

protected abstract GitCommand getStatusCommand()

status

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

Overrides:
status in class AbstractScmProvider
Throws:
ScmException

getTagCommand

protected abstract GitCommand getTagCommand()

tag

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

Overrides:
tag in class AbstractScmProvider
Throws:
ScmException

getUpdateCommand

protected abstract GitCommand getUpdateCommand()

update

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

Overrides:
update in class AbstractScmProvider
Throws:
ScmException

executeCommand

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

getListCommand

protected abstract GitCommand 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 GitCommand getInfoCommand()

info

public GitInfoScmResult info(ScmProviderRepository repository,
                             ScmFileSet fileSet,
                             CommandParameters parameters)
                      throws ScmException
Throws:
ScmException


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.