com.microsoft.tfs.core.clients.versioncontrol.specs
Class WorkspaceSpec

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

public final class WorkspaceSpec
extends java.lang.Object

Describes a Workspace by name and owner.

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

Constructor Summary
WorkspaceSpec(java.lang.String workspaceName, java.lang.String owner)
          Constructs an WorkspaceSpec.
 
Method Summary
 java.lang.String getName()
           
 java.lang.String getOwner()
           
static WorkspaceSpec parse(java.lang.String specString, java.lang.String fallbackOwner)
          Parse the values from the given spec string into this instance, using the given fallback owner if the owner isn't part of the combined spec.
static WorkspaceSpec parse(java.lang.String specString, java.lang.String fallbackOwner, boolean permitWildcards)
          Parse the values from the given spec string into this instance, using the given fallback owner if the owner isn't part of the combined spec.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkspaceSpec

public WorkspaceSpec(java.lang.String workspaceName,
                     java.lang.String owner)
Constructs an WorkspaceSpec.

Parameters:
workspaceName - the name of the workspace (must not be null)
owner - the owner's unique name or display name (may be null ).
Method Detail

parse

public static WorkspaceSpec parse(java.lang.String specString,
                                  java.lang.String fallbackOwner)
                           throws WorkspaceSpecParseException
Parse the values from the given spec string into this instance, using the given fallback owner if the owner isn't part of the combined spec. WorkspaceSpecParseException is thrown if the workspace name or owner contains wildcard characters.

Parameters:
specString - the workspace spec string including the name of the workspace, and possible the owner.
fallbackOwner - the owner username to use if the combined workspace spec is missing one.
Throws:
WorkspaceSpecParseException - if the string cannot be parsed into a WorkspaceSpec.

parse

public static WorkspaceSpec parse(java.lang.String specString,
                                  java.lang.String fallbackOwner,
                                  boolean permitWildcards)
                           throws WorkspaceSpecParseException
Parse the values from the given spec string into this instance, using the given fallback owner if the owner isn't part of the combined spec.

Parameters:
specString - the workspace spec string including the name of the workspace, and possible the owner.
fallbackOwner - the owner username to use if the combined workspace spec is missing one.
permitWildcards - if true, the workspace name and owner may contain wildcards, if false WorkspaceSpecParseException is thrown if the name or owner contains wildcards
Throws:
WorkspaceSpecParseException - if the string cannot be parsed into a WorkspaceSpec.

getName

public java.lang.String getName()

getOwner

public java.lang.String getOwner()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© 2015 Microsoft. All rights reserved.