org.codehaus.mojo.scmchangelog.scm.hg
Class HgScmAdapter

java.lang.Object
  extended by org.codehaus.mojo.scmchangelog.scm.util.ScmAdapter
      extended by org.codehaus.mojo.scmchangelog.scm.hg.HgScmAdapter

public class HgScmAdapter
extends ScmAdapter

Adapter wrapping the Mercurial implementation.

Version:
$Id$
Author:
ehsavoie

Field Summary
 
Fields inherited from class org.codehaus.mojo.scmchangelog.scm.util.ScmAdapter
grammar, logger, manager
 
Constructor Summary
HgScmAdapter(org.apache.maven.scm.manager.ScmManager currentManager, GrammarEnum currentGrammar)
          Constructor of ScmAdapter.
 
Method Summary
protected  List getEntries(List changeSets)
          Returns the list of log entries defined in the list of ChangeSet.
 List getListOfReleases(org.apache.maven.scm.repository.ScmRepository repository, org.apache.maven.scm.ScmFileSet fileSet)
          Returns the list of releases defined in the mercurial repository.
 org.apache.maven.scm.ScmVersion getScmVersion(ScmTarget versionType, String version)
          Returns the Scm version.
 
Methods inherited from class org.codehaus.mojo.scmchangelog.scm.util.ScmAdapter
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HgScmAdapter

public HgScmAdapter(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

getListOfReleases

public 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 mercurial repository.

Specified by:
getListOfReleases in class ScmAdapter
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.

getEntries

protected List getEntries(List changeSets)
Returns the list of log entries defined in the list of ChangeSet.

Parameters:
changeSets - the list of ChangeSet.
Returns:
the list of log entries defined in the list of ChangeSet. List<ScmLogEntry>

getScmVersion

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

Specified by:
getScmVersion in class ScmAdapter
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.