|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microsoft.tfs.core.clients.versioncontrol.specs.VersionedFileSpec
public final class VersionedFileSpec
Describes a version control item (by path) at one or more versions (possibly a range of versions). This class is generally used to parse user-entered text from the command line.
| Constructor Summary | |
|---|---|
VersionedFileSpec(java.lang.String item,
DeletionVersionSpec deletionSpec,
VersionSpec[] versions)
Creates a VersionedFileSpec. |
|
| Method Summary | |
|---|---|
static java.lang.String |
formatForPath(java.lang.String repositoryOrLocalPath,
VersionSpec spec)
Returns a string representation of a VersionSpec that will contain the given repository or local path plus version information that this AVersionSpec contains. |
static java.lang.String |
formatForPath(java.lang.String repositoryOrLocalPath,
VersionSpec specFrom,
VersionSpec specTo)
Returns a string representation of a VersionSpec range that will contain the given repository or local path plus version information that these AVersionSpecs contain. |
static java.lang.String |
formatPathWithDeletionIfNecessary(java.lang.String path,
int deletionID)
Takes a path and deletion ID, and if the deletion ID is 0, returns the path with the deletion appended (after a separator). |
DeletionVersionSpec |
getDeletionVersionSpec()
Gets the deletion ID specified by this versioned file spec. |
java.lang.String |
getExactUserString()
Gets the string the user typed to create this spec. |
java.lang.String |
getItem()
|
VersionSpec[] |
getVersions()
Gets the versions specified by this versioned file spec. |
static VersionedFileSpec |
parse(java.lang.String spec,
java.lang.String user,
boolean allowVersionRange)
Parses the given information into this AVersionedFileSpec object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VersionedFileSpec(java.lang.String item,
DeletionVersionSpec deletionSpec,
VersionSpec[] versions)
VersionedFileSpec.
item - the item (must not be null or empty)deletionSpec - the deletion spec (may be null)versions - the versions (must not be null)| Method Detail |
|---|
public static VersionedFileSpec parse(java.lang.String spec,
java.lang.String user,
boolean allowVersionRange)
throws VersionSpecParseException,
LabelSpecParseException
spec - the versioned file spec string (like "filename.ext;C1" or
"filename.ext;X4;C1") (must not be null or empty)user - the current user (must not be null or empty).allowVersionRange - whether to allow ranges in the version specifications.
VersionSpecParseException - if an error occured parsing the version spec string.
LabelSpecParseException - if an error occured parsing the label spec string.public java.lang.String getItem()
public VersionSpec[] getVersions()
public DeletionVersionSpec getDeletionVersionSpec()
public static final java.lang.String formatForPath(java.lang.String repositoryOrLocalPath,
VersionSpec spec)
repositoryOrLocalPath - a repository path or local path to include in the returned string.spec - an AVersionSpec.
public static final java.lang.String formatForPath(java.lang.String repositoryOrLocalPath,
VersionSpec specFrom,
VersionSpec specTo)
repositoryOrLocalPath - a repository path or local path to include in the returned string.specFrom - the first AVersionSpec.specTo - the second AVersionSpec.
public java.lang.String getExactUserString()
public static java.lang.String formatPathWithDeletionIfNecessary(java.lang.String path,
int deletionID)
path - the path to format (must not be null)deletionID - the deletion ID to append to the path after a separator, if the
deletion ID is not 0
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||