org.codehaus.mojo.scmchangelog.scm.util
Class ScmAdapter

java.lang.Object
  extended by org.codehaus.mojo.scmchangelog.scm.util.ScmAdapter
Direct Known Subclasses:
DefaultScmAdapter, HgScmAdapter, SvnScmAdapter

public abstract class ScmAdapter
extends Object

Abstract Adapter to be used to wrap the scm implementation.

Version:
$Id: ScmAdapter.java 8964 2009-01-31 22:26:07Z ehsavoie $
Author:
ehsavoie

Field Summary
protected  GrammarEnum grammar
          The grammar used to extract elements from the comments.
protected  Log logger
          The maven logger.
protected  org.apache.maven.scm.manager.ScmManager manager
          The ScmManager to access SCM elements.
 
Constructor Summary
ScmAdapter(org.apache.maven.scm.manager.ScmManager currentManager, GrammarEnum currentGrammar)
          Constructor of ScmAdapter.
 
Method Summary
abstract  List getListOfReleases(org.apache.maven.scm.repository.ScmRepository repository, org.apache.maven.scm.ScmFileSet fileSet)
          Returns the list of releases defined in the SCM.
 Log getLogger()
          The currentlogger.
abstract  org.apache.maven.scm.ScmVersion getScmVersion(ScmTarget versionType, String version)
          Returns the Scm version.
 void setLogger(Log logger)
          The current logger to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected org.apache.maven.scm.manager.ScmManager manager
The ScmManager to access SCM elements.


grammar

protected GrammarEnum grammar
The grammar used to extract elements from the comments.


logger

protected Log logger
The maven logger.

Constructor Detail

ScmAdapter

public ScmAdapter(org.apache.maven.scm.manager.ScmManager currentManager,
                  GrammarEnum currentGrammar)
Constructor of ScmAdapter.

Parameters:
currentManager - the ScmManager to access SCM elements.
currentGrammar - the grammar used to extract elements from the comments.
Method Detail

getLogger

public Log getLogger()
The currentlogger.

Returns:
the logger

setLogger

public void setLogger(Log logger)
The current logger to be used.

Parameters:
logger - the logger to set

getListOfReleases

public abstract List getListOfReleases(org.apache.maven.scm.repository.ScmRepository repository,
                                       org.apache.maven.scm.ScmFileSet fileSet)
                                throws org.apache.maven.scm.ScmException,
                                       MojoExecutionException
Returns the list of releases defined in the SCM.

Parameters:
repository - the SCM repository.
fileSet - the base fileset.
Returns:
the list of releases defined in the SCM. List<Release>
Throws:
org.apache.maven.scm.ScmException - in case of an error with the SCM.
MojoExecutionException - in case of an error in executing the Mojo.

getScmVersion

public abstract org.apache.maven.scm.ScmVersion getScmVersion(ScmTarget versionType,
                                                              String version)
                                                       throws MojoExecutionException
Returns the Scm version.

Parameters:
versionType - the type of version (tag, trunk, branch).
version - the tag/branche name.
Returns:
the corresponding ScmVersion.
Throws:
MojoExecutionException - in case of an error in executing the Mojo.


Copyright © 2008-2009 Codehaus. All Rights Reserved.