|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.sourcecontrols.VssJournal
This class handles all VSS-related aspects of determining the modifications since the last good build.
This class uses Source Safe Journal files. Unlike the history files that are generated by executing
ss.exe history
, journal files must be setup by the Source Safe administrator before the point that
logging of modifications is to occur.
This code has been tested against Visual Source Safe v6.0 build 8383.
Constructor Summary | |
VssJournal()
|
Method Summary | |
java.util.List |
getModifications(java.util.Date lastBuild,
java.util.Date now)
Do the work... |
java.util.Map |
getProperties()
Any properties that have been set in this sourcecontrol. |
protected Modification |
handleEntry(java.util.List historyEntry)
Parse individual VSS history entry |
protected boolean |
isBeforeLastBuild(java.util.Date date)
Determines if the date given is before the last build for this VssJournalElement. |
protected boolean |
isInSsDir(java.lang.String path)
Determines if the given folder is in the ssdir specified for this VssJournalElement. |
java.util.Date |
parseDate(java.lang.String nameAndDateLine)
Parse date/time from VSS file history The nameAndDateLine will look like User: Etucker Date: 6/26/01 Time: 11:53a Sometimes also this User: Aaggarwa Date: 6/29/:1 Time: 3:40p Note the ":" instead of a "0" May give additional DateFormats through the vssjournaldateformat tag. |
java.lang.String |
parseUser(java.lang.String userLine)
Parse username from VSS file history |
void |
setDateFormat(java.lang.String format)
Sets the date format to use for parsing VSS journal. |
void |
setJournalFile(java.lang.String journalFile)
Full path to journal file. |
protected void |
setLastBuildDate(java.util.Date lastBuild)
Sets the _lastBuild date. |
void |
setProperty(java.lang.String property)
Choose a property to be set if the project has modifications if we have a change that only requires repackaging, i.e. jsp, we don't need to recompile everything, just rejar. |
void |
setPropertyOnDelete(java.lang.String propertyOnDelete)
Set the name of the property to be set if some files were deleted or renamed from VSS on this project. |
void |
setSsDir(java.lang.String s)
Set the project to get history from |
void |
setTimeFormat(java.lang.String format)
Sets the time format to use for parsing VSS journal. |
java.lang.String |
substringFromLastSlash(java.lang.String input)
Returns the substring of the given string from the last "/" character. |
java.lang.String |
substringToLastSlash(java.lang.String input)
Returns the substring of the given string from the beginning to the last "/" character or till the end of the string if no slash character exists. |
void |
validate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VssJournal()
Method Detail |
public void setSsDir(java.lang.String s)
public void setJournalFile(java.lang.String journalFile)
c:/vssdata/journal/journal.txt
journalFile
- public void setProperty(java.lang.String property)
property
- public void setPropertyOnDelete(java.lang.String propertyOnDelete)
propertyOnDelete
- the name of the property to setpublic void setDateFormat(java.lang.String format)
MM/dd/yy
. If your VSS server is set to a different region, you may wish
to use a format such as dd/MM/yy
.
SimpleDateFormat
public void setTimeFormat(java.lang.String format)
hh:mma
. If your VSS server is set to a different region, you may wish to
use a format such as HH:mm
.
SimpleDateFormat
protected void setLastBuildDate(java.util.Date lastBuild)
public java.util.Map getProperties()
SourceControl
getProperties
in interface SourceControl
public void validate() throws CruiseControlException
validate
in interface SourceControl
CruiseControlException
public java.util.List getModifications(java.util.Date lastBuild, java.util.Date now)
getModifications
in interface SourceControl
lastBuild
- now
-
protected Modification handleEntry(java.util.List historyEntry)
historyEntry
- public java.util.Date parseDate(java.lang.String nameAndDateLine)
nameAndDateLine
-
public java.lang.String parseUser(java.lang.String userLine)
userLine
-
public java.lang.String substringFromLastSlash(java.lang.String input)
public java.lang.String substringToLastSlash(java.lang.String input)
protected boolean isInSsDir(java.lang.String path)
protected boolean isBeforeLastBuild(java.util.Date date)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |