com.microsoft.tfs.core.clients.versioncontrol.soapextensions
Class Mapping

java.lang.Object
  extended by com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
      extended by com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Mapping
Direct Known Subclasses:
WorkingFolder

public abstract class Mapping
extends com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper

Represents a generic mapping of a server item (by path) to something, though that something is not defined here (see WorkingFolder).

Derived classes must implement getWebServiceObject().

Since:
TEE-SDK-10.1
Thread-safety:
thread-compatible

Field Summary
 
Fields inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
webServiceObject
 
Constructor Summary
Mapping(ms.tfs.versioncontrol.clientservices._03._Mapping mapping)
           
Mapping()
           
Mapping(java.lang.String serverItem, WorkingFolderType type, RecursionType recursion)
          Creates a Mapping tfor the given server item.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 RecursionType getDepth()
           
protected static int getDepthFromRecursion(RecursionType recursion)
          Converts a _RecursionType into a numeric depth value for use inside the _WorkingFolder class.
 java.lang.String getDisplayServerItem()
           Gets the path to the server item in this mapping in a format that may differ from the canonical server item (returned by getServerItem() in order to communicate more information to the user.
 java.lang.String getServerItem()
          Gets the path to the server item in this mapping.
 WorkingFolderType getType()
          Gets the type of working folder mapping.
 int hashCode()
          
 boolean isCloaked()
           
 void setServerItem(java.lang.String item)
          Sets the path to the server item in this working folder mapping.
 
Methods inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mapping

public Mapping()

Mapping

public Mapping(ms.tfs.versioncontrol.clientservices._03._Mapping mapping)

Mapping

public Mapping(java.lang.String serverItem,
               WorkingFolderType type,
               RecursionType recursion)
Creates a Mapping tfor the given server item.

Parameters:
serverItem - the server item being mapped (must not be null)
type - the type of mapping to create (must not be null)
recursion - the type of recursion to use for the working folder (must not be null)
Method Detail

getDepthFromRecursion

protected static int getDepthFromRecursion(RecursionType recursion)
Converts a _RecursionType into a numeric depth value for use inside the _WorkingFolder class.

Parameters:
recursion - the recursion type to convert (must not be null)
Returns:
one of DEPTH_FULL or DEPTH_ONE_LEVEL that corresponds to the given recursion type.

getServerItem

public java.lang.String getServerItem()
Gets the path to the server item in this mapping.

Returns:
the server path.

setServerItem

public void setServerItem(java.lang.String item)
Sets the path to the server item in this working folder mapping. Unused if this mapping type is Cloak.

Parameters:
item - the server path (must not be null)

getDisplayServerItem

public java.lang.String getDisplayServerItem()

Gets the path to the server item in this mapping in a format that may differ from the canonical server item (returned by getServerItem() in order to communicate more information to the user. For example, one-level working folder mappings (see DEPTH_ONE_LEVEL) will have "/*" appended to the path.

Do not compare or sort Mappings on this field because it might change for locale-reasons.

Returns:
the server path, perhaps modified for display.

getType

public WorkingFolderType getType()
Gets the type of working folder mapping.

Returns:
the type of working folder mapping.

getDepth

public RecursionType getDepth()
Returns:
the recursion style of the mapping.

isCloaked

public boolean isCloaked()
Returns:
true if this mapping is a cloak mapping, false if it is not.

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper

hashCode

public int hashCode()

Overrides:
hashCode in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper


© 2015 Microsoft. All rights reserved.