Class ClearCaseChangeLogConsumer
- java.lang.Object
-
- org.apache.maven.scm.util.AbstractConsumer
-
- org.apache.maven.scm.provider.clearcase.command.changelog.ClearCaseChangeLogConsumer
-
- All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
public class ClearCaseChangeLogConsumer extends AbstractConsumer
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCLEARCASE_TIMESTAMP_PATTERNFormatter used to parse Clearcase date/timestamp.private static java.lang.StringCOMMENT_TAGprivate ChangeSetcurrentChangethe current log entry being processed by the parserprivate ChangeFilecurrentFilethe current file being processed by the parserprivate static java.lang.StringDATE_TAGprivate java.util.List<ChangeSet>entriesprivate static intGET_COMMENTexpecting commentsprivate static intGET_DATEexpecting dateprivate static intGET_FILEexpecting file informationprivate static intGET_REVISIONexpecting revisionprivate static java.lang.StringNAME_TAGprivate static java.lang.StringREVISION_TAGprivate intstatuscurrent status of the parserprivate static java.lang.StringUSER_TAGprivate java.lang.StringuserDatePattern
-
Constructor Summary
Constructors Constructor Description ClearCaseChangeLogConsumer(ScmLogger logger, java.lang.String userDatePattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumeLine(java.lang.String line)private ChangeSetgetCurrentChange()Getter for property currentChange.private ChangeFilegetCurrentFile()Getter for property currentFile.java.util.List<ChangeSet>getModifications()private intgetStatus()Getter for property status.private voidprocessGetCommentAndUser(java.lang.String line)Process the current input line in the Get Comment state.private voidprocessGetDate(java.lang.String line)Process the current input line in the Get Date state.private voidprocessGetFile(java.lang.String line)Process the current input line in the Get File state.private voidprocessGetRevision(java.lang.String line)Process the current input line in the Get Revision.private voidsetCurrentChange(ChangeSet currentChange)Setter for property currentLogEntry.private voidsetCurrentFile(ChangeFile currentFile)Setter for property currentFile.private voidsetStatus(int status)Setter for property status.-
Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
-
-
-
-
Field Detail
-
CLEARCASE_TIMESTAMP_PATTERN
private static final java.lang.String CLEARCASE_TIMESTAMP_PATTERN
Formatter used to parse Clearcase date/timestamp.- See Also:
- Constant Field Values
-
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
-
REVISION_TAG
private static final java.lang.String REVISION_TAG
- See Also:
- Constant Field Values
-
entries
private java.util.List<ChangeSet> 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
-
GET_REVISION
private static final int GET_REVISION
expecting revision- See Also:
- Constant Field Values
-
status
private int status
current status of the parser
-
currentChange
private ChangeSet currentChange
the current log entry being processed by the parser
-
currentFile
private ChangeFile currentFile
the current file being processed by the parser
-
userDatePattern
private java.lang.String userDatePattern
-
-
Constructor Detail
-
ClearCaseChangeLogConsumer
public ClearCaseChangeLogConsumer(ScmLogger logger, java.lang.String userDatePattern)
-
-
Method Detail
-
getModifications
public java.util.List<ChangeSet> getModifications()
-
consumeLine
public void consumeLine(java.lang.String line)
-
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
-
processGetRevision
private void processGetRevision(java.lang.String line)
Process the current input line in the Get Revision.- Parameters:
line- a line of text from the clearcase log output
-
getCurrentFile
private ChangeFile getCurrentFile()
Getter for property currentFile.- Returns:
- Value of property currentFile.
-
setCurrentFile
private void setCurrentFile(ChangeFile currentFile)
Setter for property currentFile.- Parameters:
currentFile- New value of property currentFile.
-
getCurrentChange
private ChangeSet getCurrentChange()
Getter for property currentChange.- Returns:
- Value of property currentChange.
-
setCurrentChange
private void setCurrentChange(ChangeSet currentChange)
Setter for property currentLogEntry.- Parameters:
currentChange- New value of 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.
-
-