Methods Summary |
---|
private static java.lang.String | blanks(int len)
StringBuffer b = new StringBuffer();
for (int i = 0; i < len; i++) {
b.append(' ");
}
return b.toString();
|
protected com.starbase.starteam.View | createSnapshotView(com.starbase.starteam.View raw)Override of base-class abstract function creates an
appropriately configured view for checkoutlists - either
the current view or a view from this.label.
int labelID = getLabelID(raw);
// if a label has been supplied, use it to configure the view
// otherwise use current view
if (labelID >= 0) {
return new View(raw, ViewConfiguration.createFromLabel(labelID));
}
// if a date has been supplied use a view configured to the date.
View view = getViewConfiguredByDate(raw);
if (view != null) {
return view;
// otherwise, use this view configured as the tip.
} else {
return new View(raw, ViewConfiguration.createTip());
}
|
protected void | list(com.starbase.starteam.File reposFile, java.io.File localFile)Log a repositary file and it's corresponding local file.
StringBuffer b = new StringBuffer();
int status = reposFile.getStatus();
java.util.Date displayDate = null;
if (status == Status.NEW) {
displayDate = new java.util.Date(localFile.lastModified());
} else {
displayDate = reposFile.getModifiedTime().createDate();
}
b.append(pad(Status.name(status), 12)).append(' ");
b.append(pad(getUserName(reposFile.getLocker()), 20))
.append(' ")
.append(SDF.format(displayDate))
.append(rpad(String.valueOf(reposFile.getSize()), 9))
.append(' ")
.append(reposFile.getName());
log(b.toString());
|
protected void | logOperationDescription(com.starbase.starteam.Folder starteamrootFolder, java.io.File targetrootFolder)extenders should emit to the log an entry describing the parameters
that will be used by this operation.
log((this.isRecursive() ? "Recursive" : "Non-recursive")
+ " Listing of: " + starteamrootFolder.getFolderHierarchy());
log("Listing against local folder"
+ (null == getRootLocalFolder() ? " (default): " : ": ")
+ targetrootFolder.getAbsolutePath(),
Project.MSG_INFO);
logLabel();
logAsOfDate();
logIncludes();
logExcludes();
|
protected static java.lang.String | pad(java.lang.String s, int padlen)Return a padded string.
return (s + BLANK_STRING).substring(0, padlen);
|
protected static java.lang.String | rpad(java.lang.String s, int padlen)Return a right padded string.
s = BLANK_STRING + s;
return s.substring(s.length() - padlen);
|
public void | setAsOfDate(java.lang.String asOfDateParam)List files, dates, and statuses as of this date; optional.
If not specified, the most recent version of each file will be listed.
_setAsOfDate(asOfDateParam);
|
public void | setAsOfDateFormat(java.lang.String asOfDateFormat)Date Format with which asOfDate parameter to be parsed; optional.
Must be a SimpleDateFormat compatible string.
If not specified, and asOfDateParam is specified, parse will use ISO8601
datetime and date formats.
_setAsOfDateFormat(asOfDateFormat);
|
public void | setLabel(java.lang.String label)List files, dates, and statuses as of this label; optional.
The label must exist in starteam or an exception will be thrown.
If not specified, the most recent version of each file will be listed.
_setLabel(label);
|
protected void | testPreconditions()Required base-class abstract function implementation checks for
incompatible parameters.
if (null != getLabel() && null != getAsOfDate()) {
throw new BuildException(
"Both label and asOfDate specified. "
+ "Unable to process request.");
}
|
protected void | visit(com.starbase.starteam.Folder starteamFolder, java.io.File targetFolder)Implements base-class abstract function to perform the checkout
operation on the files in each folder of the tree.
try {
if (null != getRootLocalFolder()) {
starteamFolder.setAlternatePathFragment(
targetFolder.getAbsolutePath());
}
Folder[] subFolders = starteamFolder.getSubFolders();
Item[] files = starteamFolder.getItems(getTypeNames().FILE);
UnmatchedFileMap ufm =
new UnmatchedListingMap().init(
targetFolder.getAbsoluteFile(), starteamFolder);
log("");
log("Listing StarTeam folder "
+ starteamFolder.getFolderHierarchy());
log(" against local folder " + targetFolder.getAbsolutePath());
// For all Files in this folder, we need to check
// if there have been modifications.
for (int i = 0; i < files.length; i++) {
File eachFile = (File) files[i];
String filename = eachFile.getName();
java.io.File localFile =
new java.io.File(targetFolder, filename);
ufm.removeControlledItem(localFile);
// If the file doesn't pass the include/exclude tests, skip it.
if (!shouldProcess(filename)) {
continue;
}
list(eachFile, localFile);
}
// Now we recursively call this method on all sub folders in this
// folder unless recursive attribute is off.
for (int i = 0; i < subFolders.length; i++) {
java.io.File targetSubfolder =
new java.io.File(targetFolder, subFolders[i].getName());
ufm.removeControlledItem(targetSubfolder);
if (isRecursive()) {
visit(subFolders[i], targetSubfolder);
}
}
if (this.listUncontrolled) {
ufm.processUncontrolledItems();
}
} catch (IOException e) {
throw new BuildException(e);
}
|