public class CvsChangeLogConsumer extends AbstractConsumer
Modifier and Type | Field and Description |
---|---|
private ChangeSet |
currentChange
the current log entry being processed by the parser
|
private ChangeFile |
currentFile
the current file being processed by the parser
|
private static java.lang.String |
DATE_TAG
Marks date data
|
private static java.lang.String |
END_FILE
Marks end of file
|
private java.util.List<ChangeSet> |
entries |
private static int |
GET_COMMENT
expecting comments
|
private static int |
GET_DATE
expecting date
|
private static int |
GET_FILE
expecting file information
|
private static int |
GET_REVISION
expecting revision
|
private static java.lang.String |
REVISION_TAG
Marks revision data
|
private static java.lang.String |
START_FILE
Marks start of file data
|
private static java.lang.String |
START_REVISION
Marks start of revision
|
private int |
status
current status of the parser
|
private java.lang.String |
userDatePattern |
Constructor and Description |
---|
CvsChangeLogConsumer(ScmLogger logger,
java.lang.String userDatePattern) |
Modifier and Type | Method and Description |
---|---|
private void |
addEntry(ChangeSet entry,
ChangeFile file)
Add a change log entry to the list (if it's not already there) with the
given file.
|
private boolean |
areEqual(ChangeSet set1,
ChangeSet set2) |
void |
consumeLine(java.lang.String line) |
private ChangeSet |
getCurrentChange()
Getter for property currentChange.
|
private ChangeFile |
getCurrentFile()
Getter for property currentFile.
|
java.util.List<ChangeSet> |
getModifications() |
private int |
getStatus()
Getter for property status.
|
private void |
processGetComment(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 |
processGetRevision(java.lang.String line)
Process the current input line in the Get Revision state.
|
private void |
setCurrentChange(ChangeSet currentChange)
Setter for property currentChange.
|
private void |
setCurrentFile(ChangeFile currentFile)
Setter for property currentFile.
|
private void |
setStatus(int status)
Setter for property status.
|
getLogger, parseDate, parseDate, setLogger
private java.util.List<ChangeSet> entries
private static final int GET_FILE
private static final int GET_DATE
private static final int GET_COMMENT
private static final int GET_REVISION
private static final java.lang.String START_FILE
private static final java.lang.String END_FILE
private static final java.lang.String START_REVISION
private static final java.lang.String REVISION_TAG
private static final java.lang.String DATE_TAG
private int status
private ChangeSet currentChange
private ChangeFile currentFile
private java.lang.String userDatePattern
public CvsChangeLogConsumer(ScmLogger logger, java.lang.String userDatePattern)
public java.util.List<ChangeSet> getModifications()
public void consumeLine(java.lang.String line)
private void addEntry(ChangeSet entry, ChangeFile file)
entry
- a ChangeSet
to be added to the list if another
with the same key doesn't exist already. If the entry's author
is null, the entry wont be addedfile
- a ChangeFile
to be added to the entryprivate void processGetFile(java.lang.String line)
line
- a line of text from the cvs log outputprivate void processGetRevision(java.lang.String line)
line
- a line of text from the cvs log outputprivate void processGetDate(java.lang.String line)
line
- a line of text from the cvs log outputprivate void processGetComment(java.lang.String line)
line
- a line of text from the cvs log outputprivate ChangeFile getCurrentFile()
private void setCurrentFile(ChangeFile currentFile)
currentFile
- New value of property currentFile.private ChangeSet getCurrentChange()
private void setCurrentChange(ChangeSet currentChange)
currentChange
- New value of property currentChange.private int getStatus()
private void setStatus(int status)
status
- New value of property status.