org.apache.maven.scm.provider
Interface ScmProvider

All Known Implementing Classes:
AbstractScmProvider

public interface ScmProvider

Version:
$Id: ScmProvider.java 386265 2006-03-16 05:33:09Z carlos $
Author:
Emmanuel Venisse

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 AddScmResult add(ScmRepository repository, ScmFileSet fileSet)
          Adds the given files to the source control system
 void addListener(ScmLogger logger)
           
 ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, java.util.Date startDate, java.util.Date endDate, int numDays, java.lang.String branch)
          Returns the changes that have happend in the source control system in a certain period of time.
 ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, java.util.Date startDate, java.util.Date endDate, int numDays, java.lang.String branch, java.lang.String datePattern)
          Returns the changes that have happend in the source control system in a certain period of time.
 ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, java.lang.String startTag, java.lang.String endTag)
          Returns the changes that have happend in the source control system between two tags.
 ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, java.lang.String startTag, java.lang.String endTag, java.lang.String datePattern)
          Returns the changes that have happend in the source control system between two tags.
 CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, java.lang.String tag, java.lang.String message)
          Save the changes you have done into the repository.
 CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, java.lang.String tag)
          Create a copy of the repository on your local machine
 DiffScmResult diff(ScmRepository repository, ScmFileSet fileSet, java.lang.String startRevision, java.lang.String endRevision)
           
 EditScmResult edit(ScmRepository repository, ScmFileSet fileSet)
          Make a file editable.
 java.lang.String getScmSpecificFilename()
          Returns the scm reserved file name where the SCM stores information like 'CVS', '.svn'.
 java.lang.String getScmType()
           
 ScmProviderRepository makeProviderScmRepository(java.io.File path)
           
 ScmProviderRepository makeProviderScmRepository(java.lang.String scmSpecificUrl, char delimiter)
           
 RemoveScmResult remove(ScmRepository repository, ScmFileSet fileSet, java.lang.String message)
          Removes the given files from the source control system
 boolean requiresEditMode()
           
 StatusScmResult status(ScmRepository repository, ScmFileSet fileSet)
          Returns the status of the files in the source control system.
 TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, java.lang.String tag)
          Tag (or label in some systems) will tag the source file with a certain tag
 UnEditScmResult unedit(ScmRepository repository, ScmFileSet fileSet)
          Make a file no longer editable.
 UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, java.lang.String tag)
          Updates the copy on the local machine with the changes in the repository
 UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, java.lang.String tag, java.util.Date lastUpdate)
          Updates the copy on the local machine with the changes in the repository
 UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, java.lang.String tag, java.util.Date lastUpdate, java.lang.String datePattern)
          Updates the copy on the local machine with the changes in the repository
 UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, java.lang.String tag, java.lang.String datePattern)
          Updates the copy on the local machine with the changes in the repository
 java.util.List validateScmUrl(java.lang.String scmSpecificUrl, char delimiter)
           
 

Field Detail

ROLE

public static final java.lang.String ROLE
Method Detail

getScmType

public java.lang.String getScmType()

addListener

public void addListener(ScmLogger logger)

requiresEditMode

public boolean requiresEditMode()

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
Throws:
ScmRepositoryException
UnknownRepositoryStructure

validateScmUrl

public java.util.List validateScmUrl(java.lang.String scmSpecificUrl,
                                     char delimiter)

getScmSpecificFilename

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

Returns:
the scm reserved file name

add

public AddScmResult add(ScmRepository repository,
                        ScmFileSet fileSet)
                 throws ScmException
Adds the given files to the source control system

Parameters:
repository - the source control system
fileSet - the files to be added
Returns:
an AddScmResult that contains the files that have been added
Throws:
ScmException

changeLog

public ChangeLogScmResult changeLog(ScmRepository repository,
                                    ScmFileSet fileSet,
                                    java.util.Date startDate,
                                    java.util.Date endDate,
                                    int numDays,
                                    java.lang.String branch)
                             throws ScmException
Returns the changes that have happend in the source control system in a certain period of time. This can be adding, removing, updating, ... of files

Parameters:
repository - the source control system
fileSet - the files to know the changes about. Implementations can also give the changes from the ScmFileSet.getBasedir() downwards.
startDate - the start date of the period
endDate - the end date of the period
numDays -
branch -
Returns:
Throws:
ScmException

changeLog

public ChangeLogScmResult changeLog(ScmRepository repository,
                                    ScmFileSet fileSet,
                                    java.util.Date startDate,
                                    java.util.Date endDate,
                                    int numDays,
                                    java.lang.String branch,
                                    java.lang.String datePattern)
                             throws ScmException
Returns the changes that have happend in the source control system in a certain period of time. This can be adding, removing, updating, ... of files

Parameters:
repository - the source control system
fileSet - the files to know the changes about. Implementations can also give the changes from the ScmFileSet.getBasedir() downwards.
startDate - the start date of the period
endDate - the end date of the period
numDays -
branch -
datePattern - the date pattern use in changelog output returned by scm tool
Returns:
Throws:
ScmException

changeLog

public ChangeLogScmResult changeLog(ScmRepository repository,
                                    ScmFileSet fileSet,
                                    java.lang.String startTag,
                                    java.lang.String endTag)
                             throws ScmException
Returns the changes that have happend in the source control system between two tags. This can be adding, removing, updating, ... of files

Parameters:
repository - the source control system
fileSet - the files to know the changes about. Implementations can also give the changes from the ScmFileSet.getBasedir() downwards.
startTag - the start tag
endTag - the end tag
Returns:
Throws:
ScmException

changeLog

public ChangeLogScmResult changeLog(ScmRepository repository,
                                    ScmFileSet fileSet,
                                    java.lang.String startTag,
                                    java.lang.String endTag,
                                    java.lang.String datePattern)
                             throws ScmException
Returns the changes that have happend in the source control system between two tags. This can be adding, removing, updating, ... of files

Parameters:
repository - the source control system
fileSet - the files to know the changes about. Implementations can also give the changes from the ScmFileSet.getBasedir() downwards.
startTag - the start tag
endTag - the end tag
datePattern - the date pattern use in changelog output returned by scm tool
Returns:
Throws:
ScmException

checkIn

public CheckInScmResult checkIn(ScmRepository repository,
                                ScmFileSet fileSet,
                                java.lang.String tag,
                                java.lang.String message)
                         throws ScmException
Save the changes you have done into the repository. This will create a new version of the file or directory in the repository.

Parameters:
repository - the source control system
fileSet - the files to check in (sometimes called commit)
tag -
message - a string that is a comment on the changes that where done
Returns:
Throws:
ScmException

checkOut

public CheckOutScmResult checkOut(ScmRepository repository,
                                  ScmFileSet fileSet,
                                  java.lang.String tag)
                           throws ScmException
Create a copy of the repository on your local machine

Parameters:
repository - the source control system
fileSet - the files are copied to the ScmFileSet.getBasedir() location
tag - get the version defined by the tag
Returns:
Throws:
ScmException

diff

public DiffScmResult diff(ScmRepository repository,
                          ScmFileSet fileSet,
                          java.lang.String startRevision,
                          java.lang.String endRevision)
                   throws ScmException
Throws:
ScmException

remove

public RemoveScmResult remove(ScmRepository repository,
                              ScmFileSet fileSet,
                              java.lang.String message)
                       throws ScmException
Removes the given files from the source control system

Parameters:
repository - the source control system
fileSet - the files to be removed
message -
Returns:
Throws:
ScmException

status

public StatusScmResult status(ScmRepository repository,
                              ScmFileSet fileSet)
                       throws ScmException
Returns the status of the files in the source control system. The state of each file can be one of the ScmFileStatus flags.

Parameters:
repository - the source control system
fileSet - the files to know the status about. Implementations can also give the changes from the ScmFileSet.getBasedir() downwards.
Returns:
Throws:
ScmException

tag

public TagScmResult tag(ScmRepository repository,
                        ScmFileSet fileSet,
                        java.lang.String tag)
                 throws ScmException
Tag (or label in some systems) will tag the source file with a certain tag

Parameters:
repository - the source control system
fileSet - the files to tag. Implementations can also give the changes from the ScmFileSet.getBasedir() downwards.
tag - the tag to apply to the files
Returns:
Throws:
ScmException

update

public UpdateScmResult update(ScmRepository repository,
                              ScmFileSet fileSet,
                              java.lang.String tag)
                       throws ScmException
Updates the copy on the local machine with the changes in the repository

Parameters:
repository - the source control system
fileSet - location of your local copy
tag - use the version defined by the tag
Returns:
Throws:
ScmException

update

public UpdateScmResult update(ScmRepository repository,
                              ScmFileSet fileSet,
                              java.lang.String tag,
                              java.lang.String datePattern)
                       throws ScmException
Updates the copy on the local machine with the changes in the repository

Parameters:
repository - the source control system
fileSet - location of your local copy
tag - use the version defined by the tag
datePattern - the date pattern use in changelog output returned by scm tool
Returns:
Throws:
ScmException

update

public UpdateScmResult update(ScmRepository repository,
                              ScmFileSet fileSet,
                              java.lang.String tag,
                              java.util.Date lastUpdate)
                       throws ScmException
Updates the copy on the local machine with the changes in the repository

Parameters:
repository - the source control system
fileSet - location of your local copy
tag - use the version defined by the tag
lastUpdate -
Returns:
Throws:
ScmException

update

public UpdateScmResult update(ScmRepository repository,
                              ScmFileSet fileSet,
                              java.lang.String tag,
                              java.util.Date lastUpdate,
                              java.lang.String datePattern)
                       throws ScmException
Updates the copy on the local machine with the changes in the repository

Parameters:
repository - the source control system
fileSet - location of your local copy
tag - use the version defined by the tag
lastUpdate - Date of last update
datePattern - the date pattern use in changelog output returned by scm tool
Returns:
Throws:
ScmException

edit

public EditScmResult edit(ScmRepository repository,
                          ScmFileSet fileSet)
                   throws ScmException
Make a file editable. This is used in source control systems where you look at read-only files and you need to make them not read-only anymore before you can edit them. This can also mean that no other user in the system can make the file not read-only anymore.

Parameters:
repository - the source control system
fileSet - the files to make editable
Returns:
Throws:
ScmException

unedit

public UnEditScmResult unedit(ScmRepository repository,
                              ScmFileSet fileSet)
                       throws ScmException
Make a file no longer editable. This is the conterpart of edit(org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet). It makes the file read-only again.

Parameters:
repository - the source control system
fileSet - the files to make uneditable
Returns:
Throws:
ScmException


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