|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.statcvs.input.Builder
public class Builder
Helps building the CvsContent
from a CVS
log. The Builder is fed by some CVS history data source, for
example a CVS log parser. It creates and collects the CvsFile and
CvsRevision objects. It calculates LOC values to the individual
revisions.
It also takes care of the creation of Author and Directory objects and makes sure that there's only one of these for each author name and path.
Constructor Summary | |
---|---|
Builder(RepositoryFileManager repositoryFileManager)
Creates a new Builder |
Method Summary | |
---|---|
void |
buildFileBegin(java.lang.String filename,
boolean isBinary,
boolean isInAttic)
Starts building a new file. |
void |
buildFileEnd()
Finishes building a file. |
void |
buildRevisionAuthor(java.lang.String author)
Sets the author's name for the current revision |
void |
buildRevisionBegin(java.lang.String revisionNumber)
Starts building a new revision for the current file. |
void |
buildRevisionDate(java.util.Date date)
Sets the date for the current revision |
void |
buildRevisionEnd(java.lang.String comment)
Finishes building a revision |
void |
buildRevisionStateChange(int linesAdded,
int linesRemoved)
Makes the current revision a normal file-modifying revision. |
void |
buildRevisionStateDead()
Makes the current revision a dead (deleted) revision |
void |
buildRevisionStateInitial()
Makes the current revision an initial revision |
void |
finish()
Called after all files and revisions have been added (built). |
Author |
getAuthor(java.lang.String name)
returns the Author of the given name or creates it if it does not yet exist. |
CvsContent |
getCvsContent()
Returns a CvsContent object of all files |
Directory |
getDirectory(java.lang.String filename)
Returns the Directory of the given filename or creates it if it does not yet exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Builder(RepositoryFileManager repositoryFileManager)
repositoryFileManager
- the RepositoryFileManager
that
can be used to retrieve LOC counts for
the files that this builder will createMethod Detail |
---|
public void finish()
public Author getAuthor(java.lang.String name)
name
- the author's name
public Directory getDirectory(java.lang.String filename)
filename
- the name and path of a file, for example "src/Main.java"
public void buildFileBegin(java.lang.String filename, boolean isBinary, boolean isInAttic)
filename
- the file's name with path, for example "path/file.txt"isBinary
- true if it's a binary fileisInAttic
- true if the file is dead on the main branchpublic void buildFileEnd()
public void buildRevisionBegin(java.lang.String revisionNumber)
revisionNumber
- the revision number, for example "1.12"public void buildRevisionDate(java.util.Date date)
date
- the datepublic void buildRevisionAuthor(java.lang.String author)
author
- the author's namepublic void buildRevisionStateInitial()
public void buildRevisionStateChange(int linesAdded, int linesRemoved)
linesAdded
- number of lines added to this revisionlinesRemoved
- number of lines removed to this revisionpublic void buildRevisionStateDead()
public void buildRevisionEnd(java.lang.String comment)
comment
- the revision commentpublic CvsContent getCvsContent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |