com.microsoft.tfs.core.clients.versioncontrol
Class WorkspaceKey

java.lang.Object
  extended by com.microsoft.tfs.core.clients.versioncontrol.WorkspaceKey

public class WorkspaceKey
extends java.lang.Object

WorkspaceKey is a subclass of ConnectionKey that adds a workspace name attribute to the key. It can be used to cache workspaces or workspace-related data in an environment where multiple connections are anticipated. For more information, see the documentation on ConnectionKey.

Thread-safety:
immutable
Since:
TEE-SDK-10.1

Constructor Summary
WorkspaceKey(java.net.URI serverURI, java.lang.String workspaceName)
          Creates a new WorkspaceKey from the specified data.
WorkspaceKey(Workspace workspace)
          Creates a new WorkspaceKey for the specified workspace.
WorkspaceKey(WorkspaceInfo cachedWorkspace)
          Creates a new WorkspaceKey for the specified cached workspace.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 java.lang.String getWorkspaceName()
           
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkspaceKey

public WorkspaceKey(Workspace workspace)
Creates a new WorkspaceKey for the specified workspace.

Parameters:
workspace - the workspace to key (must not be null)

WorkspaceKey

public WorkspaceKey(WorkspaceInfo cachedWorkspace)
Creates a new WorkspaceKey for the specified cached workspace.

Parameters:
cachedWorkspace - the cached workspace to key (must not be null)

WorkspaceKey

public WorkspaceKey(java.net.URI serverURI,
                    java.lang.String workspaceName)
Creates a new WorkspaceKey from the specified data.

Parameters:
serverURI - the key's server URI (must not be null)
authenticatedUserName - the key's authenticated user name (must not be null)
workspaceName - the key's workspace name (must not be null)
Method Detail

getWorkspaceName

public java.lang.String getWorkspaceName()
Returns:
this key's workspace name (never null)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object


© 2012 Microsoft. All rights reserved.