public class StarteamChangeLogConsumer extends AbstractConsumer
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
AUTHOR_TAG
Marks author data
|
private ChangeSet |
currentChange
the current log entry being processed by the parser
|
private java.lang.String |
currentDir |
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 |
DIR_MARKER
Marks current directory data
|
private static java.lang.String |
END_FILE
Marks end of file
|
private java.util.Date |
endDate
the to date
|
private java.util.List<ChangeSet> |
entries |
private static int |
GET_AUTHOR
expecting date
|
private static int |
GET_COMMENT
expecting comments
|
private static int |
GET_FILE
expecting file information
|
private static int |
GET_REVISION
expecting revision
|
private java.text.SimpleDateFormat |
localFormat |
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 java.util.Date |
startDate
the before date
|
private int |
status
current status of the parser
|
private java.lang.String |
userDateFormat |
private java.lang.String |
workingDirectory |
Constructor and Description |
---|
StarteamChangeLogConsumer(java.io.File workingDirectory,
ScmLogger logger,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String userDateFormat) |
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.
|
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 |
processDirectory(java.lang.String line,
int pos) |
private void |
processGetAuthor(java.lang.String line)
Process the current input line in the Get Author/Date state.
|
private void |
processGetComment(java.lang.String line)
Process the current input line in the Get Comment 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.text.SimpleDateFormat localFormat
private java.util.List<ChangeSet> entries
private java.lang.String workingDirectory
private java.lang.String currentDir
private static final int GET_FILE
private static final int GET_AUTHOR
private static final int GET_COMMENT
private static final int GET_REVISION
private static final java.lang.String DIR_MARKER
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 AUTHOR_TAG
private static final java.lang.String DATE_TAG
private int status
private ChangeSet currentChange
private ChangeFile currentFile
private java.util.Date startDate
private java.util.Date endDate
private java.lang.String userDateFormat
public StarteamChangeLogConsumer(java.io.File workingDirectory, ScmLogger logger, java.util.Date startDate, java.util.Date endDate, java.lang.String userDateFormat)
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 processDirectory(java.lang.String line, int pos)
private void processGetFile(java.lang.String line)
line
- a line of text from the Starteam log outputprivate void processGetRevision(java.lang.String line)
line
- a line of text from the Starteam log outputprivate void processGetAuthor(java.lang.String line)
line
- a line of text from the Starteam log outputprivate void processGetComment(java.lang.String line)
line
- a line of text from the Starteam 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.