|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.statcvs.model.VersionedFile
Represents one versioned file in the Repository,
including its name, Directory and Revision list.
Revisions can be created using the addXXXRevision factory
methods. Revisions can be created in any order.
TODO: Rename class to something like VersionedFile, getCurrentLinesOfCode() to getCurrentLines(), maybe getFilenameXXX, isDead() to isDeleted()
| Constructor Summary | |
VersionedFile(java.lang.String name,
Directory directory)
Creates a VersionedFile object. |
|
| Method Summary | |
Revision |
addBeginOfLogRevision(java.util.Date date,
int lines,
java.util.SortedSet symbolicNames)
Adds a "begin of log" revision to the file. |
Revision |
addChangeRevision(java.lang.String revisionNumber,
Author author,
java.util.Date date,
java.lang.String comment,
int lines,
int linesDelta,
int replacedLines,
java.util.SortedSet symbolicNames)
Adds a change revision to the file. |
Revision |
addDeletionRevision(java.lang.String revisionNumber,
Author author,
java.util.Date date,
java.lang.String comment,
int lines,
java.util.SortedSet symbolicNames)
Adds a deletion revision to the file. |
Revision |
addInitialRevision(java.lang.String revisionNumber,
Author author,
java.util.Date date,
java.lang.String comment,
int lines,
java.util.SortedSet symbolicNames)
Adds an initial revision to the file. |
int |
compareTo(java.lang.Object other)
Compares this file to another one, based on filename. |
boolean |
equals(java.lang.Object rhs)
|
java.util.Set |
getAuthors()
Returns a list of authors that have commited at least one revision of the file. |
int |
getCurrentLinesOfCode()
Returns the current number of lines for this file. |
Directory |
getDirectory()
Returns the file's Directory. |
java.lang.String |
getFilename()
Returns the filename without path. |
java.lang.String |
getFilenameWithPath()
Returns the full filename. |
Revision |
getInitialRevision()
Gets the earliest revision of this file. |
Revision |
getLatestRevision()
Gets the latest revision of this file. |
Module |
getModule()
|
Revision |
getPreviousRevision(Revision revision)
Returns the revision which was replaced by the revision given as argument. |
java.util.SortedSet |
getRevisions()
Returns the list of Revisions of this file,
sorted from earliest to most recent. |
boolean |
hasAuthor(Author author)
Returns true, if author worked on this file. |
int |
hashCode()
|
boolean |
isDead()
Returns true if the latest revision of this file was
a deletion. |
void |
setModule(Module module)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public VersionedFile(java.lang.String name,
Directory directory)
name - The full name of the filedirectory - the directory where the file resides| Method Detail |
public java.util.Set getAuthors()
public java.lang.String getFilenameWithPath()
public java.lang.String getFilename()
public Directory getDirectory()
public Revision getLatestRevision()
public Revision getInitialRevision()
public java.util.SortedSet getRevisions()
Revisions of this file,
sorted from earliest to most recent.
Revisionspublic int getCurrentLinesOfCode()
public boolean isDead()
true if the latest revision of this file was
a deletion.
true if this file is deletedpublic boolean hasAuthor(Author author)
author worked on this file.
author - The Author to search for
true, if the author is listed in one of
this file's revisionspublic Revision getPreviousRevision(Revision revision)
revision - a revision of this file
public java.lang.String toString()
public int compareTo(java.lang.Object other)
compareTo in interface java.lang.ComparableComparable.compareTo(java.lang.Object)public boolean equals(java.lang.Object rhs)
public int hashCode()
public Revision addInitialRevision(java.lang.String revisionNumber,
Author author,
java.util.Date date,
java.lang.String comment,
int lines,
java.util.SortedSet symbolicNames)
revisionNumber - the revision number, for example "1.1"author - the login from which the change was committeddate - the time when the change was committedcomment - the commit messagelines - the number of lines of the new file
public Revision addChangeRevision(java.lang.String revisionNumber,
Author author,
java.util.Date date,
java.lang.String comment,
int lines,
int linesDelta,
int replacedLines,
java.util.SortedSet symbolicNames)
revisionNumber - the revision number, for example "1.1"author - the login from which the change was committeddate - the time when the change was committedcomment - the commit messagelines - the number of lines in the file after the changelinesDelta - the change in the number of linesreplacedLines - number of lines that were removed and replaced by others
public Revision addDeletionRevision(java.lang.String revisionNumber,
Author author,
java.util.Date date,
java.lang.String comment,
int lines,
java.util.SortedSet symbolicNames)
revisionNumber - the revision number, for example "1.1"author - the login from which the change was committeddate - the time when the change was committedcomment - the commit messagelines - the number of lines in the file before it was deleted
public Revision addBeginOfLogRevision(java.util.Date date,
int lines,
java.util.SortedSet symbolicNames)
date - the begin of the loglines - the number of lines in the file at that timepublic Module getModule()
public void setModule(Module module)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||