|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microsoft.tfs.core.clients.versioncontrol.path.ItemPath
public abstract class ItemPath
Contains static utility methods that apply to both LocalPath and ServerPath strings.
| Constructor Summary | |
|---|---|
ItemPath()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
canonicalize(java.lang.String localOrServerPath)
Canonicalizes a local or server path. |
static void |
checkForIllegalDollarInPath(java.lang.String serverOrLocalPath)
This method throws an InputValidationException if there is a
dollar sign ('$') that follows a path separator since no part of a path
is allowed to start with a dollar sign. |
static ItemValidationError |
checkItem(java.util.concurrent.atomic.AtomicReference<java.lang.String> item,
java.lang.String parameterName,
boolean allowNull,
boolean allowWildcards,
boolean allow8Dot3Paths,
boolean checkReservedCharacters)
Validates the item as a server or local path. |
static boolean |
equals(java.lang.String serverOrLocalPath1,
java.lang.String serverOrLocalPath2)
|
static int |
hashcode(java.lang.String serverOrLocalPath)
|
static boolean |
isWildcard(java.lang.String localOrServerPath)
Tests whether the given local or server path contains wildcard characters in its final path element. |
static boolean |
isWildcard(java.lang.String localOrServerPath,
int index,
int count)
|
static boolean |
matchesWildcardFile(java.lang.String fileName,
int fileIndex,
java.lang.String wildcardPattern,
int wildcardIndex)
Tests a file name (not full path) against a wildcard pattern for a match. |
static boolean |
matchesWildcardFile(java.lang.String fileName,
java.lang.String wildcardPattern)
Compare a string against a wildcard and return true if it matches, false if not. |
static java.lang.String |
smartNativeToTFS(java.lang.String localOrServerPath)
Accepts a local path or server path for conversion to TFS path conventions. |
static java.lang.String |
smartTFSToNative(java.lang.String localOrServerPath)
Accepts a local path or server path for conversion from TFS path conventions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ItemPath()
| Method Detail |
|---|
public static java.lang.String canonicalize(java.lang.String localOrServerPath)
localOrServerPath - the local or server path to canonicalize.
public static ItemValidationError checkItem(java.util.concurrent.atomic.AtomicReference<java.lang.String> item,
java.lang.String parameterName,
boolean allowNull,
boolean allowWildcards,
boolean allow8Dot3Paths,
boolean checkReservedCharacters)
public static java.lang.String smartNativeToTFS(java.lang.String localOrServerPath)
localOrServerPath - the local or server path to convert to TFS path format.
public static java.lang.String smartTFSToNative(java.lang.String localOrServerPath)
localOrServerPath - the local or server path to convert from TFS path format to native
path format.
public static boolean isWildcard(java.lang.String localOrServerPath,
int index,
int count)
localOrServerPath - index - count -
public static boolean isWildcard(java.lang.String localOrServerPath)
localOrServerPath - the local or server path to test for wildcards (in last element
only). If null or empty, result is always false.
public static boolean matchesWildcardFile(java.lang.String fileName,
java.lang.String wildcardPattern)
fileName - String to match against the pattern.wildcardPattern - Pattern (using * and ? for wildcards) to match against
public static boolean matchesWildcardFile(java.lang.String fileName,
int fileIndex,
java.lang.String wildcardPattern,
int wildcardIndex)
fileName - the file name (not a full path) to test against the wildcard
pattern (must not be null)wildcardPattern - the wildcard pattern to use (must not be null)
public static void checkForIllegalDollarInPath(java.lang.String serverOrLocalPath)
throws InputValidationException
InputValidationException if there is a
dollar sign ('$') that follows a path separator since no part of a path
is allowed to start with a dollar sign.
serverOrLocalPath - the path to check (path must already be canonicalized) (may be
null)
InputValidationException
public static boolean equals(java.lang.String serverOrLocalPath1,
java.lang.String serverOrLocalPath2)
public static int hashcode(java.lang.String serverOrLocalPath)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||