org.apache.maven.scm.provider.clearcase.command.changelog
Class ClearCaseChangeLogConsumer

java.lang.Object
  extended byorg.apache.maven.scm.provider.clearcase.command.changelog.ClearCaseChangeLogConsumer
All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer

public class ClearCaseChangeLogConsumer
extends java.lang.Object
implements org.codehaus.plexus.util.cli.StreamConsumer

Version:
$Id: ClearCaseChangeLogConsumer.java 191730 2005-06-21 21:35:52Z evenisse $
Author:
Emmanuel Venisse, Trygve Laugstøl

Field Summary
private static java.text.SimpleDateFormat CLEARCASE_TIMESTAMP_FORMAT
          Formatter used to parse Clearcase date/timestamp.
private static java.lang.String COMMENT_TAG
           
private  org.apache.maven.scm.ChangeSet currentChange
          the current log entry being processed by the parser
private  org.apache.maven.scm.ChangeFile currentFile
          the current file being processed by the parser
private static java.lang.String DATE_TAG
           
private  java.util.List entries
           
private static java.text.SimpleDateFormat ENTRY_KEY_TIMESTAMP_FORMAT
          Custom date/time formatter.
private static int GET_COMMENT
          expecting comments
private static int GET_DATE
          expecting date
private static int GET_FILE
          expecting file information
private  org.apache.maven.scm.log.ScmLogger logger
           
private static java.lang.String NAME_TAG
           
private  int status
          current status of the parser
private static java.lang.String USER_TAG
           
 
Constructor Summary
ClearCaseChangeLogConsumer(org.apache.maven.scm.log.ScmLogger logger)
           
 
Method Summary
 void consumeLine(java.lang.String line)
           
private  org.apache.maven.scm.ChangeSet getCurrentChange()
          Getter for property currentChange.
private  org.apache.maven.scm.ChangeFile getCurrentFile()
          Getter for property currentFile.
 java.util.List getModifications()
           
private  int getStatus()
          Getter for property status.
private  void processGetCommentAndUser(java.lang.String line)
          Process the current input line in the Get Comment state.
private  void processGetDate(java.lang.String line)
          Process the current input line in the Get Date state.
private  void processGetFile(java.lang.String line)
          Process the current input line in the Get File state.
private  void setCurrentChange(org.apache.maven.scm.ChangeSet currentChange)
          Setter for property currentLogEntry.
private  void setCurrentFile(org.apache.maven.scm.ChangeFile currentFile)
          Setter for property currentFile.
private  void setStatus(int status)
          Setter for property status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private org.apache.maven.scm.log.ScmLogger logger

CLEARCASE_TIMESTAMP_FORMAT

private static final java.text.SimpleDateFormat CLEARCASE_TIMESTAMP_FORMAT
Formatter used to parse Clearcase date/timestamp.


NAME_TAG

private static final java.lang.String NAME_TAG
See Also:
Constant Field Values

USER_TAG

private static final java.lang.String USER_TAG
See Also:
Constant Field Values

DATE_TAG

private static final java.lang.String DATE_TAG
See Also:
Constant Field Values

COMMENT_TAG

private static final java.lang.String COMMENT_TAG
See Also:
Constant Field Values

ENTRY_KEY_TIMESTAMP_FORMAT

private static final java.text.SimpleDateFormat ENTRY_KEY_TIMESTAMP_FORMAT
Custom date/time formatter. Rounds ChangeLogEntry times to the nearest minute.


entries

private java.util.List entries

GET_FILE

private static final int GET_FILE
expecting file information

See Also:
Constant Field Values

GET_DATE

private static final int GET_DATE
expecting date

See Also:
Constant Field Values

GET_COMMENT

private static final int GET_COMMENT
expecting comments

See Also:
Constant Field Values

status

private int status
current status of the parser


currentChange

private org.apache.maven.scm.ChangeSet currentChange
the current log entry being processed by the parser


currentFile

private org.apache.maven.scm.ChangeFile currentFile
the current file being processed by the parser

Constructor Detail

ClearCaseChangeLogConsumer

public ClearCaseChangeLogConsumer(org.apache.maven.scm.log.ScmLogger logger)
Method Detail

getModifications

public java.util.List getModifications()

consumeLine

public void consumeLine(java.lang.String line)
Specified by:
consumeLine in interface org.codehaus.plexus.util.cli.StreamConsumer

processGetFile

private void processGetFile(java.lang.String line)
Process the current input line in the Get File state.

Parameters:
line - a line of text from the clearcase log output

processGetDate

private void processGetDate(java.lang.String line)
Process the current input line in the Get Date state.

Parameters:
line - a line of text from the clearcase log output

processGetCommentAndUser

private void processGetCommentAndUser(java.lang.String line)
Process the current input line in the Get Comment state.

Parameters:
line - a line of text from the clearcase log output

getCurrentFile

private org.apache.maven.scm.ChangeFile getCurrentFile()
Getter for property currentFile.

Returns:
Value of property currentFile.

setCurrentFile

private void setCurrentFile(org.apache.maven.scm.ChangeFile currentFile)
Setter for property currentFile.

Parameters:
currentFile - New value of property currentFile.

getCurrentChange

private org.apache.maven.scm.ChangeSet getCurrentChange()
Getter for property currentChange.

Returns:
Value of property currentChange.

setCurrentChange

private void setCurrentChange(org.apache.maven.scm.ChangeSet currentChange)
Setter for property currentLogEntry.


getStatus

private int getStatus()
Getter for property status.

Returns:
Value of property status.

setStatus

private void setStatus(int status)
Setter for property status.

Parameters:
status - New value of property status.