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

java.lang.Object
  extended by com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
      extended by com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace
All Implemented Interfaces:
java.lang.Comparable<Workspace>

public final class Workspace
extends com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
implements java.lang.Comparable<Workspace>

A Workspace is a named set of user-configured working folders. This class provides methods to make changes to that configuration as well as to perform source control tasks that are workspace-centric (check out, check-in, get latest/specific versions, etc.).

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
Workspace(ms.tfs.versioncontrol.clientservices._03._Workspace workspace, VersionControlClient client)
          Constructs a Workspace that wraps a web service object.
Workspace(VersionControlClient client, java.lang.String name, java.lang.String owner, java.lang.String ownerDisplayName, java.lang.String[] ownerAliases, java.lang.String comment, java.lang.String securityToken, WorkingFolder[] workingFolders, java.lang.String computer, WorkspaceLocation location, WorkspacePermissions effectivePermissions, WorkspacePermissionProfile permissionProfile, WorkspaceOptions options)
          Constructs a Workspace.
Workspace(VersionControlClient client, java.lang.String name, java.lang.String owner, java.lang.String ownerDisplayName, java.lang.String[] ownerAliases, java.lang.String comment, WorkingFolder[] workingFolders, java.lang.String computer, WorkspaceLocation location, WorkspacePermissions effectivePermissions)
           
Workspace(VersionControlClient client, java.lang.String name, java.lang.String owner, java.lang.String comment, WorkingFolder[] workingFolders, java.lang.String computer, WorkspaceLocation location)
          Constructs a Workspace.
 
Method Summary
 void addConflict(ConflictType conflictType, int itemID, int versionServer, int pendingChangeID, java.lang.String sourceLocalItem, java.lang.String targetLocalItem, OperationStatus conflictReason)
          Notifies the server that we've discovered a conflict with our local files.
 java.lang.String addIgnoreFileExclusion(java.lang.String exclusion, java.lang.String ignoreFileDirectory)
          Adds an ignore file exclusion to the .tfignore file in the specified directory, creating the file if necessary.
 java.lang.String addIgnoreFileExclusionAuto(java.lang.String localItem)
          Finds the closest existing .tfignore file to the specified local item, or creates one if none was found, and adds a relative path exclusion item that will exclude the local item.
 java.lang.String addIgnoreFileExclusionAuto(java.lang.String localItem, java.lang.String exclusion)
          Finds the closest existing .tfignore file to the specified local item, or creates one if none was found, and adds the specified exclusion text.
 void addOrChangeMapping(java.lang.String serverPath, java.lang.String localPath)
           A convenience method to create or change a new regular (non-cloaked) working folder mapping on this Workspace.
protected  BranchHistory buildBranchHistoryTree(ms.tfs.versioncontrol.clientservices._03._BranchRelative[] relatives)
          Put the flattened results from the SOAP query into a hierarchy.
 SavedCheckin buildEmptyLastSavedCheckin()
           
static WorkingFolder[] checkForInternalMappingConflicts(java.lang.String workspaceName, WorkingFolder[] folders, boolean removeUnparentedCloaks)
          Checks for conflicting working folders within the working folder array itself.
 int checkIn(PendingChange[] changes, java.lang.String comment)
           
 int checkIn(PendingChange[] changes, java.lang.String comment, CheckinNote checkinNote, WorkItemCheckinInfo[] associatedWorkItems, PolicyOverrideInfo policyOverrideInfo)
           
 int checkIn(PendingChange[] changes, java.lang.String author, java.lang.String authorDisplayName, java.lang.String comment, CheckinNote checkinNote, WorkItemCheckinInfo[] associatedWorkItems, PolicyOverrideInfo policyOverrideInfo)
           
 int checkIn(PendingChange[] changes, java.lang.String author, java.lang.String authorDisplayName, java.lang.String comment, CheckinNote checkinNote, WorkItemCheckinInfo[] associatedWorkItems, PolicyOverrideInfo policyOverrideInfo, CheckinFlags flags)
           
 int checkIn(PendingChange[] changes, java.lang.String committer, java.lang.String committerDisplayName, java.lang.String author, java.lang.String authorDisplayName, java.lang.String comment, CheckinNote checkinNote, WorkItemCheckinInfo[] associatedWorkItems, PolicyOverrideInfo policyOverrideInfo, CheckinFlags flags)
          Checkin pending changes in this workspace.
 Failure[] checkPendingChanges(java.lang.String[] serverItems)
          Checks the given server items for conflicts before a checkin is performed.
static int compareComment(java.lang.String comment1, java.lang.String comment2)
           
static int compareComputer(java.lang.String computer1, java.lang.String computer2)
           
static int compareName(java.lang.String name1, java.lang.String name2)
           
static int compareOwner(java.lang.String owner1, java.lang.String owner2)
           
static int compareSecurityToken(java.lang.String securityToken1, java.lang.String securityToken2)
           
