org.apache.maven.perforcelib
Class PerforceChangeLogGenerator

java.lang.Object
  extended byorg.apache.maven.changelog.AbstractChangeLogGenerator
      extended byorg.apache.maven.perforcelib.PerforceChangeLogGenerator
All Implemented Interfaces:
ChangeLogGenerator, org.apache.tools.ant.taskdefs.ExecuteStreamHandler

public class PerforceChangeLogGenerator
extends AbstractChangeLogGenerator

A Perforce implementation of the ChangeLog interface.

Version:
$Id:
Author:
Jim Crossley

Field Summary
 
Fields inherited from class org.apache.maven.changelog.AbstractChangeLogGenerator
base, changeLogExecutor, clParser, commentFormat, dateRange, entries, errorReader, in, logEnd, logStart, tag, type
 
Constructor Summary
PerforceChangeLogGenerator()
           
 
Method Summary
protected  String getScmDateArgument(Date before, Date to)
          The Perforce filelog doesn't support a revision, i.e.
protected  org.apache.tools.ant.types.Commandline getScmLogCommand()
          Constructs the appropriate command line to execute the perforce log command whose output is then later parsed.
protected  String getScmTagArgument(String tagStart, String tagEnd)
          Construct the command-line argument that is passed to the scm client to specify the appropriate tag.
protected  void handleParserException(IOException ioe)
          Handle ChangeLogParser IOExceptions.
 
Methods inherited from class org.apache.maven.changelog.AbstractChangeLogGenerator
cleanup, getCommentFormat, getConnection, getEntries, getLogEnd, getLogStart, init, logExecute, setCommentFormat, setConnection, setDateRange, setDateRangeFromAbsoluteDate, setLogEnd, setLogStart, setProcessErrorStream, setProcessInputStream, setProcessOutputStream, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerforceChangeLogGenerator

public PerforceChangeLogGenerator()
Method Detail

getScmLogCommand

protected org.apache.tools.ant.types.Commandline getScmLogCommand()
Constructs the appropriate command line to execute the perforce log command whose output is then later parsed. Repository connection syntax: scm:perforce[:host:port]://depot/projects/name/...

Specified by:
getScmLogCommand in class AbstractChangeLogGenerator
Returns:
the cvs command line to be executed.

getScmDateArgument

protected String getScmDateArgument(Date before,
                                    Date to)
The Perforce filelog doesn't support a revision, i.e. date, range

Specified by:
getScmDateArgument in class AbstractChangeLogGenerator
Parameters:
before - The starting point.
to - The ending point.
Returns:
An empty string

handleParserException

protected void handleParserException(IOException ioe)
                              throws IOException
Handle ChangeLogParser IOExceptions.

Overrides:
handleParserException in class AbstractChangeLogGenerator
Parameters:
ioe - The IOException thrown.
Throws:
IOException - If the handler doesn't wish to handle the exception.

getScmTagArgument

protected String getScmTagArgument(String tagStart,
                                   String tagEnd)
Description copied from class: AbstractChangeLogGenerator
Construct the command-line argument that is passed to the scm client to specify the appropriate tag.

Specified by:
getScmTagArgument in class AbstractChangeLogGenerator
Parameters:
tagStart - The tag name for the start of the log (log shouldn't actually contain the tag).
tagEnd - The tag name for the end of the log (the log can contain this tag), or null to log all changes since tagStart.
Returns:
A string that can be used to specify the tag range to a scm system.
See Also:
AbstractChangeLogGenerator.getScmTagArgument(String, String)


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