static int compareServerURI(java.net.URI uri1, java.net.URI uri2)
           
 int compareTo(Workspace other)
          Compares two workspaces first by server URL, then by workspace name, then by owner (all case insensitive).
 int createBranch(java.lang.String sourceServerPath, java.lang.String targetServerPath, VersionSpec version)
          Creates a branch of the given source path at the given version to the given target path.
 LabelResult[] createLabel(VersionControlLabel label, LabelItemSpec[] items, LabelChildOption options)
          Create or update a label for items in this workspace.
 void createWorkingFolder(WorkingFolder wf)
          Create a working folder mapping for this workspace.
 void createWorkingFolder(WorkingFolder newWorkingFolder, boolean overwriteExisting)
          Create a working folder mapping for this workspace.
 void createWorkingFolders(WorkingFolder[] newWorkingFolders)
          Create new working folder mappings for this workspace.
 void createWorkingFolders(WorkingFolder[] newWorkingFolders, boolean overwriteExisting)
          Create new working folder mappings for this workspace.
 void deleteWorkingFolder(WorkingFolder wf)
          Delete a working folder mapping from this workspace.
 void deleteWorkingFolders(WorkingFolder[] workingFolders)
          Delete a working folder mapping from this workspace.
 boolean equals(java.lang.Object obj)
          
 CheckinEvaluationResult evaluateCheckIn(CheckinEvaluationOptions options, PendingChange[] allChanges, PendingChange[] changesToCheckin, java.lang.String comment, CheckinNote checkinNotes, WorkItemCheckinInfo[] workItemChanges, PolicyEvaluator policyEvaluator, PolicyContext policyContext)
          Checks for required checkin notes and evaluates the given changes against defined checkin policies before they are sent to the server for check-in.
 CheckinEvaluationResult evaluateCheckIn(CheckinEvaluationOptions options, PendingCheckin pendingCheckin, PolicyContext policyContext)
          Checks for required checkin notes and evaluates the given changes against defined checkin policies before they are sent to the server for check-in.
 ReconcilePendingChangesStatus findReconcilablePendingChangesForChangeset(Changeset changeset, PendingChange[] pendingChanges)
           Finds pending changes in the given array which can be safely reconciled (undone) to match the changes in the given changeset.
 GetStatus get(GetOptions options)
          Update all items in this workspace to the latest version.
 GetStatus get(GetRequest[] requests, GetOptions options)
           
 GetStatus get(GetRequest[] requests, GetOptions options, java.lang.String[] itemPropertyFilters, boolean alwaysQueryConflicts, java.util.concurrent.atomic.AtomicReference<Conflict[]> conflicts)
          Update the given items for the given workspace.
 GetStatus get(GetRequest request, GetOptions options)
          Update the given items for the given workspace.
 GetStatus get(VersionSpec version, GetOptions options)
          Update all items in this workspace to the given version.
 BranchHistory[] getBranchHistory(ItemSpec[] itemSpecs, VersionSpec versionSpec)
          Gets the branch history for the specified items at the specified version.
 BranchHistory getBranchHistory(ItemSpec itemSpec, VersionSpec versionSpec)
          Gets the branch history for the specified item at the specified version.
 VersionControlClient getClient()
          Gets the source code control client instance used by this workspace, which will always describe a connection to the server in which this workspace resides.
 WorkingFolder getClosestMappingForLocalPath(java.lang.String localPath)
          Gets the closest working folder mapping for the specified local path.
 WorkingFolder getClosestMappingForServerPath(java.lang.String serverPath)
          Gets the closest working folder mapping for the specified server path.
 java.lang.String getComment()
           
 java.lang.String getComputer()
           
 java.lang.String getDisplayName()
          Obtains the display name of this workspace.
 WorkingFolder getExactMappingForLocalPath(java.lang.String localPath)
           Gets the working folder that contains an exact match for the specified local path (including cloak mappings) or null if there is no exact match.
 WorkingFolder getExactMappingForServerPath(java.lang.String serverPath)
           Gets the working folder that contains an exact match for the specified server path (including cloak mappings) or null if there is no exact match.
 ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType)
           Gets extended information about items.
 ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, GetItemsOptions options)
           
 ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, GetItemsOptions options, java.lang.String[] itemPropertyFilters)
           Gets extended information about items, with full results control.
 ExtendedItem[] getExtendedItems(java.lang.String itemPath, DeletedState deletedState, ItemType itemType)
           Gets extended information about items.
 WorkingFolder[] getFolders()
          Gets all the working folder mappings in this workspace.
 WorkspaceItemSet[] getItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, boolean generateDownloadUrls, GetItemsOptions getItemsOptions)
          For each provided ItemSpec, returns a corresponding WorkspaceItemSet containing data about items in the workspace.
 java.util.Calendar getLastAccessDate()
           
 SavedCheckin getLastSavedCheckin()
           
 java.lang.String getLocalMetadataDirectory()
          The full path to the metadata directory for this workspace (local workspaces only).
 WorkspaceLocation getLocation()
           
 java.lang.String getMappedLocalPath(java.lang.String serverPath)
           Maps the given server path to a local path using the most precise working folder mapping in this workspace.
 java.lang.String[] getMappedPaths()
          
 java.lang.String getMappedServerPath(java.lang.String localPath)
           Maps the given local path to a server path using the most precise working folder mapping in this workspace.
 MergeCandidate[] getMergeCandidates(java.lang.String sourcePath, java.lang.String targetPath, RecursionType recursion, MergeFlags mergeFlags)
          Look up the merge candidates for merging between the requested items.
 java.lang.String getName()
          Gets this workspace's name.
 com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.OfflineCacheData getOfflineCacheData()
          Get the cached local workspace data.
 WorkspaceOptions getOptions()
           
 java.lang.String[] getOwnerAliases()
           
 IdentityDescriptor getOwnerDescriptor()
           
 java.lang.String getOwnerDisplayName()
           
 java.lang.String getOwnerName()
          
 PendingSet getPendingChanges()
          Get all pending changes for items in this workspace.
 PendingSet getPendingChanges(ItemSpec[] specs, boolean includeDownloadInfo)
           
 PendingSet getPendingChanges(ItemSpec[] specs, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
          Get all pending changes for the given server items.
 PendingSet getPendingChanges(java.lang.String[] serverPaths, RecursionType recursionType, boolean includeDownloadInfo)
           
 PendingSet getPendingChanges(java.lang.String[] serverPaths, RecursionType recursionType, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
          Get all pending changes for the given server item.
 PendingChange[] getPendingChangesWithCandidates(ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.util.concurrent.atomic.AtomicReference<PendingChange[]> candidateChanges)
           
 PendingChange[] getPendingChangesWithCandidates(ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.util.concurrent.atomic.AtomicReference<PendingChange[]> candidateChanges, java.lang.String[] itemPropertyFilters)
          Gets all of the pending changes and candidate changes.
 WorkspacePermissions getPermissions()
           
 WorkspacePermissionProfile getPermissionsProfile()
           
 java.lang.String getQualifiedName()
           
 java.lang.String getSecurityToken()
           
 com.microsoft.tfs.util.GUID getServerGUID()
           
 java.lang.String getServerName()
          Gets a name for the current server (and project collection) that the workspace is connected to that is suitable for display to the end-user.
 java.net.URI getServerURI()
           
 java.lang.String getUniqueName()
          Obtains the unique name of this workspace.
 ms.tfs.versioncontrol.clientservices._03._Workspace getWebServiceObject()
          Gets the web service object this class wraps.
 WorkingFolder getWorkingFolderFromPaths(java.lang.String serverPath, java.lang.String localPath)
           A convenience method to create a new regular WorkingFolder from the given server and local path.
 java.lang.String getWorkspaceDirectory(java.lang.String basePath)
          Helper method which returns a subdirectory of the provided path.
 WorkspaceWatcher getWorkspaceWatcher()
          Gets the disk scanner used to detect changes in local workspaces.
 boolean hasAdministerPermission()
           
 int hashCode()
          
static int hashName(java.lang.String name)
           
static int hashOwner(java.lang.String ownerName)
           
 boolean hasWorkspacePermission(WorkspacePermissions permissionToCheck)
          Checks to see whether this.VersionControlServer.AuthorizedUser has the provided WorkspacePermissions bits on this workspace.
 void invalidate()
          Used by the VersionControlClient to notify the workspace object that its mappings have potentially changed.
 void invalidateMappings()
          Invalidates the cached copy of the workspace mappings held by this Workspace object and causes the next access to them to re-fetch them from the server or local data access layer
 boolean isDeleted()
           
 boolean isLocal()
          Tests whether this workspace is for this computer (the computer name matches this computer's name and the working folder mappings are for paths on this computer).
 boolean isLocalPathMapped(java.lang.String localPath)
          Tests whether the given local path is mapped to a working folder in this workspace and that mapping is not a cloak.
 boolean isLocalWorkspace()
           
 boolean isServerPathMapped(java.lang.String serverPath)
          Tests whether the given server path is mapped to a working folder in this workspace and that mapping is not a cloak.
 com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLock lock()
          Locks the local workspace from changes by other threads and processes.
 void map(java.lang.String serverPath, java.lang.String localPath)
           A convenience method to create a new regular (non-cloaked) working folder mapping on this Workspace.
static boolean matchComment(java.lang.String comment1, java.lang.String comment2)
           
 boolean matchComputer(java.lang.String computer)
           
static boolean matchComputer(java.lang.String computer1, java.lang.String computer2)
           
 boolean matchName(java.lang.String workspaceName)
           
static boolean matchName(java.lang.String name1, java.lang.String name2)
           
 boolean matchOwner(java.lang.String owner)
           
static boolean matchOwner(java.lang.String owner1, java.lang.String owner2)
           
static boolean matchSecurityToken(java.lang.String securityToken1, java.lang.String securityToken2)
           
static boolean matchServerGUID(com.microsoft.tfs.util.GUID serverGUID1, com.microsoft.tfs.util.GUID serverGUID2)
           
static boolean matchServerURI(java.net.URI serverURI1, java.net.URI serverURI2)
           
 GetStatus merge(ItemSpec sourceSpec, java.lang.String targetPath, VersionSpec sourceVersionFrom, VersionSpec sourceVersionTo, LockLevel lockLevel, MergeFlags mergeFlags, java.lang.String[] itemPropertyFilters)
          Merge changes made between two versions to items in a given source path into a given target path.
 GetStatus merge(java.lang.String sourcePath, java.lang.String targetPath, VersionSpec sourceVersionFrom, VersionSpec sourceVersionTo, LockLevel lockLevel, RecursionType recursion, MergeFlags mergeFlags)
           
 GetStatus merge(java.lang.String sourcePath, java.lang.String targetPath, VersionSpec sourceVersionFrom, VersionSpec sourceVersionTo, LockLevel lockLevel, RecursionType recursion, MergeFlags mergeFlags, java.lang.String[] itemPropertyFilters)
           
 boolean ownerNameMatches(java.lang.String ownerName)
          Returns true if the owner name matches any of the valid owner names ( getOwnerName(), getOwnerDisplayName(), getOwnerAliases()) for this workspace.
 int pendAdd(java.lang.String[] paths, boolean recursive, FileEncoding fileEncoding, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
          Ask the server for permission to add file from local working folders.
 int pendAdd(java.lang.String[] paths, boolean recursive, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.util.Map<java.lang.String,FileEncoding> encodingHints, FileEncoding defaultEncoding)
          Ask the server for permission to add file from local working folders.
 int pendBranch(java.lang.String sourcePath, java.lang.String targetPath, VersionSpec version, LockLevel lockLevel, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendBranch(java.lang.String sourcePath, java.lang.String targetPath, VersionSpec version, LockLevel lockLevel, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pends a branch change.
 int pendDelete(ItemSpec[] specs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendDelete(ItemSpec[] specs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a deletion of one or more items, with possibly differing lock levels for each item.
 int pendDelete(ItemSpec[] specs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendDelete(ItemSpec[] specs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a deletion of one or more items, all at the same lock level.
 int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a deletion of one or more items, with possibly differing lock levels for each item.
 int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a deletion of one or more items, all at the same lock level.
 int pendEdit(ItemSpec[] specs, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendEdit(ItemSpec[] specs, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Ask the server for permission to begin editing one or more files.
 int pendEdit(ItemSpec[] specs, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendEdit(ItemSpec[] specs, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Ask the server for permission to begin editing one or more files.
 int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Ask the server for permission to begin editing one or more files.
 int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Ask the server for permission to begin editing one or more files.
 int pendPropertyChange(ItemProperties[] specs, RecursionType recursion, LockLevel lockLevel, PendChangesOptions options, java.lang.String[] itemPropertyFilters)
          Pends changes on the passed in paths giving each of them the passed in properties.
 int pendPropertyChange(java.lang.String[] paths, PropertyValue[] properties, RecursionType recursion, LockLevel lockLevel, PendChangesOptions options, java.lang.String[] itemPropertyFilters)
          Pends changes on the passed in paths giving each of them the passed in properties.
 int pendPropertyChange(java.lang.String[] paths, PropertyValue property, RecursionType recursion, LockLevel lockLevel)
          Pends changes on the passed in paths giving each of them the passed in properties.
 int pendPropertyChange(java.lang.String path, PropertyValue property)
          Pends changes on the passed in path giving it the passed in property.
 int pendPropertyChange(java.lang.String path, PropertyValue[] properties, RecursionType recursion, LockLevel lockLevel)
          Pends changes on the passed in path giving it the passed in properties.
 int pendPropertyChange(java.lang.String path, PropertyValue property, RecursionType recursion, LockLevel lockLevel)
          Pends changes on the passed in path giving it the passed in properties.
 int pendRename(java.lang.String[] oldPaths, java.lang.String[] newPaths, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions)
           
 int pendRename(java.lang.String[] oldPaths, java.lang.String[] newPaths, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pends renames of multiple items.
 int pendRename(java.lang.String oldPath, java.lang.String newPath, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions)
           
 int pendRename(java.lang.String oldPath, java.lang.String newPath, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a rename of an item.
 int pendUndelete(ItemSpec[] items, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendUndelete(ItemSpec[] items, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a restore of a deleted items, with possibly differing lock levels for each item.
 int pendUndelete(ItemSpec[] items, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendUndelete(ItemSpec[] items, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a restore of a deleted items, all at the same lock level.
 int pendUndelete(ItemSpec item, java.lang.String newName, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int pendUndelete(ItemSpec item, java.lang.String newName, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Pend a restore of a single deleted item and declare a new name for it.
 GetOperation[][] previewGetItems(GetRequest[] requests, GetOptions options)
           
 GetOperation[][] previewGetItems(GetRequest[] requests, GetOptions options, java.lang.String[] itemPropertyFilters)
          Gets the GetOperations for the given GetRequests, but does not update the workspace or fire any events.
 Conflict[] queryConflicts(ItemSpec[] itemSpecs)
          Queries the server for any conflicts in this workspace that match the given filters.
 Conflict[] queryConflicts(java.lang.String[] pathFilters, boolean recursive)
          Queries the server for conflicts in this workspace that match the given filters.
 FileType[] queryFileTypes()
          Queries the server for registered file types.
 Changeset[] queryHistory(java.lang.String serverOrLocalPath, VersionSpec version, int deletionID, RecursionType recursion, java.lang.String user, VersionSpec versionFrom, VersionSpec versionTo, int maxCount, boolean includeFileDetails, boolean slotMode, boolean includeDownloadInfo, boolean sortAscending)
          Queries the server for history about an item.
 java.util.Iterator<Changeset> queryHistoryIterator(java.lang.String serverOrLocalPath, VersionSpec version, int deletionID, RecursionType recursion, java.lang.String user, VersionSpec versionFrom, VersionSpec versionTo, int maxCount, boolean includeFileDetails, boolean slotMode, boolean includeDownloadInfo, boolean sortAscending)
          Queries the server for history about an item.
 VersionControlLabel[] queryLabels(java.lang.String label, java.lang.String scope, java.lang.String owner, boolean includeItemDetails, java.lang.String filterItem, VersionSpec filterItemVersion)
          Query the collection of labels that match the given specifications.
 PendingSet[] queryPendingSets(ItemSpec[] itemSpecs, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo)
           
 PendingSet[] queryPendingSets(ItemSpec[] itemSpecs, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
           
 PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths, RecursionType recursionType, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo)
           
 PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths, RecursionType recursionType, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
           
 PendingSet[] queryShelvedChanges(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs)
           
 PendingSet[] queryShelvedChanges(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs, boolean includeDownloadInfo)
           
 PendingSet[] queryShelvedChanges(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
           
 void reconcile(boolean reconcileMissingLocalItems, java.util.concurrent.atomic.AtomicBoolean pendingChangesUpdatedByServer)
          Reconciles a local workspace with the server.
 void refresh()
          Refreshes workspace information based on updated information on the server.
 void refreshIfNeeded()
          Refreshes this Workspace instance from the server if uncacheable properties are stale or have not been loaded.
 void refreshMappingsIfNeeded()
          Refreshes the mappings from the server if: The mappings are missing (no matter what type of workspace is in question) The workspace is a server workspace and the uncached properties are stale
 void removeLocalConflict(Conflict conflict)
          Removes a local conflict from the server's list of conflicts for this workspace.
 void removeLocalConflicts(Conflict[] conflicts)
          Removes local conflicts from the server's list of conflicts for this workspace.
 void resolveConflict(Conflict conflict)
           
 void resolveConflict(Conflict conflict, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
           
 void resolveConflict(Conflict conflict, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts, java.lang.String[] itemPropertyFilters)
           
 void resolveConflict(Conflict conflict, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts, java.lang.String[] itemPropertyFilters, ExternalToolset externalToolset, com.microsoft.tfs.util.process.ProcessFinishedHandler finishedHandler, java.io.OutputStream capturedStandardOutput, java.io.OutputStream capturedStandardError)
           
 void resolveConflicts(Conflict[] conflicts, java.lang.String[] itemPropertyFilters, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
           
 void resolveConflicts(Conflict[] conflicts, java.lang.String[] itemPropertyFilters, ResolveErrorOptions errorOptions, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
           
 void resolveConflicts(Conflict[] conflicts, java.lang.String[] itemPropertyFilters, ResolveErrorOptions errorOptions, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts, ExternalToolset externalToolset, com.microsoft.tfs.util.process.ProcessFinishedHandler finishedHandler, java.io.OutputStream capturedStandardOutput, java.io.OutputStream capturedStandardError)
          Attempts to resolve conflicts according to their Resolution property.
 GetStatus rollback(ItemSpec[] itemSpecs, VersionSpec itemVersionSpec, VersionSpec versionFrom, VersionSpec versionTo, LockLevel lockLevel, RollbackOptions options)
           
 GetStatus rollback(ItemSpec[] itemSpecs, VersionSpec itemVersionSpec, VersionSpec versionFrom, VersionSpec versionTo, LockLevel lockLevel, RollbackOptions options, java.lang.String[] itemPropertyFilters)
          Pends a change that reverts the contents of one or more items to a previous version's contents.
 boolean serverPathExists(java.lang.String serverPath)
          Check whether serverPath exists on the server
 boolean serverPathExists(java.lang.String serverPath, VersionSpec versionSpec)
          Check whether serverPath exists on the server in a certain versionSpec
 void setDeleted(boolean deleted)
           
 void setFileTypes(FileType[] fileTypes)
          Sets the list of registered file types on the server.
 void setFolders(WorkingFolder[] folders)
           
 void setLastSavedCheckin(SavedCheckin newSavedCheckin)
           
 int setLock(ItemSpec[] itemSpecs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int setLock(ItemSpec[] itemSpecs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Sets (or unsets) a lock on a file or folder.
 int setLock(ItemSpec[] itemSpecs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int setLock(ItemSpec[] itemSpecs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Sets (or unsets) a lock on a file or folder.
 int setLock(java.lang.String[] paths, LockLevel[] lockLevels, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int setLock(java.lang.String[] paths, LockLevel[] lockLevels, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Sets (or unsets) a lock on a file or folder.
 int setLock(java.lang.String[] paths, LockLevel lockLevel, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions)
           
 int setLock(java.lang.String[] paths, LockLevel lockLevel, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
          Sets (or unsets) a lock on a file or folder.
 void setPermissionsProfile(WorkspacePermissionProfile newPermissionProfile)
           
 void shelve(Shelveset set, PendingChange[] changesToShelve, boolean replace, boolean move)
          Send pending changes to the server for storage without being checked in.
 java.lang.String toString()
          
 PathTranslation translateLocalPathToServerPath(java.lang.String localPath)
           Gets a new working folder that describes the mapping between the given local path and its server item.
 PathTranslation translateServerPathToLocalPath(java.lang.String serverPath)
           Gets a new working folder that describes the mapping between the given server path and its local item.
 int undo(ItemSpec[] items)
          Undoes pending changes for matching items in this workspace.
 int undo(ItemSpec[] items, GetOptions getOptions)
           
 int undo(ItemSpec[] items, GetOptions getOptions, boolean deleteAdds, java.lang.String[] itemPropertyFilters)
          Undoes pending changes for matching items in this workspace.
 int undo(ItemSpec[] items, GetOptions getOptions, java.lang.String[] itemPropertyFilters)
           
 LabelResult[] unlabelItem(java.lang.String label, java.lang.String scope, ItemSpec[] items, VersionSpec version)
          Removes a label that was applied to an item.
 UnshelveResult unshelve(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs)
           
 UnshelveResult unshelve(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs, java.lang.String[] itemPropertyFilters, java.lang.String[] shelvesetPropertyFilters, boolean merge, boolean noAutoResolve)
          Unshelves changes, restoring them to the workspace.
 void update(java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, java.lang.String newComputer, WorkingFolder[] newMappings, WorkspacePermissionProfile newPermissionProfile, boolean removeUnparentedCloaks)
          Update a workspace.
 void update(java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, java.lang.String newComputer, WorkingFolder[] newMappings, WorkspacePermissionProfile newPermissionProfile, boolean removeUnparentedCloaks, WorkspaceOptions newOptions)
          Update a workspace.
 void update(java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, java.lang.String newComputer, WorkingFolder[] newMappings, WorkspacePermissionProfile newPermissionProfile, boolean removeUnparentedCloaks, WorkspaceOptions newOptions, WorkspaceLocation newLocation)
          Update a workspace.
 void update(java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, WorkingFolder[] newMappings, boolean removeUnparentedCloaks)
          Update a workspace.
 void update(java.lang.String newName, java.lang.String newComment, WorkingFolder[] newMappings)
          Update a workspace.
 void update(java.lang.String newName, java.lang.String newComment, WorkingFolder[] newMappings, boolean removeUnparentedCloaks)
          Update a workspace.
 void updateComputerName()
          Update the name of the computer in the repository.
 void updateFromWorkspace(Workspace updateSource)
          An internal helper method called by RuntimeWorkspaceCache to update properties of a Workspace object when new information has been retrieved from the server.
 void updateLastSavedCheckin(Shelveset shelveset)
          Updates the last attempted checkin information with the information from the shelveset.
 void updateLastSavedCheckin(Shelveset shelveset, PendingChange[] unshelvedChanges)
          Updates the last attempted checkin information with the information from the shelveset and ensures that the specified set of pending changes have a checked state set.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Workspace

public Workspace(ms.tfs.versioncontrol.clientservices._03._Workspace workspace,
                 VersionControlClient client)
Constructs a Workspace that wraps a web service object. This constructor is for internal use only. Do not use it to create new TFS workspaces, use the createWorkspace methods on VersionControlClient instead.

Parameters:
workspace - a _Workspace object returned from the server (must not be null)
client - a VersionControlClient instace this Workspace can use (must not be null)

Workspace

public Workspace(VersionControlClient client,
                 java.lang.String name,
                 java.lang.String owner,
                 java.lang.String comment,
                 WorkingFolder[] workingFolders,
                 java.lang.String computer,
                 WorkspaceLocation location)
Constructs a Workspace.

This overload should only be used if this object is going to be sent to the server because it doesn't take in the ownerDisplayName or ownerAliases.


Workspace

public Workspace(VersionControlClient client,
                 java.lang.String name,
                 java.lang.String owner,
                 java.lang.String ownerDisplayName,
                 java.lang.String[] ownerAliases,
                 java.lang.String comment,
                 WorkingFolder[] workingFolders,
                 java.lang.String computer,
                 WorkspaceLocation location,
                 WorkspacePermissions effectivePermissions)

Workspace

public Workspace(VersionControlClient client,
                 java.lang.String name,
                 java.lang.String owner,
                 java.lang.String ownerDisplayName,
                 java.lang.String[] ownerAliases,
                 java.lang.String comment,
                 java.lang.String securityToken,
                 WorkingFolder[] workingFolders,
                 java.lang.String computer,
                 WorkspaceLocation location,
                 WorkspacePermissions effectivePermissions,
                 WorkspacePermissionProfile permissionProfile,
                 WorkspaceOptions options)
Constructs a Workspace.

Parameters:
client - a VersionControlClient instace this Workspace can use (must not be null)
name - the name of this workspace (must not be null or empty)
owner - the TFS user who owns this workspace (must include domain) (may be null or empty only if the Workspace will be sent to the server)
ownerDisplayName - the display name of the TFS user who owns this workspace (may be null or empty only if the Workspace will be sent to the server)
ownerAliases - the aliases of the TFS user who owns this workspace (may be null only if the Workspace will be sent to the server)
comment - an optional comment (may be null)
securityToken - the user's security identifier (may be null)
workingFolders - working folder mappings for this workspace (may be null)
computer - the computer where this workspace exists (must not be null or empty)
location - where the workspace data is stored (must not be null)
effectivePermissions - the permissions for this workspace (must not be null)
permissionProfile - the permission profile to use for this workspace (may be null)
options - the workspace options (must not be null)
Method Detail

getWorkspaceWatcher

public WorkspaceWatcher getWorkspaceWatcher()
Gets the disk scanner used to detect changes in local workspaces.


getOfflineCacheData

public com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.OfflineCacheData getOfflineCacheData()
Get the cached local workspace data.


getLocalMetadataDirectory

public java.lang.String getLocalMetadataDirectory()
The full path to the metadata directory for this workspace (local workspaces only). The path is in the ProgramData directory.


getWorkspaceDirectory

public java.lang.String getWorkspaceDirectory(java.lang.String basePath)
Helper method which returns a subdirectory of the provided path. The subdirectory is unique to this workspace and contains the TPC GUID, the workspace name, and the workspace owner's TFID in it.

Parameters:
basePath - Base path to form the path from
Returns:
Workspace-unique directory

getWebServiceObject

public ms.tfs.versioncontrol.clientservices._03._Workspace getWebServiceObject()
Gets the web service object this class wraps. The returned object should not be modified.

Returns:
the web service object this class wraps.

getServerName

public java.lang.String getServerName()
Gets a name for the current server (and project collection) that the workspace is connected to that is suitable for display to the end-user.

Returns:
the server name in a user displayable form.

getServerURI

public java.net.URI getServerURI()
Returns:
the Team Foundation Server URI
See Also:
TFSConnection.getBaseURI()

getServerGUID

public com.microsoft.tfs.util.GUID getServerGUID()
Returns:
the Team Foundation Server project collection GUID

getClient

public VersionControlClient getClient()
Gets the source code control client instance used by this workspace, which will always describe a connection to the server in which this workspace resides.

Returns:
the client used by this workspace.

invalidate

public void invalidate()
Used by the VersionControlClient to notify the workspace object that its mappings have potentially changed. This may happen when the file on disk is changed, a pending change is made or undone that renames a mapping. There may be other operations that invalidate the cache as well.


invalidateMappings

public void invalidateMappings()
Invalidates the cached copy of the workspace mappings held by this Workspace object and causes the next access to them to re-fetch them from the server or local data access layer


getExtendedItems

public ExtendedItem[] getExtendedItems(java.lang.String itemPath,
                                       DeletedState deletedState,
                                       ItemType itemType)

Gets extended information about items.

Uses GetOptions.NONE for the query, so no download information, branch history, or source renames are returned. Use VersionControlClient.getExtendedItems(String, String, ItemSpec[], DeletedState, ItemType, GetItemsOptions) for full control over results.

Parameters:
itemPath - the server or local path to get extended information for. (must not be null or empty)
deletedState - the deleted state of items you want to list (must not be null)
itemType - the types of items you want to list (must not be null )
Returns:
an array of ExtendedItem

getExtendedItems

public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs,
                                         DeletedState deletedState,
                                         ItemType itemType)

Gets extended information about items.

Uses GetOptions.NONE for the query, so no download information, branch history, or source renames are returned. Use getExtendedItems(ItemSpec[], DeletedState, ItemType, GetItemsOptions) for full control over results.

Equivalent To:
getExtendedItems(itemSpecs, deletedState, itemType,
             GetItemsOptions.NONE)

getExtendedItems

public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs,
                                         DeletedState deletedState,
                                         ItemType itemType,
                                         GetItemsOptions options)
Equivalent To:
getExtendedItems(itemSpecs, deletedState, itemType, options,
             null)

getExtendedItems

public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs,
                                         DeletedState deletedState,
                                         ItemType itemType,
                                         GetItemsOptions options,
                                         java.lang.String[] itemPropertyFilters)

Gets extended information about items, with full results control.

Parameters:
itemSpecs - instances of ItemSpec that describe the item sets you want returned. One ItemSet will be returned for each ItemSpec. (must not be null or empty)
deletedState - the deleted state of items you want to list (must not be null)
itemType - the types of items you want to list (must not be null )
options - the GetItemsOptions which control the returned results (must not be null)
itemPropertyFilters - a list of properties to query (may be null)
Returns:
an array of ExtendedItem arrays, each outer array representing one given ItemSpec, and each inner array representing the matches found for those ItemSpecs (should be only one object in these inner arrays because recursion is not an option). Inner arrays may be empty but are never null.

getItems

public WorkspaceItemSet[] getItems(ItemSpec[] itemSpecs,
                                   DeletedState deletedState,
                                   ItemType itemType,
                                   boolean generateDownloadUrls,
                                   GetItemsOptions getItemsOptions)
For each provided ItemSpec, returns a corresponding WorkspaceItemSet containing data about items in the workspace.


addConflict

public void addConflict(ConflictType conflictType,
                        int itemID,
                        int versionServer,
                        int pendingChangeID,
                        java.lang.String sourceLocalItem,
                        java.lang.String targetLocalItem,
                        OperationStatus conflictReason)
Notifies the server that we've discovered a conflict with our local files.


evaluateCheckIn

public CheckinEvaluationResult evaluateCheckIn(CheckinEvaluationOptions options,
                                               PendingChange[] allChanges,
                                               PendingChange[] changesToCheckin,
                                               java.lang.String comment,
                                               CheckinNote checkinNotes,
                                               WorkItemCheckinInfo[] workItemChanges,
                                               PolicyEvaluator policyEvaluator,
                                               PolicyContext policyContext)
                                        throws PolicyEvaluationCancelledException
Checks for required checkin notes and evaluates the given changes against defined checkin policies before they are sent to the server for check-in.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
options - flags that affect which things are evaluated (must not be null)
allChanges - all pending changes for this workspace (required by checkin policies). (must not be null or empty)
changesToCheckin - the changes that are "checked" in the user interface, or are otherwise selected for checkin (must not be null or empty).
comment - a user-supplied checkin comment (must not be null)
checkinNotes - the user's checkin notes (must not be null)
workItemChanges - work items that will be updated for this checkin (must not be null)
policyEvaluator - a PolicyEvaluator object configured with a PolicyLoader to use for this evaluation (must not be null)
policyContext - contextual settings that may include information about the user interface, etc. (must not be null)
Returns:
a result object containing the failures for each category specified in the given options.
Throws:
PolicyEvaluationCancelledException - if the user cancelled check-in policy evaluation.

evaluateCheckIn

public CheckinEvaluationResult evaluateCheckIn(CheckinEvaluationOptions options,
                                               PendingCheckin pendingCheckin,
                                               PolicyContext policyContext)
                                        throws PolicyEvaluationCancelledException
Checks for required checkin notes and evaluates the given changes against defined checkin policies before they are sent to the server for check-in.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
options - flags that affect which things are evaluated (must not be null)
pendingCheckin - the pending checkin data to validate (must not be null)
policyContext - contextual settings that may include information about the user interface, etc. (must not be null)
Returns:
a result object containing the failures for each category specified in the given options.
Throws:
PolicyEvaluationCancelledException - if the user cancelled check-in policy evaluation.

checkIn

public int checkIn(PendingChange[] changes,
                   java.lang.String comment)
            throws CheckinException
Equivalent To:
checkIn(changes, comment, null, null, null)
Throws:
CheckinException

checkIn

public int checkIn(PendingChange[] changes,
                   java.lang.String comment,
                   CheckinNote checkinNote,
                   WorkItemCheckinInfo[] associatedWorkItems,
                   PolicyOverrideInfo policyOverrideInfo)
            throws CheckinException
Equivalent To:
checkIn(changes, null, comment, checkinNote,
             associatedWorkItems, null)
Throws:
CheckinException

checkIn

public int checkIn(PendingChange[] changes,
                   java.lang.String author,
                   java.lang.String authorDisplayName,
                   java.lang.String comment,
                   CheckinNote checkinNote,
                   WorkItemCheckinInfo[] associatedWorkItems,
                   PolicyOverrideInfo policyOverrideInfo)
            throws CheckinException
Equivalent To:
checkIn(changes, author, authorDisplayName, comment,
             checkinNote, associatedWorkItems, policyOverrideInfo,
             CheckinFlags.NONE)
Throws:
CheckinException

checkIn

public int checkIn(PendingChange[] changes,
                   java.lang.String author,
                   java.lang.String authorDisplayName,
                   java.lang.String comment,
                   CheckinNote checkinNote,
                   WorkItemCheckinInfo[] associatedWorkItems,
                   PolicyOverrideInfo policyOverrideInfo,
                   CheckinFlags flags)
            throws CheckinException
Equivalent To:
checkIn(changes, null, null, author, authorDisplayName,
             comment, checkinNote, associatedWorkItems,
             policyOverrideInfo, flags)
Throws:
CheckinException

checkIn

public int checkIn(PendingChange[] changes,
                   java.lang.String committer,
                   java.lang.String committerDisplayName,
                   java.lang.String author,
                   java.lang.String authorDisplayName,
                   java.lang.String comment,
                   CheckinNote checkinNote,
                   WorkItemCheckinInfo[] associatedWorkItems,
                   PolicyOverrideInfo policyOverrideInfo,
                   CheckinFlags flags)
            throws CheckinException
Checkin pending changes in this workspace.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
changes - the changes to checkin (may be null to have the server check in all changes in this workspace)
committer - if not null, the committer of this change. if null, the committer will be the authenticated user.
author - if not null, the author of this change. if null, the author will be the authenticated user.
comment - a text comment that will be associated with this checkin (can be null).
checkinNote - CheckinNote object containing array of ACheckinNoteFieldValue objects. If null, no checkin notes are added to changeset. For a list of checkin note field names applicable to the items use the queryCheckinNoteFieldDefinitionsForServerPaths on the VersionControlClient.
associatedWorkItems - work items to associate with the checkin. if null, no work items are associated with this checkin
policyOverrideInfo - Optional information describing why checkin policies were overridden for this checkin. Pass null for a normal check-in (policies were not overridden).
flags - CheckinFlags which control the checkin (must not be null)
Returns:
the changeset number the server chooses for this changeset.
See Also:
VersionControlClient.queryCheckinNoteFieldDefinitionsForServerPaths(String[])
Throws:
CheckinException - if conflicts caused the checkin to fail or if other errors occurred.
ActionDeniedBySubscriberException - if the check-in was denied by the server (because of a gated build definition, etc.).

checkPendingChanges

public Failure[] checkPendingChanges(java.lang.String[] serverItems)
Checks the given server items for conflicts before a checkin is performed.

Parameters:
serverItems - the items to check for conflicts (must not be null)
Returns:
the failures detected by the server, empty if there were none, never null

getWorkingFolderFromPaths

public WorkingFolder getWorkingFolderFromPaths(java.lang.String serverPath,
                                               java.lang.String localPath)

A convenience method to create a new regular WorkingFolder from the given server and local path.

This method interprets the serverPath parameter in such a way that depth-one mappings can be encoded in the server path. If the file part of the server path is equal to WorkingFolder.DEPTH_ONE_STRING, a depth-one mapping will be returned.

Parameters:
serverPath - the server path to map (must not be null)
localPath - the local path to map (must not be null)

map

public void map(java.lang.String serverPath,
                java.lang.String localPath)

A convenience method to create a new regular (non-cloaked) working folder mapping on this Workspace.

This method interprets the serverPath parameter in such a way that depth-one mappings can be encoded in the server path. If the file part of the server path is equal to WorkingFolder.DEPTH_ONE_STRING, a depth-one mapping will be created.

If a mapping already exists with the same local path or server path, an exception is thrown.

Parameters:
serverPath - the server path to map (must not be null)
localPath - the local path to map (must not be null)

addOrChangeMapping

public void addOrChangeMapping(java.lang.String serverPath,
                               java.lang.String localPath)

A convenience method to create or change a new regular (non-cloaked) working folder mapping on this Workspace.

This method interprets the serverPath parameter in such a way that depth-one mappings can be encoded in the server path. If the file part of the server path is equal to WorkingFolder.DEPTH_ONE_STRING, a depth-one mapping will be created.

If two different mappings already exist with the same local path or server path, an exception is thrown.

Parameters:
serverPath - the server path to map (must not be null)
localPath - the local path to map (must not be null)

createWorkingFolder

public void createWorkingFolder(WorkingFolder wf)
Create a working folder mapping for this workspace. If a mapping already exists with the same local path or server path, an exception is thrown.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
wf - the working folder mapping to create.

createWorkingFolder

public void createWorkingFolder(WorkingFolder newWorkingFolder,
                                boolean overwriteExisting)
Create a working folder mapping for this workspace. This method allows you to specify what happens when an existing mapping has the same local path or server path.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
newWorkingFolder - the working folder mapping to create.
overwriteExisting - if true, any existing mapping with the same server path or local path is overwritten

createWorkingFolders

public void createWorkingFolders(WorkingFolder[] newWorkingFolders)
Create new working folder mappings for this workspace. If a mapping already exists with the same local path or server path, an exception is thrown.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
newWorkingFolders - the working folder mappings to create.

createWorkingFolders

public void createWorkingFolders(WorkingFolder[] newWorkingFolders,
                                 boolean overwriteExisting)
Create new working folder mappings for this workspace. This method allows you to specify what happens when an existing mapping has the same local path or server path.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
newWorkingFolders - the working folder mappings to create.
overwriteExisting - if true, any existing mapping with the same server path or local path is overwritten

deleteWorkingFolder

public void deleteWorkingFolder(WorkingFolder wf)
                         throws ServerPathFormatException,
                                java.io.IOException
Delete a working folder mapping from this workspace.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
wf - the working folder mapping to remove (any object matching field values of parameter is deleted).
Throws:
ServerPathFormatException
java.io.IOException

deleteWorkingFolders

public void deleteWorkingFolders(WorkingFolder[] workingFolders)
                          throws ServerPathFormatException,
                                 java.io.IOException
Delete a working folder mapping from this workspace.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
wf - the working folder mapping to remove (any object matching field values of parameter is deleted).
Throws:
ServerPathFormatException
java.io.IOException

queryHistory

public Changeset[] queryHistory(java.lang.String serverOrLocalPath,
                                VersionSpec version,
                                int deletionID,
                                RecursionType recursion,
                                java.lang.String user,
                                VersionSpec versionFrom,
                                VersionSpec versionTo,
                                int maxCount,
                                boolean includeFileDetails,
                                boolean slotMode,
                                boolean includeDownloadInfo,
                                boolean sortAscending)
                         throws ServerPathFormatException
Queries the server for history about an item. History items are returned as an array of changesets.

See Also:
VersionControlClient.queryHistory(String, VersionSpec, int, RecursionType, String, VersionSpec, VersionSpec, int, boolean, boolean, boolean, boolean)
Throws:
ServerPathFormatException

queryHistoryIterator

public java.util.Iterator<Changeset> queryHistoryIterator(java.lang.String serverOrLocalPath,
                                                          VersionSpec version,
                                                          int deletionID,
                                                          RecursionType recursion,
                                                          java.lang.String user,
                                                          VersionSpec versionFrom,
                                                          VersionSpec versionTo,
                                                          int maxCount,
                                                          boolean includeFileDetails,
                                                          boolean slotMode,
                                                          boolean includeDownloadInfo,
                                                          boolean sortAscending)
                                                   throws ServerPathFormatException
Queries the server for history about an item. Results are returned as an Iterator of Changesets.

See Also:
VersionControlClient.queryHistory(String, VersionSpec, int, RecursionType, String, VersionSpec, VersionSpec, int, boolean, boolean, boolean, boolean)
Throws:
ServerPathFormatException

createBranch

public int createBranch(java.lang.String sourceServerPath,
                        java.lang.String targetServerPath,
                        VersionSpec version)
Creates a branch of the given source path at the given version to the given target path. Only server paths are supported.

See Also:
VersionControlClient.createBranch(String, String, VersionSpec)

createLabel

public LabelResult[] createLabel(VersionControlLabel label,
                                 LabelItemSpec[] items,
                                 LabelChildOption options)
Create or update a label for items in this workspace.

See Also:
VersionControlClient.createLabel(VersionControlLabel, LabelItemSpec[], LabelChildOption)

unlabelItem

public LabelResult[] unlabelItem(java.lang.String label,
                                 java.lang.String scope,
                                 ItemSpec[] items,
                                 VersionSpec version)
Removes a label that was applied to an item.

See Also:
VersionControlClient.unlabelItem(String, String, ItemSpec[], VersionSpec)

queryLabels

public VersionControlLabel[] queryLabels(java.lang.String label,
                                         java.lang.String scope,
                                         java.lang.String owner,
                                         boolean includeItemDetails,
                                         java.lang.String filterItem,
                                         VersionSpec filterItemVersion)
Query the collection of labels that match the given specifications.

See Also:
VersionControlClient.queryLabels(String, String, String, boolean, String, VersionSpec)

getComment

public java.lang.String getComment()
Returns:
the workspace comment

getComputer

public java.lang.String getComputer()
Returns:
the computer where this workspace exists

getOptions

public WorkspaceOptions getOptions()
Returns:
the options for this workspace

getOwnerDescriptor

public IdentityDescriptor getOwnerDescriptor()
Returns:
the owner's IdentityDescriptor, if set, otherwise null

getSecurityToken

public java.lang.String getSecurityToken()
Returns:
the user's security identifier

get

public GetStatus get(GetOptions options)
Update all items in this workspace to the latest version.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
options - options for the get operation (must not be null)
Returns:
a GetStatus instance with the results of the get operation.

get

public GetStatus get(VersionSpec version,
                     GetOptions options)
Update all items in this workspace to the given version.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
version - the version to update all items in this workspace to (must not be null)
options - options for the get operation (must not be null)
Returns:
a GetStatus instance with the results of the get operation.

get

public GetStatus get(GetRequest request,
                     GetOptions options)
Update the given items for the given workspace.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
request - the request to process (must not be null)
options - options for the get operation (must not be null)
Returns:
a GetStatus instance with the results of the get operation.

get

public GetStatus get(GetRequest[] requests,
                     GetOptions options)
Equivalent To:
get(requests, options, null, false, new
             AtomicReference<Conflict[]>())

get

public GetStatus get(GetRequest[] requests,
                     GetOptions options,
                     java.lang.String[] itemPropertyFilters,
                     boolean alwaysQueryConflicts,
                     java.util.concurrent.atomic.AtomicReference<Conflict[]> conflicts)
Update the given items for the given workspace.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
requests - the request items to process (must not be null; items in array must not be null). To update all items in this workspace, pass a single GetRequest with a null itemSpec.
options - options for the get operation (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
alwaysQueryConflicts - true to always query conflicts, false if we may omit this step
conflicts - a reference to a list of conflicts to return (must not be null)
Returns:
a GetStatus instance with the results of the get operation.

rollback

public GetStatus rollback(ItemSpec[] itemSpecs,
                          VersionSpec itemVersionSpec,
                          VersionSpec versionFrom,
                          VersionSpec versionTo,
                          LockLevel lockLevel,
                          RollbackOptions options)
Equivalent To:
rollback(itemSpecs, itemVersionSpec, versionFrom, versionTo,
             lockLevel, options, null)

rollback

public GetStatus rollback(ItemSpec[] itemSpecs,
                          VersionSpec itemVersionSpec,
                          VersionSpec versionFrom,
                          VersionSpec versionTo,
                          LockLevel lockLevel,
                          RollbackOptions options,
                          java.lang.String[] itemPropertyFilters)
Pends a change that reverts the contents of one or more items to a previous version's contents.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
itemSpecs - the items to roll back (must not be null)
itemVersionSpec - the version of the given item specs (may be null)
versionFrom - the version to rollback from (not sure) (must not be null)
versionTo - the version to rollback to (not sure) (must not be null)
lockLevel - the lock level for the pending change (must not be null)
options - rollback options (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Since:
TFS 2010

previewGetItems

public GetOperation[][] previewGetItems(GetRequest[] requests,
                                        GetOptions options)
Equivalent To:
previewGetItems(requests, options, null)

previewGetItems

public GetOperation[][] previewGetItems(GetRequest[] requests,
                                        GetOptions options,
                                        java.lang.String[] itemPropertyFilters)
Gets the GetOperations for the given GetRequests, but does not update the workspace or fire any events.

Parameters:
requests - the request items to process (must not be null; items in array must not be null). To update all items in this workspace, pass a single AGetRequest with a null itemSpec.
options - options for the get operation (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
an array of arrays of GetOperations. There is a top-level array element for each given GetRequest, and the inner arrays may be empty but never null.

getName

public java.lang.String getName()
Gets this workspace's name.

Returns:
this workspace's name.

getOwnerName

public java.lang.String getOwnerName()


getOwnerDisplayName

public java.lang.String getOwnerDisplayName()

getOwnerAliases

public java.lang.String[] getOwnerAliases()

getLastAccessDate

public java.util.Calendar getLastAccessDate()

getQualifiedName

public java.lang.String getQualifiedName()
Equivalent To:
WorkspaceSpec(this.getName(),
             this.getOwnerName()).toString();

isLocalPathMapped

public boolean isLocalPathMapped(java.lang.String localPath)
Tests whether the given local path is mapped to a working folder in this workspace and that mapping is not a cloak.

Parameters:
localPath - the local path (file or directory) to test (must not be null or empty)
Returns:
true if the given local path is mapped to a working folder in this workspace that is not a cloak mapping, false otherwise

isServerPathMapped

public boolean isServerPathMapped(java.lang.String serverPath)
Tests whether the given server path is mapped to a working folder in this workspace and that mapping is not a cloak.

Parameters:
serverPath - the server path (file or directory) to test (must not be null or empty)
Returns:
true if the given server path is mapped to a working folder in this workspace that is not a cloak mapping, false otherwise

getMappedServerPath

public java.lang.String getMappedServerPath(java.lang.String localPath)

Maps the given local path to a server path using the most precise working folder mapping in this workspace. Returns null if the most precise working folder mapping is a cloak mapping.

Parameters:
localPath - the local path to map to a server path (must not be null or empty)
Returns:
the server path that maps to the given local path, or null if no mapping exists or the item is cloaked

getMappedLocalPath

public java.lang.String getMappedLocalPath(java.lang.String serverPath)

Maps the given server path to a local path using the most precise working folder mapping in this workspace. Returns null if the most precise working folder mapping is a cloak mapping.

Parameters:
serverPath - the server path to map to a local path (must not be null or empty)
Returns:
the local path that maps to the given server path, or null if no mapping exists or the item is cloaked

getExactMappingForLocalPath

public WorkingFolder getExactMappingForLocalPath(java.lang.String localPath)

Gets the working folder that contains an exact match for the specified local path (including cloak mappings) or null if there is no exact match.

Parameters:
localPath - the local path to get the mapping for (must not be null)
Returns:
the working folder that directly maps the specified local path (including cloak mappings), or null if there is no exact mapping

getExactMappingForServerPath

public WorkingFolder getExactMappingForServerPath(java.lang.String serverPath)

Gets the working folder that contains an exact match for the specified server path (including cloak mappings) or null if there is no exact match.

Parameters:
serverPath - the server path to get the mapping for (must not be null)
Returns:
the working folder that directly maps the specified server path (including cloak mappings), or null if there is no exact mapping

getClosestMappingForServerPath

public WorkingFolder getClosestMappingForServerPath(java.lang.String serverPath)
Gets the closest working folder mapping for the specified server path. This method can return a mapping which is an exact match for the specified server path.

Parameters:
serverPath - the server path whose parent mapping we wish to find (must not be null)
Returns:
the closest parent mapping or null if no there is no mapping

getClosestMappingForLocalPath

public WorkingFolder getClosestMappingForLocalPath(java.lang.String localPath)
Gets the closest working folder mapping for the specified local path. This method can return a mapping which is an exact match for the specified local path.

Parameters:
localPath - the local path whose parent mapping we wish to find (must not be null)
Returns:
the closest parent mapping or null if no there is no mapping

serverPathExists

public boolean serverPathExists(java.lang.String serverPath)
Check whether serverPath exists on the server

Parameters:
serverPath -
Returns:

serverPathExists

public boolean serverPathExists(java.lang.String serverPath,
                                VersionSpec versionSpec)
Check whether serverPath exists on the server in a certain versionSpec

Parameters:
serverPath -
versionSpec -
Returns:

translateLocalPathToServerPath

public PathTranslation translateLocalPathToServerPath(java.lang.String localPath)

Gets a new working folder that describes the mapping between the given local path and its server item. The mapping returned is not necessarily the mapping the user explicitly mapped; it will contain the most specific item paths (files or folders).

A PathTranslation is returned for items that are cloaked and the translated item will be non-null.

Parameters:
localPath - the local path to find a mapping for (must not be null or empty)
Returns:
the working folder mapping that most precisely matches the given path (including cloak mappings), or null if the item is not mapped

translateServerPathToLocalPath

public PathTranslation translateServerPathToLocalPath(java.lang.String serverPath)

Gets a new working folder that describes the mapping between the given server path and its local item. The mapping returned is not necessarily the mapping the user explicitly mapped; it will contain the most specific item paths (files or folders).

A PathTranslation is returned for items that are cloaked, but the translated item will be null.

Parameters:
serverPath - the server path to find a mapping for (must not be null or empty).
Returns:
the working folder mapping that most precisely matches the given path (PathTranslation.getTranslatedPath() is null for cloaked items), or null if the item is not mapped.

getFolders

public WorkingFolder[] getFolders()
Gets all the working folder mappings in this workspace.

Returns:
a copy of the array of working folder mappings that belong in this workspace. May be empty but never null.

setFolders

public void setFolders(WorkingFolder[] folders)

compareName

public static int compareName(java.lang.String name1,
                              java.lang.String name2)

compareOwner

public static int compareOwner(java.lang.String owner1,
                               java.lang.String owner2)

compareComputer

public static int compareComputer(java.lang.String computer1,
                                  java.lang.String computer2)

compareComment

public static int compareComment(java.lang.String comment1,
                                 java.lang.String comment2)

compareServerURI

public static int compareServerURI(java.net.URI uri1,
                                   java.net.URI uri2)

compareSecurityToken

public static int compareSecurityToken(java.lang.String securityToken1,
                                       java.lang.String securityToken2)

getMappedPaths

public java.lang.String[] getMappedPaths()


matchName

public static boolean matchName(java.lang.String name1,
                                java.lang.String name2)

matchOwner

public static boolean matchOwner(java.lang.String owner1,
                                 java.lang.String owner2)

matchComputer

public static boolean matchComputer(java.lang.String computer1,
                                    java.lang.String computer2)

matchServerGUID

public static boolean matchServerGUID(com.microsoft.tfs.util.GUID serverGUID1,
                                      com.microsoft.tfs.util.GUID serverGUID2)

matchComment

public static boolean matchComment(java.lang.String comment1,
                                   java.lang.String comment2)

matchServerURI

public static boolean matchServerURI(java.net.URI serverURI1,
                                     java.net.URI serverURI2)

matchSecurityToken

public static boolean matchSecurityToken(java.lang.String securityToken1,
                                         java.lang.String securityToken2)

ownerNameMatches

public boolean ownerNameMatches(java.lang.String ownerName)
Returns true if the owner name matches any of the valid owner names ( getOwnerName(), getOwnerDisplayName(), getOwnerAliases()) for this workspace.


hashName

public static int hashName(java.lang.String name)

hashOwner

public static int hashOwner(java.lang.String ownerName)

reconcile

public void reconcile(boolean reconcileMissingLocalItems,
                      java.util.concurrent.atomic.AtomicBoolean pendingChangesUpdatedByServer)
Reconciles a local workspace with the server.

Parameters:
reconcileMissingLocalItems - True to remove local version rows for items that no longer exist on disk
AtomicBboolean -

pendAdd

public int pendAdd(java.lang.String[] paths,
                   boolean recursive,
                   FileEncoding fileEncoding,
                   LockLevel lockLevel,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions)
Ask the server for permission to add file from local working folders. One file encoding (possibly a special encoding value to force binary or autodetection) is applied to all paths.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the local disk paths of files or folders to add (must not be null or empty)
recursive - whether the given paths, if directories, should be descended and subitems added.
fileEncoding - the encoding these files are in (if null or FileEncoding.AUTOMATICALLY_DETECT, the encoding is detected).
lockLevel - the type of lock requested during this add (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
Returns:
the number of file add requests that were successfully processed by the server. This number may be greater than the number of paths given.

pendAdd

public int pendAdd(java.lang.String[] paths,
                   boolean recursive,
                   LockLevel lockLevel,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions,
                   java.util.Map<java.lang.String,FileEncoding> encodingHints,
                   FileEncoding defaultEncoding)
Ask the server for permission to add file from local working folders. The file encodings for each file may be specified individually (the encodings array must be the same size as the paths array).

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the local disk paths of files or folders to add (must not be null or empty)
recursive - whether the given paths, if directories, should be descended and subitems added.
lockLevel - the type of lock requested during this add (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
encodingHints - a map of paths to the FileEncoding that should be used when the ChangeRequest for that path is created. This map is only consulted for files that exist on disk (directories and non-existing files might have different encodings). Paths not present in this map use the defaultEncoding. May be null.
defaultEncoding - the FileEncoding to use to process files that do not have hints in the encodingHints map. May be null to automatically detect file encodings.
Returns:
the number of file add requests that were successfully processed by the server. This number may be greater than the number of paths given.

pendBranch

public int pendBranch(java.lang.String sourcePath,
                      java.lang.String targetPath,
                      VersionSpec version,
                      LockLevel lockLevel,
                      RecursionType recursion,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions)
Equivalent To:
pendBranch(sourcePath, targetPath, version, lockLevel,
             recursion, getOptions, pendOptions, null)

pendBranch

public int pendBranch(java.lang.String sourcePath,
                      java.lang.String targetPath,
                      VersionSpec version,
                      LockLevel lockLevel,
                      RecursionType recursion,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions,
                      java.lang.String[] itemPropertyFilters)
Pends a branch change. The item specified by sourcePath at the given version will be branched into the targetPath (if targetPath is a folder, a new folder with sourcePath's name is created inside it).

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
sourcePath - the existing item to branch.
targetPath - the destination for the branch to end up. If this path is a folder, a new item will be created inside it with the sourcePath item name.
version - the version at which to branch the source item.
lockLevel - the lock type to pend the change with.
recursion - the type of recursion to apply to the item paths (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of branch changes pended.

pendDelete

public int pendDelete(java.lang.String[] paths,
                      RecursionType recursion,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions)
Equivalent To:
pendDelete(paths, recursion, lockLevel, getOptions,
             pendOptions, null)

pendDelete

public int pendDelete(java.lang.String[] paths,
                      RecursionType recursion,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions,
                      java.lang.String[] itemPropertyFilters)
Pend a deletion of one or more items, all at the same lock level.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - local disk or server paths of the items to delete (must not be null or empty)
recursion - the type of recursion to apply to the item paths (must not be null)
lockLevel - the lock level to hold during this change (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of delete changes pended for the given items.

pendDelete

public int pendDelete(java.lang.String[] paths,
                      RecursionType recursion,
                      LockLevel[] lockLevels,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions)
Equivalent To:
pendDelete(paths, recursion, lockLevels, getOptions,
             pendOptions, null)

pendDelete

public int pendDelete(java.lang.String[] paths,
                      RecursionType recursion,
                      LockLevel[] lockLevels,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions,
                      java.lang.String[] itemPropertyFilters)
Pend a deletion of one or more items, with possibly differing lock levels for each item.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - local disk or server paths of the items to delete (must not be null or empty)
recursion - the type of recursion to apply to the item paths (must not be null)
lockLevels - an array containing the lock level for each path to hold during this change (must not be null or empty)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of delete changes pended for the given items.

pendDelete

public int pendDelete(ItemSpec[] specs,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions)
Equivalent To:
pendDelete(specs, lockLevel, getOptions, pendOptions, null)

pendDelete

public int pendDelete(ItemSpec[] specs,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions,
                      java.lang.String[] itemPropertyFilters)
Pend a deletion of one or more items, all at the same lock level.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
specs - the item specs to delete (must not be null or empty)
lockLevel - the lock level to hold during this change (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of delete changes pended for the given items.

pendDelete

public int pendDelete(ItemSpec[] specs,
                      LockLevel[] lockLevels,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions)
Equivalent To:
pendDelete(specs, lockLevels, getOptions, pendOptions, null)

pendDelete

public int pendDelete(ItemSpec[] specs,
                      LockLevel[] lockLevels,
                      GetOptions getOptions,
                      PendChangesOptions pendOptions,
                      java.lang.String[] itemPropertyFilters)
Pend a deletion of one or more items, with possibly differing lock levels for each item.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
specs - the item specs to delete (must not be null or empty)
lockLevels - an array containing the lock level for each path to hold during this change (must not be null or empty)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of delete changes pended for the given items.

pendUndelete

public int pendUndelete(ItemSpec[] items,
                        LockLevel lockLevel,
                        GetOptions getOptions,
                        PendChangesOptions pendOptions)
Equivalent To:
pendUndelete(items, lockLevel, getOptions, pendOptions,
             null)

pendUndelete

public int pendUndelete(ItemSpec[] items,
                        LockLevel lockLevel,
                        GetOptions getOptions,
                        PendChangesOptions pendOptions,
                        java.lang.String[] itemPropertyFilters)
Pend a restore of a deleted items, all at the same lock level.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
items - local disk or server items to undelete (must not be null)
lockLevel - the lock level to hold during this change (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of delete changes pended for the given items.

pendUndelete

public int pendUndelete(ItemSpec[] items,
                        LockLevel[] lockLevels,
                        GetOptions getOptions,
                        PendChangesOptions pendOptions)
Equivalent To:
pendUndelete, items, lockLevels, getOptions, pendOptions,
             null)

pendUndelete

public int pendUndelete(ItemSpec[] items,
                        LockLevel[] lockLevels,
                        GetOptions getOptions,
                        PendChangesOptions pendOptions,
                        java.lang.String[] itemPropertyFilters)
Pend a restore of a deleted items, with possibly differing lock levels for each item.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
items - local disk or server items to undelete (must not be null)
lockLevels - the lock level to hold during this change (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of delete changes pended for the given items.

pendUndelete

public int pendUndelete(ItemSpec item,
                        java.lang.String newName,
                        LockLevel lockLevel,
                        GetOptions getOptions,
                        PendChangesOptions pendOptions)
Equivalent To:
pendUndelete(item, newName, lockLevel, getOptions,
             pendOptions, null)

pendUndelete

public int pendUndelete(ItemSpec item,
                        java.lang.String newName,
                        LockLevel lockLevel,
                        GetOptions getOptions,
                        PendChangesOptions pendOptions,
                        java.lang.String[] itemPropertyFilters)
Pend a restore of a single deleted item and declare a new name for it.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
item - local disk or server item to undelete (must not be null)
newName - the new name (short name or full path) for the item (must not be null or empty)
lockLevel - the lock level to hold during this change (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of delete changes pended for the given items.

pendRename

public int pendRename(java.lang.String oldPath,
                      java.lang.String newPath,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      boolean detectTargetItemType,
                      PendChangesOptions pendOptions)
Equivalent To:
pendRename(oldPath, newPath, lockLevel, getOptions,
             detectTargetItemType, pendOptions, null)

pendRename

public int pendRename(java.lang.String oldPath,
                      java.lang.String newPath,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      boolean detectTargetItemType,
                      PendChangesOptions pendOptions,
                      java.lang.String[] itemPropertyFilters)
Pend a rename of an item.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
oldPath - the existing local or server path of the item to rename (must not be null or empty)
newPath - the new desired local or server path of the item to rename (must not be null or empty)
lockLevel - the lock level to hold during this change (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
detectTargetItemType - true to detect whether the target path exists and may be overwritten (and throw an exception if this is the case), false to ignore any existing item at the target path.
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of rename operations successfully pended.

pendRename

public int pendRename(java.lang.String[] oldPaths,
                      java.lang.String[] newPaths,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      boolean detectTargetItemType,
                      PendChangesOptions pendOptions)
Equivalent To:
pendRename(oldPaths, newPaths, lockLevel, getOptions,
             detectTargetItemType, pendOptions, null)

pendRename

public int pendRename(java.lang.String[] oldPaths,
                      java.lang.String[] newPaths,
                      LockLevel lockLevel,
                      GetOptions getOptions,
                      boolean detectTargetItemType,
                      PendChangesOptions pendOptions,
                      java.lang.String[] itemPropertyFilters)
Pends renames of multiple items.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
oldPaths - the existing local or server paths of the items to rename (must not be null or empty)
newPaths - the new desired local or server paths of the item to rename (must not be null or empty)
lockLevel - the lock level to hold during this change (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
detectTargetItemType - true to detect whether the target path exists and may be overwritten (and throw an exception if this is the case), false to ignore any existing item at the target path.
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of rename operations successfully pended.

pendEdit

public int pendEdit(ItemSpec[] specs,
                    LockLevel lockLevel,
                    FileEncoding fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions)
Equivalent To:
pendEdit(specs, lockLevel, fileEncoding, getOptions,
             pendOptions, null)

pendEdit

public int pendEdit(ItemSpec[] specs,
                    LockLevel lockLevel,
                    FileEncoding fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions,
                    java.lang.String[] itemPropertyFilters)
Ask the server for permission to begin editing one or more files. This allows callers to use multiple item specs, each with their own recursion specification.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
specs - the item specs (local or server paths) of files or folders to edit (must not be null)
lockLevel - the type of lock requested during this edit (must not be null)
fileEncoding - the encoding these files are in. If null, the encoding is not submitted to the server, and the file's encoding will remain the same until it is checked in.
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file edit requests that were successfully processed by the server.

pendEdit

public int pendEdit(ItemSpec[] specs,
                    LockLevel[] lockLevels,
                    FileEncoding[] fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions)
Equivalent To:
pendEdit(specs, lockLevels, fileEncoding, getOptions,
             pendOptions, null)

pendEdit

public int pendEdit(ItemSpec[] specs,
                    LockLevel[] lockLevels,
                    FileEncoding[] fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions,
                    java.lang.String[] itemPropertyFilters)
Ask the server for permission to begin editing one or more files. This allows callers to use multiple item specs, each with their own recursion specification.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
specs - the item specs (local or server paths) of files or folders to edit (must not be null)
lockLevels - the array of lock levels to request for each item spec during this edit (must not be null)
fileEncoding - an array of the encoding for each given item spec. If any encoding in this array is null, the encoding is not submitted to the server for that file. If the array null, no encodings are submitted to the server for any file.
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file edit requests that were successfully processed by the server.

pendEdit

public int pendEdit(java.lang.String[] paths,
                    RecursionType recursion,
                    LockLevel lockLevel,
                    FileEncoding fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions)
Equivalent To:
pendEdit(paths, recursion, lockLevel, fileEncoding,
             getOptions, pendOptions, null)

pendEdit

public int pendEdit(java.lang.String[] paths,
                    RecursionType recursion,
                    LockLevel lockLevel,
                    FileEncoding fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions,
                    java.lang.String[] itemPropertyFilters)
Ask the server for permission to begin editing one or more files.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the local disk or server paths of files or folders to edit (not null).
recursion - the type of recursion to apply to the given paths (must not be null)
lockLevel - the type of lock requested during this edit (must not be null)
fileEncoding - the encoding these files are in. If null, the encoding is not submitted to the server, and the file's encoding will remain the same until it is checked in.
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file edit requests that were successfully processed by the server.

pendEdit

public int pendEdit(java.lang.String[] paths,
                    RecursionType recursion,
                    LockLevel[] lockLevels,
                    FileEncoding[] fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions)
Equivalent To:
pendEdit(paths, recursion, lockLevels, fileEncoding,
             getOptions, pendOptions, null)

pendEdit

public int pendEdit(java.lang.String[] paths,
                    RecursionType recursion,
                    LockLevel[] lockLevels,
                    FileEncoding[] fileEncoding,
                    GetOptions getOptions,
                    PendChangesOptions pendOptions,
                    java.lang.String[] itemPropertyFilters)
Ask the server for permission to begin editing one or more files.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the local disk or server paths of files or folders to edit (not null).
recursion - the type of recursion to apply to the given paths (must not be null)
lockLevels - an array of lock levels corresponding to each given path (must not be null)
fileEncoding - an array of file encodings for each given path. If an encoding is null, it is not submitted to the server and the file's encoding will remain the same until it is checked in. If the array is null, no file encodings are changed.
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file edit requests that were successfully processed by the server.

pendPropertyChange

public int pendPropertyChange(java.lang.String path,
                              PropertyValue property)
Pends changes on the passed in path giving it the passed in property. Note, property changes are merged with existing properties on the server. To delete an existing property pass in a property with the desired name and a value of null.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
path - the path to pend the property changes on (must not be null or empty)
property - the property to pend as a change (must not be null)
Returns:
the number of files with properties changes pended

pendPropertyChange

public int pendPropertyChange(java.lang.String path,
                              PropertyValue property,
                              RecursionType recursion,
                              LockLevel lockLevel)
Pends changes on the passed in path giving it the passed in properties. Note, property changes are merged with existing properties on the server. To delete an existing property pass in a property with the desired name and a value of null.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
path - the path to pend the property changes on (must not be null or empty)
property - the property to pend as a change (must not be null)
recursion - the amount of recursion to use on the items (must not be null)
lockLevel - the lock level to place on the resulting pending change (must not be null)
Returns:
the number of files with properties changes pended

pendPropertyChange

public int pendPropertyChange(java.lang.String path,
                              PropertyValue[] properties,
                              RecursionType recursion,
                              LockLevel lockLevel)
Pends changes on the passed in path giving it the passed in properties. Note, property changes are merged with existing properties on the server. To delete an existing property pass in a property with the desired name and a value of null.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
path - the path to pend the property changes on (must not be null or empty)
properties - the properties to pend as changes (must not be null)
recursion - the amount of recursion to use on the items (must not be null)
lockLevel - the lock level to place on the resulting pending change (must not be null)
Returns:
the number of files with properties changes pended

pendPropertyChange

public int pendPropertyChange(java.lang.String[] paths,
                              PropertyValue property,
                              RecursionType recursion,
                              LockLevel lockLevel)
Pends changes on the passed in paths giving each of them the passed in properties. Note, property changes are merged with existing properties on the server. To delete an existing property pass in a property with the desired name and a value of null.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the paths to pend the property changes on (must not be null or empty)
property - the property to pend as a change (must not be null)
recursion - the amount of recursion to use on the items (must not be null)
lockLevel - the lock level to place on the resulting pending change (must not be null)
Returns:
the number of files with properties changes pended

pendPropertyChange

public int pendPropertyChange(java.lang.String[] paths,
                              PropertyValue[] properties,
                              RecursionType recursion,
                              LockLevel lockLevel,
                              PendChangesOptions options,
                              java.lang.String[] itemPropertyFilters)
Pends changes on the passed in paths giving each of them the passed in properties. Note, property changes are merged with existing properties on the server. To delete an existing property pass in a property with the desired name and a value of null.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the paths to pend the property changes on (must not be null or empty)
properties - the properties to pend as changes (must not be null)
recursion - the amount of recursion to use on the items (must not be null)
lockLevel - the lock level to place on the resulting pending change (must not be null)
options - the set of PendChangesOptions. Some relevant options are: PendChangesOptions.SILENT (don't return GetOperations for the changes pended).
itemPropertyFilters - a list of versioned item properties to return with each get operation
Returns:
the number of files with properties changes pended

pendPropertyChange

public int pendPropertyChange(ItemProperties[] specs,
                              RecursionType recursion,
                              LockLevel lockLevel,
                              PendChangesOptions options,
                              java.lang.String[] itemPropertyFilters)
Pends changes on the passed in paths giving each of them the passed in properties. Note, property changes are merged with existing properties on the server. To delete an existing property pass in a property with the desired name and a value of null.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
specs - the property changes to make (must not be null or empty)
recursion - the amount of recursion to use on the items (must not be null)
lockLevel - the lock level to place on the resulting pending change (must not be null)
options - the set of PendChangesOptions. Some relevant options are: PendChangesOptions.SILENT (don't return GetOperations for the changes pended).
itemPropertyFilters - a list of versioned item properties to return with each get operation
Returns:
the number of files with properties changes pended

setLock

public int setLock(java.lang.String[] paths,
                   LockLevel lockLevel,
                   RecursionType recursion,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions)
Equivalent To:
setLock(paths, lockLevel, recursion, getOptions,
             pendOptions, null)

setLock

public int setLock(java.lang.String[] paths,
                   LockLevel[] lockLevels,
                   RecursionType recursion,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions)
Equivalent To:
setLock(paths, lockLevels, recursion, getOptions,
             pendOptions, null)

setLock

public int setLock(java.lang.String[] paths,
                   LockLevel lockLevel,
                   RecursionType recursion,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions,
                   java.lang.String[] itemPropertyFilters)
Sets (or unsets) a lock on a file or folder.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the local disk or server paths of files or folders to lock (must not be null or empty)
lockLevel - the type of lock requested (must not be null)
recursion - the type of recursion to apply to the given paths (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file lock requests that were successfully processed by the server.

setLock

public int setLock(java.lang.String[] paths,
                   LockLevel[] lockLevels,
                   RecursionType recursion,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions,
                   java.lang.String[] itemPropertyFilters)
Sets (or unsets) a lock on a file or folder.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
paths - the local disk or server paths of files or folders to lock (must not be null or empty)
lockLevels - an array of lock levels requested corresponding to the given file path (must not be null or empty)
recursion - the type of recursion to apply to the given paths (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file lock requests that were successfully processed by the server.

setLock

public int setLock(ItemSpec[] itemSpecs,
                   LockLevel lockLevel,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions)
Equivalent To:
setLock(itemSpecs, lockLevel, getOptions, pendOptions, null)

setLock

public int setLock(ItemSpec[] itemSpecs,
                   LockLevel lockLevel,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions,
                   java.lang.String[] itemPropertyFilters)
Sets (or unsets) a lock on a file or folder.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
itemSpecs - the item specs to lock (must not be null or empty)
lockLevel - the type of lock requested (must not be null)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file lock requests that were successfully processed by the server.

setLock

public int setLock(ItemSpec[] itemSpecs,
                   LockLevel[] lockLevels,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions)
Equivalent To:
setLock(itemSpecs, lockLevels, getOptions, pendOptions,
             null)

setLock

public int setLock(ItemSpec[] itemSpecs,
                   LockLevel[] lockLevels,
                   GetOptions getOptions,
                   PendChangesOptions pendOptions,
                   java.lang.String[] itemPropertyFilters)
Sets (or unsets) a lock on a file or folder.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
itemSpecs - the item specs to lock (must not be null or empty)
lockLevels - an array of lock levels requested corresponding to the given file path (must not be null or empty)
getOptions - options that affect how files on disk are treated during processing (must not be null)
pendOptions - options that affect how items are pended (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of file lock requests that were successfully processed by the server.

addIgnoreFileExclusionAuto

public java.lang.String addIgnoreFileExclusionAuto(java.lang.String localItem)
                                            throws java.io.FileNotFoundException,
                                                   java.io.IOException
Finds the closest existing .tfignore file to the specified local item, or creates one if none was found, and adds a relative path exclusion item that will exclude the local item.

Parameters:
localItem - the local item to find or create the .tfignore file by and add an exclusion for (must not be null or empty)
Returns:
the full path to the .tfignore file that was modified
Throws:
java.io.FileNotFoundException - if the specified ignore file directory does not exist or is not a directory
java.io.IOException - if there was an error reading or writing the ignore file

addIgnoreFileExclusionAuto

public java.lang.String addIgnoreFileExclusionAuto(java.lang.String localItem,
                                                   java.lang.String exclusion)
                                            throws java.io.FileNotFoundException,
                                                   java.io.IOException
Finds the closest existing .tfignore file to the specified local item, or creates one if none was found, and adds the specified exclusion text.

Parameters:
localItem - the local item to find or create the .tfignore file by (must not be null or empty)
exclusion - ignore glob to add to the .tfignore file (if null, an exclusion for the specified local item is calculated automatically)
Returns:
the full path to the .tfignore file that was modified
Throws:
java.io.FileNotFoundException - if the specified ignore file directory does not exist or is not a directory
java.io.IOException - if there was an error reading or writing the ignore file

addIgnoreFileExclusion

public java.lang.String addIgnoreFileExclusion(java.lang.String exclusion,
                                               java.lang.String ignoreFileDirectory)
                                        throws java.io.FileNotFoundException,
                                               java.io.IOException
Adds an ignore file exclusion to the .tfignore file in the specified directory, creating the file if necessary.

Parameters:
exclusion - ignore glob to add to the .tfignore file (must not be null or empty)
ignoreFileDirectory - directory whose .tfignore file should be used (must not be null or empty)
Returns:
the full path to the .tfignore file that was modified
Throws:
java.io.FileNotFoundException - if the specified ignore file directory does not exist or is not a directory
java.io.IOException - if there was an error reading or writing the ignore file

queryConflicts

public Conflict[] queryConflicts(java.lang.String[] pathFilters,
                                 boolean recursive)
Queries the server for conflicts in this workspace that match the given filters.

Parameters:
pathFilters - the paths to include in the conflict search. If null, the entire workspace is queried for conflicts.
recursive - if true, paths given will match their subitems too. If false, no recursion is performed.
Returns:
the conflicts that matched the given path filters (an empty array if no conflicts found, never null).

queryConflicts

public Conflict[] queryConflicts(ItemSpec[] itemSpecs)
Queries the server for any conflicts in this workspace that match the given filters.

Parameters:
itemSpecs - The ItemSpecs to search for conflicts. If null, the entire workspace is queried for conflicts.
Returns:
the conflicts that matched the given items (an empty array if no conflicts found, never null).

resolveConflict

public void resolveConflict(Conflict conflict)
Equivalent To:
resolveConflict(conflict, new AtomicReference<Conflict[]>())

resolveConflict

public void resolveConflict(Conflict conflict,
                            java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
Equivalent To:
resolveConflict(conflict, resolvedConflicts, null)

resolveConflict

public void resolveConflict(Conflict conflict,
                            java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts,
                            java.lang.String[] itemPropertyFilters)
Equivalent To:
resolveConflict(conflict, resolvedConflicts,
             itemPropertyFilters, null, null, null, null)

resolveConflict

public void resolveConflict(Conflict conflict,
                            java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts,
                            java.lang.String[] itemPropertyFilters,
                            ExternalToolset externalToolset,
                            com.microsoft.tfs.util.process.ProcessFinishedHandler finishedHandler,
                            java.io.OutputStream capturedStandardOutput,
                            java.io.OutputStream capturedStandardError)
Equivalent To:
resolveConflicts(new Conflict[] { conflict },
             itemPropertyFilters, ResolveErrorOptions.THROW_ON_ERROR,
             resolvedConflicts, externalToolset, finishedHandler,
             capturedStandardOutput, capturedStandardError)

resolveConflicts

public void resolveConflicts(Conflict[] conflicts,
                             java.lang.String[] itemPropertyFilters,
                             java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
Equivalent To:
resolveConflicts(conflicts, itemPropertyFilters,
             ResolveErrorOptions.RAISE_WARNINGS_FOR_ERROR,
             resolvedConflicts)

resolveConflicts

public void resolveConflicts(Conflict[] conflicts,
                             java.lang.String[] itemPropertyFilters,
                             ResolveErrorOptions errorOptions,
                             java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
Equivalent To:
resolveConflicts(conflicts, itemPropertyFilters,
             errorOptions, resolvedConflicts, null, null, null, null)

resolveConflicts

public void resolveConflicts(Conflict[] conflicts,
                             java.lang.String[] itemPropertyFilters,
                             ResolveErrorOptions errorOptions,
                             java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts,
                             ExternalToolset externalToolset,
                             com.microsoft.tfs.util.process.ProcessFinishedHandler finishedHandler,
                             java.io.OutputStream capturedStandardOutput,
                             java.io.OutputStream capturedStandardError)
Attempts to resolve conflicts according to their Resolution property. If a conflict is successfully resolved, calls to Conflict.isResolved() will return true. If resolving these conflicts caused other conflicts to be deleted besides the current conflicts, then the list of other deleted conflicts will be returned. Note: all resolution options for the conflicts must be the same.

Parameters:
conflicts - The conflicts to resolve (not null)
itemAttributeFilters - A list of versioned item properties to return with each get operation
itemPropertyFilters - a list of versioned item properties to return with each get operation
errorOptions - how to proceed on errors (must not be null)
resolvedConflicts - A container holding an array of additional conflicts that were resolved by the server when the given conflict was resolved (must not be null). The container will hold an empty array when no additional conflicts were resolved.

getPendingChanges

public PendingSet getPendingChanges()
Get all pending changes for items in this workspace. Download URLs for the items will not be generated.

Returns:
a pending set including all the pending changes, null if there are no pending changes in this workspace.

getPendingChanges

public PendingSet getPendingChanges(java.lang.String[] serverPaths,
                                    RecursionType recursionType,
                                    boolean includeDownloadInfo)
Equivalent To:
getPendingChanges(serverPaths, recursionType,
             includeDownloadInfo, null)

getPendingChanges

public PendingSet getPendingChanges(java.lang.String[] serverPaths,
                                    RecursionType recursionType,
                                    boolean includeDownloadInfo,
                                    java.lang.String[] itemPropertyFilters)
Get all pending changes for the given server item.

Parameters:
serverPaths - the server items (files or directories) to get pending changes for. Pass ServerPath.ROOT with RecursionType.Full to match all (must not be null or empty).
recursionType - the type of recursion to apply to the given server paths (not null).
itemPropertyFilters - a list of property names to return on the pending change object if they exist (may be null)
Returns:
a pending set including all the pending changes, null if there are no pending changes

getPendingChanges

public PendingSet getPendingChanges(ItemSpec[] specs,
                                    boolean includeDownloadInfo)
Equivalent To:
getPendingChanges(specs, includeDownloadInfo, null)

getPendingChanges

public PendingSet getPendingChanges(ItemSpec[] specs,
                                    boolean includeDownloadInfo,
                                    java.lang.String[] itemPropertyFilters)
Get all pending changes for the given server items.

Parameters:
specs - ItemSpecs to get pending changes for(must not be null or empty)
includeDownloadInfo - if true, the server will include the information needed to download files. Only set this to true if you are going to be downloading the files using the objects that are returned. The call will be faster and require less bandwidth when this parameter is false (default for overloads that don't specify it)
itemPropertyFilters - a list of property names to return on the pending change object if they exist (may be null)
Returns:
a pending set including all the pending changes, null if there are no pending changes for the given specs

getPendingChangesWithCandidates

public PendingChange[] getPendingChangesWithCandidates(ItemSpec[] itemSpecs,
                                                       boolean includeDownloadInfo,
                                                       java.util.concurrent.atomic.AtomicReference<PendingChange[]> candidateChanges)
Equivalent To:
getPendingChangesWithCandidates(itemSpecs,
             includeDownloadInfo, candidateChanges, null)

getPendingChangesWithCandidates

public PendingChange[] getPendingChangesWithCandidates(ItemSpec[] itemSpecs,
                                                       boolean includeDownloadInfo,
                                                       java.util.concurrent.atomic.AtomicReference<PendingChange[]> candidateChanges,
                                                       java.lang.String[] itemPropertyFilters)
Gets all of the pending changes and candidate changes.

Parameters:
specs - ItemSpecs to get pending changes for (must not be null or empty)
includeDownloadInfo - if true, the server will include the information needed to download files. Only set this to true if you are going to be downloading the files using the objects that are returned. The call will be faster and require less bandwidth when this parameter is false (default for overloads that don't specify it)
candidateChanges - a a reference to receive the candidate changes (must not be null)
itemPropertyFilters - a list of property names to return on the pending change object if they exist (may be null)
Returns:
a pending set including all the pending changes, null or an empty array if there are no pending changes for the given specs

queryPendingSets

public PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths,
                                     RecursionType recursionType,
                                     java.lang.String queryWorkspaceName,
                                     java.lang.String queryWorkspaceOwner,
                                     boolean includeDownloadInfo)
Equivalent To:
queryPendingSets(serverOrLocalPaths, recursionType,
             queryWorkspaceName, queryWorkspaceOwner,
             includeDownloadInfo, null)

queryPendingSets

public PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths,
                                     RecursionType recursionType,
                                     java.lang.String queryWorkspaceName,
                                     java.lang.String queryWorkspaceOwner,
                                     boolean includeDownloadInfo,
                                     java.lang.String[] itemPropertyFilters)
See Also:
VersionControlClient.queryPendingSets(String[], RecursionType, boolean, String, String, String[])

queryPendingSets

public PendingSet[] queryPendingSets(ItemSpec[] itemSpecs,
                                     java.lang.String queryWorkspaceName,
                                     java.lang.String queryWorkspaceOwner,
                                     boolean includeDownloadInfo)
Equivalent To:
queryPendingSets(itemSpecs, queryWorkspaceName,
             queryWorkspaceOwner, includeDownloadInfo, null)

queryPendingSets

public PendingSet[] queryPendingSets(ItemSpec[] itemSpecs,
                                     java.lang.String queryWorkspaceName,
                                     java.lang.String queryWorkspaceOwner,
                                     boolean includeDownloadInfo,
                                     java.lang.String[] itemPropertyFilters)
See Also:
VersionControlClient.queryPendingSets(ItemSpec[], boolean, String, String, boolean, String[])

queryShelvedChanges

public PendingSet[] queryShelvedChanges(java.lang.String shelvesetName,
                                        java.lang.String shelvesetOwner,
                                        ItemSpec[] itemSpecs)
Equivalent To:
queryShelvedChanges(shelvesetName, shelvesetOwner,
             itemSpecs, false)

queryShelvedChanges

public PendingSet[] queryShelvedChanges(java.lang.String shelvesetName,
                                        java.lang.String shelvesetOwner,
                                        ItemSpec[] itemSpecs,
                                        boolean includeDownloadInfo)
Equivalent To:
queryShelvedChanges(shelvesetName, shelvesetOwner,
             itemSpecs, includeDownloadInfo, null)

queryShelvedChanges

public PendingSet[] queryShelvedChanges(java.lang.String shelvesetName,
                                        java.lang.String shelvesetOwner,
                                        ItemSpec[] itemSpecs,
                                        boolean includeDownloadInfo,
                                        java.lang.String[] itemPropertyFilters)
See Also:
VersionControlClient.queryShelvedChanges(String, String, ItemSpec[], boolean, String[])

update

public void update(java.lang.String newName,
                   java.lang.String newComment,
                   WorkingFolder[] newMappings)
Update a workspace.

Parameters:
newName - the new name or null to keep the existing value
newComment - the new comment or null to keep the existing value
newMappings - the new mappings or null to keep the existing value
newComputer - the new computer name or null to keep the existing value

update

public void update(java.lang.String newName,
                   java.lang.String newComment,
                   WorkingFolder[] newMappings,
                   boolean removeUnparentedCloaks)
Update a workspace.

Parameters:
newName - the new name or null to keep the existing value
newComment - the new comment or null to keep the existing value
newMappings - the new mappings or null to keep the existing value
newComputer - the new computer name or null to keep the existing value
removeUnparentedCloaks - When true, will strip from the mappings any cloaks not parented by a mapping

update

public void update(java.lang.String newName,
                   java.lang.String newOwner,
                   java.lang.String newComment,
                   WorkingFolder[] newMappings,
                   boolean removeUnparentedCloaks)
Update a workspace.

Parameters:
newName - the new name or null to keep the existing value
newOwner - the new owner or null to keep the existing value
newComment - the new comment or null to keep the existing value
newMappings - the new mappings or null to keep the existing value
removeUnparentedCloaks - When true, will strip from the mappings any cloaks not parented by a mapping

update

public void update(java.lang.String newName,
                   java.lang.String newOwner,
                   java.lang.String newComment,
                   java.lang.String newComputer,
                   WorkingFolder[] newMappings,
                   WorkspacePermissionProfile newPermissionProfile,
                   boolean removeUnparentedCloaks)
Update a workspace.

Parameters:
newName - the new name or null to keep the existing value
newOwner - the new owner or null to keep the existing value
newComment - the new comment or null to keep the existing value
newComputer - the new computer or null to keep the existing value
newMappings - the new mappings or null to keep the existing value
newPermissionProfile - the new permission profile or null to keep the existing value
removeUnparentedCloaks - When true, will strip from the mappings any cloaks not parented by a mapping

update

public void update(java.lang.String newName,
                   java.lang.String newOwner,
                   java.lang.String newComment,
                   java.lang.String newComputer,
                   WorkingFolder[] newMappings,
                   WorkspacePermissionProfile newPermissionProfile,
                   boolean removeUnparentedCloaks,
                   WorkspaceOptions newOptions)
Update a workspace.

Parameters:
newName - the new name or null to keep the existing value
newOwner - the new owner or null to keep the existing value
newComment - the new comment or null to keep the existing value
newComputer - the new computer or null to keep the existing value
newMappings - the new mappings or null to keep the existing value
newPermissionProfile - the new permission profile or null to keep the existing value
removeUnparentedCloaks - When true, will strip from the mappings any cloaks not parented by a mapping
newOptions - the new options or null to keep the existing value

update

public void update(java.lang.String newName,
                   java.lang.String newOwner,
                   java.lang.String newComment,
                   java.lang.String newComputer,
                   WorkingFolder[] newMappings,
                   WorkspacePermissionProfile newPermissionProfile,
                   boolean removeUnparentedCloaks,
                   WorkspaceOptions newOptions,
                   WorkspaceLocation newLocation)
Update a workspace.

Parameters:
newName - the new name or null to keep the existing value
newOwner - the new owner or null to keep the existing value
newComment - the new comment or null to keep the existing value
newComputer - the new computer or null to keep the existing value
newMappings - the new mappings or null to keep the existing value
newPermissionProfile - the new permission profile or null to keep the existing value
removeUnparentedCloaks - When true, will strip from the mappings any cloaks not parented by a mapping
newOptions - the new options or null to keep the existing value
newLocation - the new workspace location or null to keep the existing value

updateComputerName

public void updateComputerName()
Update the name of the computer in the repository. This is useful when the user has renamed the machine on which the workspace is hosted.


updateFromWorkspace

public void updateFromWorkspace(Workspace updateSource)
An internal helper method called by RuntimeWorkspaceCache to update properties of a Workspace object when new information has been retrieved from the server.

Parameters:
updateSource - the workspace to update from (must not be null)

updateLastSavedCheckin

public void updateLastSavedCheckin(Shelveset shelveset)
Updates the last attempted checkin information with the information from the shelveset.

Parameters:
shelveset - the shelveset (must not be null)

updateLastSavedCheckin

public void updateLastSavedCheckin(Shelveset shelveset,
                                   PendingChange[] unshelvedChanges)
Updates the last attempted checkin information with the information from the shelveset and ensures that the specified set of pending changes have a checked state set.

Parameters:
shelveset - the shelveset containing the desired metadata (must not be null)
unshelvedChanges - the pending changes that where unshelved (may be null )

refreshIfNeeded

public void refreshIfNeeded()
Refreshes this Workspace instance from the server if uncacheable properties are stale or have not been loaded. Uncacheable properties include working folders and effective permissions.


refreshMappingsIfNeeded

public void refreshMappingsIfNeeded()
Refreshes the mappings from the server if:
  1. The mappings are missing (no matter what type of workspace is in question)
  2. The workspace is a server workspace and the uncached properties are stale


refresh

public void refresh()
Refreshes workspace information based on updated information on the server. Currently only updates working folder mappings. The workspace cache is also updated to reflect this information.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.


undo

public int undo(ItemSpec[] items)
Undoes pending changes for matching items in this workspace. Items in working folders are immediately updated.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
items - the items to undo (must not be null)
Returns:
the number of items successfully undone.

undo

public int undo(ItemSpec[] items,
                GetOptions getOptions)
Equivalent To:
undo(items, getOptions, null)

undo

public int undo(ItemSpec[] items,
                GetOptions getOptions,
                java.lang.String[] itemPropertyFilters)
Equivalent To:
undo(items, getOptions, false, itemPropertyFilters)

undo

public int undo(ItemSpec[] items,
                GetOptions getOptions,
                boolean deleteAdds,
                java.lang.String[] itemPropertyFilters)
Undoes pending changes for matching items in this workspace. Items in working folders are immediately updated. If updateDisk is false, then the files on disk will not be updated in response to the server commands to do so. Passing false for updateDisk is not common and should only be needed in rare situations.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
items - the items to undo (must not be null)
getOptions - the GetOptions to use (must not be null)
deleteAdds - determines if adds should be deleted
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
the number of items successfully undone.

getLastSavedCheckin

public SavedCheckin getLastSavedCheckin()
Returns:
the object that holds the metadata for the last unsuccessful checkin or the metadata from unshelving (comment, work items, etc.). May be null.

setLastSavedCheckin

public void setLastSavedCheckin(SavedCheckin newSavedCheckin)
Parameters:
newSavedCheckin - the new SavedCheckin, which may be null

isLocal

public boolean isLocal()
Tests whether this workspace is for this computer (the computer name matches this computer's name and the working folder mappings are for paths on this computer).

Returns:
true if this workspace is for this computer, false if it is for some other computer
See Also:
getLocation()

isLocalWorkspace

public boolean isLocalWorkspace()
Returns:
true if this workspace is local workspace, false if it is server workspace
See Also:
getLocation()

getLocation

public WorkspaceLocation getLocation()
Returns:
a value that indicates the location where data (pending changes, local versions) for this workspace are stored.
See Also:
isLocal()

isDeleted

public boolean isDeleted()
Returns:
true if the workspace has been deleted.

setDeleted

public void setDeleted(boolean deleted)

lock

public com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLock lock()
Locks the local workspace from changes by other threads and processes.

Returns:
the WorkspaceLock or null if the workspace type is not lockable (workspace location is not WorkspaceLocation.LOCAL)

removeLocalConflict

public void removeLocalConflict(Conflict conflict)
Removes a local conflict from the server's list of conflicts for this workspace.

Parameters:
conflict - the local conflict (not null)

removeLocalConflicts

public void removeLocalConflicts(Conflict[] conflicts)
Removes local conflicts from the server's list of conflicts for this workspace.

Parameters:
conflicts - the local conflicts (not null or empty)

queryFileTypes

public FileType[] queryFileTypes()
Queries the server for registered file types.

Returns:
an array of AFileType objects, each representing a FileType, which is a server-registered file type. May be empty but never null.

setFileTypes

public void setFileTypes(FileType[] fileTypes)
Sets the list of registered file types on the server.

Parameters:
fileTypes - array of AFileType objects, each representing a FileType, which is a server-registered file type (must not be null)

shelve

public void shelve(Shelveset set,
                   PendingChange[] changesToShelve,
                   boolean replace,
                   boolean move)
            throws ShelveException
Send pending changes to the server for storage without being checked in.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
set - the shelveset description object (must not be null)
changesToShelve - the pending changes to shelve (must not be null or empty).
replace - if true, an existing shelveset with a name matching the one given in the shelveset description object will have its contents replaced by the given changesToShelve.
move - if true, changes in the workspace will be removed after they are shelved in favor of the baseline content.
Throws:
ShelveException - if there were failures that caused the shelveset to not be created.

buildEmptyLastSavedCheckin

public SavedCheckin buildEmptyLastSavedCheckin()
Returns:
a new SavedCheckin that has the save excluded server paths that the existing SavedCheckin has, or null if this workpsace has no SavedCheckin

unshelve

public UnshelveResult unshelve(java.lang.String shelvesetName,
                               java.lang.String shelvesetOwner,
                               ItemSpec[] itemSpecs)
                        throws UnshelveException
Equivalent To:
unshelve(shelvesetName, shelvesetOwner, itemSpecs, null,
             null, false, true)
Throws:
UnshelveException

unshelve

public UnshelveResult unshelve(java.lang.String shelvesetName,
                               java.lang.String shelvesetOwner,
                               ItemSpec[] itemSpecs,
                               java.lang.String[] itemPropertyFilters,
                               java.lang.String[] shelvesetPropertyFilters,
                               boolean merge,
                               boolean noAutoResolve)
                        throws UnshelveException
Unshelves changes, restoring them to the workspace.

Parameters:
shelvesetName - the name of the shelveset to restore (must not be null or empty).
shelvesetOwner - the owner of the shelveset to restore (must not be null or empty).
itemSpecs - the items to restore. If this array is null, all changes in the named shelveset are restored. If this array is empty, no changes will be unshelved.
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
shelvesetPropertyFilters - the list of properties to be returned on the shelvesets. To get all properties pass a single filter that is simply "*" (may be null)
merge - true to allow merging conflicting changes in the shelveset with local pending changes (Conflicts will be produced)
noAutoResolve - true to disable automerging of conflicting changes, false to perform an automerge
Returns:
the UnshelveResult which contains the Shelveset unshelved and the GetStatus for the get operations which were processed, or null if the unshelve operation failed with no further status from the server
Throws:
UnshelveException

matchName

public boolean matchName(java.lang.String workspaceName)

matchOwner

public boolean matchOwner(java.lang.String owner)

matchComputer

public boolean matchComputer(java.lang.String computer)

getBranchHistory

public BranchHistory getBranchHistory(ItemSpec itemSpec,
                                      VersionSpec versionSpec)
Gets the branch history for the specified item at the specified version.

Parameters:
itemSpec - the item to query branch history for (must not be null)
versionSpec - the version of the item to query branch history for (must not be null)
Returns:
for each item spec passed, a BranchHistory is returned in the array. The array may be empty but never null. Items in the array may be null.

getBranchHistory

public BranchHistory[] getBranchHistory(ItemSpec[] itemSpecs,
                                        VersionSpec versionSpec)
Gets the branch history for the specified items at the specified version.

Parameters:
itemSpecs - the items to query branch history for (must not be null)
versionSpec - the version of the item to query branch history for (must not be null)
Returns:
for each item spec passed, a BranchHistory is returned in the array. The array may be empty but never null. Items in the array may be null.

buildBranchHistoryTree

protected BranchHistory buildBranchHistoryTree(ms.tfs.versioncontrol.clientservices._03._BranchRelative[] relatives)
Put the flattened results from the SOAP query into a hierarchy.


getMergeCandidates

public MergeCandidate[] getMergeCandidates(java.lang.String sourcePath,
                                           java.lang.String targetPath,
                                           RecursionType recursion,
                                           MergeFlags mergeFlags)
Look up the merge candidates for merging between the requested items.

Parameters:
sourcePath - the local or server path of the source of the potential merge (not null or empty).
targetPath - the local or server path of the target of the potential merge (not null or empty).
recursion - what level of recursion we should apply to the candidate search (may be null).
mergeFlags - merge command option(s) compatible with the /cadidate option (must not be null).
Returns:
the array of merge candidates returned by the server. May be empty but never null.

merge

public GetStatus merge(java.lang.String sourcePath,
                       java.lang.String targetPath,
                       VersionSpec sourceVersionFrom,
                       VersionSpec sourceVersionTo,
                       LockLevel lockLevel,
                       RecursionType recursion,
                       MergeFlags mergeFlags)
Equivalent To:
merge(sourcePath, targetPath, sourceVersionFrom,
             sourceVersionTo, lockLevel, recursion, mergeFlags, null)

merge

public GetStatus merge(java.lang.String sourcePath,
                       java.lang.String targetPath,
                       VersionSpec sourceVersionFrom,
                       VersionSpec sourceVersionTo,
                       LockLevel lockLevel,
                       RecursionType recursion,
                       MergeFlags mergeFlags,
                       java.lang.String[] itemPropertyFilters)
Equivalent To:
merge(new ItemSpec(sourcePath, recursion), targetPath,
             sourceVersionFrom, sourceVersionTo, lockLevel, mergeFlags,
             null)

merge

public GetStatus merge(ItemSpec sourceSpec,
                       java.lang.String targetPath,
                       VersionSpec sourceVersionFrom,
                       VersionSpec sourceVersionTo,
                       LockLevel lockLevel,
                       MergeFlags mergeFlags,
                       java.lang.String[] itemPropertyFilters)
Merge changes made between two versions to items in a given source path into a given target path. The result of this method is that one or more merge items are pended.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
sourceSpec - the local or server path of the source of the merge; where the changes are copied from, and the recursion type to match the given source path with (must not be null, path must not be null or empty)
targetPath - the local or server path of the target of the merge; where the changes will end up (must not be null or empty).
sourceVersionFrom - the version (inclusive) of the source item to start including changes from for this merge operation. null indicates all versions beginning with version 1.
sourceVersionTo - the version (inclusive) of the source item to stop including changes from for this merge operation. null indicates all versions up to and including tip version.
lockLevel - the lock level to apply to the pended changes (must not be null)
mergeFlags - any merge options to apply during this merge (must not be null)
itemPropertyFilters - a list of versioned item properties to return with each get operation (may be null)
Returns:
a GetStatus instance with the results of the merge operation.

findReconcilablePendingChangesForChangeset

public ReconcilePendingChangesStatus findReconcilablePendingChangesForChangeset(Changeset changeset,
                                                                                PendingChange[] pendingChanges)
                                                                         throws CanceledException

Finds pending changes in the given array which can be safely reconciled (undone) to match the changes in the given changeset. This method is primarily used to undo pending changes after a gated checkin build has completed, so the local workspace does not have changes which conflict with the latest versions of items.

This method may run for a long time for large changesets or large files (their contents are hashed and compared with the content hashes in the given changeset). Cancelation via TaskMonitor is supported.

This method is an core event origination point. The EventSource object that accompanies each event fired by this method describes the execution context (current thread, etc.) when and where this method was invoked.

Parameters:
changeset - the Changeset whose changes are to be reconciled with the given pending changes (must not be null)
pendingChanges - the pending changes to be reconciled with the changeset (must not be null)
Returns:
a ReconcilePendingChangesStatus containing the pending changes and additional information (never null)
Throws:
CanceledException - if the operation was canceled via the TaskMonitor

getDisplayName

public java.lang.String getDisplayName()
Obtains the display name of this workspace. The display name is the name and owner of this workspace in the "workspace spec" format as defined by the WorkspaceSpec class.

Returns:
the display name of this workspace

getUniqueName

public java.lang.String getUniqueName()
Obtains the unique name of this workspace. The unique name is the name and owner of this workspace in the "workspace spec" format as defined by the WorkspaceSpec class.

Returns:
the qualified unique name of this workspace

getPermissions

public WorkspacePermissions getPermissions()

getPermissionsProfile

public WorkspacePermissionProfile getPermissionsProfile()
Returns:
the permission profile for this Workspace

setPermissionsProfile

public void setPermissionsProfile(WorkspacePermissionProfile newPermissionProfile)

toString

public java.lang.String toString()

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

compareTo

public int compareTo(Workspace other)
Compares two workspaces first by server URL, then by workspace name, then by owner (all case insensitive). See CachedWorkspace for an identical implementation of Comparable.compareTo(Object).

Specified by:
compareTo in interface java.lang.Comparable<Workspace>

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

checkForInternalMappingConflicts

public static WorkingFolder[] checkForInternalMappingConflicts(java.lang.String workspaceName,
                                                               WorkingFolder[] folders,
                                                               boolean removeUnparentedCloaks)
Checks for conflicting working folders within the working folder array itself.

Parameters:
workspaceName - the name of the workspace being checked (must not be null or empty)
folders - the new working folders to check (may be null)
removeUnparentedCloaks - When true, will strip from the mappings any cloaks not parented by a mapping
Returns:
the new working folders (never null)
Throws:
MappingConflictException - if there was a mapping conflict

hasAdministerPermission

public boolean hasAdministerPermission()
Returns:
true if the AuthorizedUser has CheckIn permission on this workspace.

hasWorkspacePermission

public boolean hasWorkspacePermission(WorkspacePermissions permissionToCheck)
Checks to see whether this.VersionControlServer.AuthorizedUser has the provided WorkspacePermissions bits on this workspace.

Parameters:
permissionToCheck - WorkspacePermissions bits to check
Returns:
true if the AuthorizedUser has the requested permissions, false otherwise


© 2015 Microsoft. All rights reserved.