|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace
public final class 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.).
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 GetOperation s for the given GetRequest s, 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 |
---|
public Workspace(ms.tfs.versioncontrol.clientservices._03._Workspace workspace, VersionControlClient client)
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.
workspace
- a _Workspace
object returned from the server (must not be
null
)client
- a VersionControlClient
instace this Workspace
can
use (must not be null
)public Workspace(VersionControlClient client, java.lang.String name, java.lang.String owner, java.lang.String comment, WorkingFolder[] workingFolders, java.lang.String computer, WorkspaceLocation location)
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.
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)
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)
Workspace
.
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 |
---|
public WorkspaceWatcher getWorkspaceWatcher()
public com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.OfflineCacheData getOfflineCacheData()
public java.lang.String getLocalMetadataDirectory()
public java.lang.String getWorkspaceDirectory(java.lang.String basePath)
basePath
- Base path to form the path from
public ms.tfs.versioncontrol.clientservices._03._Workspace getWebServiceObject()
public java.lang.String getServerName()
public java.net.URI getServerURI()
TFSConnection.getBaseURI()
public com.microsoft.tfs.util.GUID getServerGUID()
public VersionControlClient getClient()
public void invalidate()
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.
public void invalidateMappings()
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.
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
)
ExtendedItem
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.
getExtendedItems(itemSpecs, deletedState, itemType, GetItemsOptions.NONE)
public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, GetItemsOptions options)
getExtendedItems(itemSpecs, deletedState, itemType, options, null)
public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, GetItemsOptions options, java.lang.String[] itemPropertyFilters)
Gets extended information about items, with full results control.
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
)
ExtendedItem
arrays, each outer array
representing one given ItemSpec
, and each inner array
representing the matches found for those ItemSpec
s
(should be only one object in these inner arrays because
recursion is not an option). Inner arrays may be empty but are
never null.public WorkspaceItemSet[] getItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, boolean generateDownloadUrls, GetItemsOptions getItemsOptions)
public void addConflict(ConflictType conflictType, int itemID, int versionServer, int pendingChangeID, java.lang.String sourceLocalItem, java.lang.String targetLocalItem, OperationStatus conflictReason)
public CheckinEvaluationResult evaluateCheckIn(CheckinEvaluationOptions options, PendingChange[] allChanges, PendingChange[] changesToCheckin, java.lang.String comment, CheckinNote checkinNotes, WorkItemCheckinInfo[] workItemChanges, PolicyEvaluator policyEvaluator, PolicyContext policyContext) throws PolicyEvaluationCancelledException
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.
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
)
PolicyEvaluationCancelledException
- if the user cancelled check-in policy evaluation.public CheckinEvaluationResult evaluateCheckIn(CheckinEvaluationOptions options, PendingCheckin pendingCheckin, PolicyContext policyContext) throws PolicyEvaluationCancelledException
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.
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
)
PolicyEvaluationCancelledException
- if the user cancelled check-in policy evaluation.public int checkIn(PendingChange[] changes, java.lang.String comment) throws CheckinException
checkIn(changes, comment, null, null, null)
CheckinException
public int checkIn(PendingChange[] changes, java.lang.String comment, CheckinNote checkinNote, WorkItemCheckinInfo[] associatedWorkItems, PolicyOverrideInfo policyOverrideInfo) throws CheckinException
checkIn(changes, null, comment, checkinNote, associatedWorkItems, null)
CheckinException
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
checkIn(changes, author, authorDisplayName, comment, checkinNote, associatedWorkItems, policyOverrideInfo, CheckinFlags.NONE)
CheckinException
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
checkIn(changes, null, null, author, authorDisplayName, comment, checkinNote, associatedWorkItems, policyOverrideInfo, flags)
CheckinException
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
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.
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 checkinpolicyOverrideInfo
- 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
)
VersionControlClient.queryCheckinNoteFieldDefinitionsForServerPaths(String[])
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.).public Failure[] checkPendingChanges(java.lang.String[] serverItems)
serverItems
- the items to check for conflicts (must not be null
)
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.
serverPath
- the server path to map (must not be null
)localPath
- the local path to map (must not be null
)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.
serverPath
- the server path to map (must not be null
)localPath
- the local path to map (must not be null
)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.
serverPath
- the server path to map (must not be null
)localPath
- the local path to map (must not be null
)public void createWorkingFolder(WorkingFolder wf)
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.
wf
- the working folder mapping to create.public void createWorkingFolder(WorkingFolder newWorkingFolder, boolean overwriteExisting)
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.
newWorkingFolder
- the working folder mapping to create.overwriteExisting
- if true, any existing mapping with the same server path or local
path is overwrittenpublic void createWorkingFolders(WorkingFolder[] newWorkingFolders)
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.
newWorkingFolders
- the working folder mappings to create.public void createWorkingFolders(WorkingFolder[] newWorkingFolders, boolean overwriteExisting)
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.
newWorkingFolders
- the working folder mappings to create.overwriteExisting
- if true, any existing mapping with the same server path or local
path is overwrittenpublic void deleteWorkingFolder(WorkingFolder wf) throws ServerPathFormatException, java.io.IOException
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.
wf
- the working folder mapping to remove (any object matching field
values of parameter is deleted).
ServerPathFormatException
java.io.IOException
public void deleteWorkingFolders(WorkingFolder[] workingFolders) throws ServerPathFormatException, java.io.IOException
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.
wf
- the working folder mapping to remove (any object matching field
values of parameter is deleted).
ServerPathFormatException
java.io.IOException
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
VersionControlClient.queryHistory(String, VersionSpec, int,
RecursionType, String, VersionSpec, VersionSpec, int, boolean,
boolean, boolean, boolean)
ServerPathFormatException
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
Iterator
of Changeset
s.
VersionControlClient.queryHistory(String, VersionSpec, int,
RecursionType, String, VersionSpec, VersionSpec, int, boolean,
boolean, boolean, boolean)
ServerPathFormatException
public int createBranch(java.lang.String sourceServerPath, java.lang.String targetServerPath, VersionSpec version)
VersionControlClient.createBranch(String, String, VersionSpec)
public LabelResult[] createLabel(VersionControlLabel label, LabelItemSpec[] items, LabelChildOption options)
VersionControlClient.createLabel(VersionControlLabel,
LabelItemSpec[], LabelChildOption)
public LabelResult[] unlabelItem(java.lang.String label, java.lang.String scope, ItemSpec[] items, VersionSpec version)
VersionControlClient.unlabelItem(String, String, ItemSpec[],
VersionSpec)
public VersionControlLabel[] queryLabels(java.lang.String label, java.lang.String scope, java.lang.String owner, boolean includeItemDetails, java.lang.String filterItem, VersionSpec filterItemVersion)
VersionControlClient.queryLabels(String, String, String, boolean,
String, VersionSpec)
public java.lang.String getComment()
public java.lang.String getComputer()
public WorkspaceOptions getOptions()
public IdentityDescriptor getOwnerDescriptor()
IdentityDescriptor
, if set, otherwise nullpublic java.lang.String getSecurityToken()
public GetStatus get(GetOptions options)
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.
options
- options for the get operation (must not be null
)
public GetStatus get(VersionSpec version, GetOptions options)
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.
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
)
public GetStatus get(GetRequest request, GetOptions options)
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.
request
- the request to process (must not be null
)options
- options for the get operation (must not be null
)
public GetStatus get(GetRequest[] requests, GetOptions options)
get(requests, options, null, false, new AtomicReference<Conflict[]>())
public GetStatus get(GetRequest[] requests, GetOptions options, java.lang.String[] itemPropertyFilters, boolean alwaysQueryConflicts, java.util.concurrent.atomic.AtomicReference<Conflict[]> conflicts)
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.
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 stepconflicts
- a reference to a list of conflicts to return (must not be
null
)
public GetStatus rollback(ItemSpec[] itemSpecs, VersionSpec itemVersionSpec, VersionSpec versionFrom, VersionSpec versionTo, LockLevel lockLevel, RollbackOptions options)
rollback(itemSpecs, itemVersionSpec, versionFrom, versionTo, lockLevel, options, null)
public GetStatus rollback(ItemSpec[] itemSpecs, VersionSpec itemVersionSpec, VersionSpec versionFrom, VersionSpec versionTo, LockLevel lockLevel, RollbackOptions options, java.lang.String[] itemPropertyFilters)
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.
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
)public GetOperation[][] previewGetItems(GetRequest[] requests, GetOptions options)
previewGetItems(requests, options, null)
public GetOperation[][] previewGetItems(GetRequest[] requests, GetOptions options, java.lang.String[] itemPropertyFilters)
GetOperation
s for the given GetRequest
s, but
does not update the workspace or fire any events.
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
)
GetOperation
s. There is a top-level
array element for each given GetRequest
, and the inner
arrays may be empty but never null.public java.lang.String getName()
public java.lang.String getOwnerName()
public java.lang.String getOwnerDisplayName()
public java.lang.String[] getOwnerAliases()
public java.util.Calendar getLastAccessDate()
public java.lang.String getQualifiedName()
WorkspaceSpec(this.getName(), this.getOwnerName()).toString();
public boolean isLocalPathMapped(java.lang.String localPath)
localPath
- the local path (file or directory) to test (must not be
null
or empty)
true
if the given local path is mapped to a working
folder in this workspace that is not a cloak mapping,
false
otherwisepublic boolean isServerPathMapped(java.lang.String serverPath)
serverPath
- the server path (file or directory) to test (must not be
null
or empty)
true
if the given server path is mapped to a working
folder in this workspace that is not a cloak mapping,
false
otherwisepublic 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.
localPath
- the local path to map to a server path (must not be
null
or empty)
null
if no mapping exists or the item is cloakedpublic 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.
serverPath
- the server path to map to a local path (must not be
null
or empty)
null
if no mapping exists or the item is cloakedpublic 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.
localPath
- the local path to get the mapping for (must not be
null
)
null
if there is no
exact mappingpublic 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.
serverPath
- the server path to get the mapping for (must not be
null
)
null
if there is no
exact mappingpublic WorkingFolder getClosestMappingForServerPath(java.lang.String serverPath)
serverPath
- the server path whose parent mapping we wish to find (must not be
null
)
null
if no there is no
mappingpublic WorkingFolder getClosestMappingForLocalPath(java.lang.String localPath)
localPath
- the local path whose parent mapping we wish to find (must not be
null
)
null
if no there is no
mappingpublic boolean serverPathExists(java.lang.String serverPath)
serverPath
-
public boolean serverPathExists(java.lang.String serverPath, VersionSpec versionSpec)
serverPath
- versionSpec
-
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
.
localPath
- the local path to find a mapping for (must not be
null
or empty)
null
if the item
is not mappedpublic 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
.
serverPath
- the server path to find a mapping for (must not be
null
or empty).
PathTranslation.getTranslatedPath()
is
null
for cloaked items), or null if the item is not
mapped.public WorkingFolder[] getFolders()
public void setFolders(WorkingFolder[] folders)
public static int compareName(java.lang.String name1, java.lang.String name2)
public static int compareOwner(java.lang.String owner1, java.lang.String owner2)
public static int compareComputer(java.lang.String computer1, java.lang.String computer2)
public static int compareComment(java.lang.String comment1, java.lang.String comment2)
public static int compareServerURI(java.net.URI uri1, java.net.URI uri2)
public static int compareSecurityToken(java.lang.String securityToken1, java.lang.String securityToken2)
public java.lang.String[] getMappedPaths()
public static boolean matchName(java.lang.String name1, java.lang.String name2)
public static boolean matchOwner(java.lang.String owner1, java.lang.String owner2)
public static boolean matchComputer(java.lang.String computer1, java.lang.String computer2)
public static boolean matchServerGUID(com.microsoft.tfs.util.GUID serverGUID1, com.microsoft.tfs.util.GUID serverGUID2)
public static boolean matchComment(java.lang.String comment1, java.lang.String comment2)
public static boolean matchServerURI(java.net.URI serverURI1, java.net.URI serverURI2)
public static boolean matchSecurityToken(java.lang.String securityToken1, java.lang.String securityToken2)
public boolean ownerNameMatches(java.lang.String ownerName)
getOwnerName()
, getOwnerDisplayName()
,
getOwnerAliases()
) for this workspace.
public static int hashName(java.lang.String name)
public static int hashOwner(java.lang.String ownerName)
public void reconcile(boolean reconcileMissingLocalItems, java.util.concurrent.atomic.AtomicBoolean pendingChangesUpdatedByServer)
reconcileMissingLocalItems
- True to remove local version rows for items that no longer exist
on diskAtomicBboolean
- public int pendAdd(java.lang.String[] paths, boolean recursive, FileEncoding fileEncoding, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
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.
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
)
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)
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.
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.
public int pendBranch(java.lang.String sourcePath, java.lang.String targetPath, VersionSpec version, LockLevel lockLevel, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions)
pendBranch(sourcePath, targetPath, version, lockLevel, recursion, getOptions, pendOptions, null)
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)
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.
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
)
public int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
pendDelete(paths, recursion, lockLevel, getOptions, pendOptions, null)
public int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
pendDelete(paths, recursion, lockLevels, getOptions, pendOptions, null)
public int pendDelete(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendDelete(ItemSpec[] specs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
pendDelete(specs, lockLevel, getOptions, pendOptions, null)
public int pendDelete(ItemSpec[] specs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendDelete(ItemSpec[] specs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
pendDelete(specs, lockLevels, getOptions, pendOptions, null)
public int pendDelete(ItemSpec[] specs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendUndelete(ItemSpec[] items, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
pendUndelete(items, lockLevel, getOptions, pendOptions, null)
public int pendUndelete(ItemSpec[] items, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendUndelete(ItemSpec[] items, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
pendUndelete, items, lockLevels, getOptions, pendOptions, null)
public int pendUndelete(ItemSpec[] items, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendUndelete(ItemSpec item, java.lang.String newName, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
pendUndelete(item, newName, lockLevel, getOptions, pendOptions, null)
public int pendUndelete(ItemSpec item, java.lang.String newName, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendRename(java.lang.String oldPath, java.lang.String newPath, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions)
pendRename(oldPath, newPath, lockLevel, getOptions, detectTargetItemType, pendOptions, null)
public int pendRename(java.lang.String oldPath, java.lang.String newPath, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendRename(java.lang.String[] oldPaths, java.lang.String[] newPaths, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions)
pendRename(oldPaths, newPaths, lockLevel, getOptions, detectTargetItemType, pendOptions, null)
public int pendRename(java.lang.String[] oldPaths, java.lang.String[] newPaths, LockLevel lockLevel, GetOptions getOptions, boolean detectTargetItemType, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendEdit(ItemSpec[] specs, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
pendEdit(specs, lockLevel, fileEncoding, getOptions, pendOptions, null)
public int pendEdit(ItemSpec[] specs, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendEdit(ItemSpec[] specs, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
pendEdit(specs, lockLevels, fileEncoding, getOptions, pendOptions, null)
public int pendEdit(ItemSpec[] specs, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
pendEdit(paths, recursion, lockLevel, fileEncoding, getOptions, pendOptions, null)
public int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel lockLevel, FileEncoding fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions)
pendEdit(paths, recursion, lockLevels, fileEncoding, getOptions, pendOptions, null)
public int pendEdit(java.lang.String[] paths, RecursionType recursion, LockLevel[] lockLevels, FileEncoding[] fileEncoding, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int pendPropertyChange(java.lang.String path, PropertyValue property)
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.
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
)
public int pendPropertyChange(java.lang.String path, PropertyValue property, RecursionType recursion, LockLevel lockLevel)
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.
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
)
public int pendPropertyChange(java.lang.String path, PropertyValue[] properties, RecursionType recursion, LockLevel lockLevel)
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.
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
)
public int pendPropertyChange(java.lang.String[] paths, PropertyValue property, RecursionType recursion, LockLevel lockLevel)
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.
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
)
public int pendPropertyChange(java.lang.String[] paths, PropertyValue[] properties, RecursionType recursion, LockLevel lockLevel, PendChangesOptions options, java.lang.String[] itemPropertyFilters)
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.
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
GetOperation
s for the changes pended).itemPropertyFilters
- a list of versioned item properties to return with each get
operation
public int pendPropertyChange(ItemProperties[] specs, RecursionType recursion, LockLevel lockLevel, PendChangesOptions options, java.lang.String[] itemPropertyFilters)
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.
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
GetOperation
s for the changes pended).itemPropertyFilters
- a list of versioned item properties to return with each get
operation
public int setLock(java.lang.String[] paths, LockLevel lockLevel, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions)
setLock(paths, lockLevel, recursion, getOptions, pendOptions, null)
public int setLock(java.lang.String[] paths, LockLevel[] lockLevels, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions)
setLock(paths, lockLevels, recursion, getOptions, pendOptions, null)
public int setLock(java.lang.String[] paths, LockLevel lockLevel, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int setLock(java.lang.String[] paths, LockLevel[] lockLevels, RecursionType recursion, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int setLock(ItemSpec[] itemSpecs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions)
setLock(itemSpecs, lockLevel, getOptions, pendOptions, null)
public int setLock(ItemSpec[] itemSpecs, LockLevel lockLevel, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public int setLock(ItemSpec[] itemSpecs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions)
setLock(itemSpecs, lockLevels, getOptions, pendOptions, null)
public int setLock(ItemSpec[] itemSpecs, LockLevel[] lockLevels, GetOptions getOptions, PendChangesOptions pendOptions, java.lang.String[] itemPropertyFilters)
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.
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
)
public java.lang.String addIgnoreFileExclusionAuto(java.lang.String localItem) throws java.io.FileNotFoundException, java.io.IOException
localItem
- the local item to find or create the .tfignore file by and add an
exclusion for (must not be null
or empty)
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 filepublic java.lang.String addIgnoreFileExclusionAuto(java.lang.String localItem, java.lang.String exclusion) throws java.io.FileNotFoundException, java.io.IOException
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)
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 filepublic java.lang.String addIgnoreFileExclusion(java.lang.String exclusion, java.lang.String ignoreFileDirectory) throws java.io.FileNotFoundException, java.io.IOException
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)
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 filepublic Conflict[] queryConflicts(java.lang.String[] pathFilters, boolean recursive)
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.
null
).public Conflict[] queryConflicts(ItemSpec[] itemSpecs)
itemSpecs
- The ItemSpec
s to search for conflicts. If
null
, the entire workspace is queried for conflicts.
null
).public void resolveConflict(Conflict conflict)
resolveConflict(conflict, new AtomicReference<Conflict[]>())
public void resolveConflict(Conflict conflict, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
resolveConflict(conflict, resolvedConflicts, null)
public void resolveConflict(Conflict conflict, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts, java.lang.String[] itemPropertyFilters)
resolveConflict(conflict, resolvedConflicts, itemPropertyFilters, null, null, null, null)
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)
resolveConflicts(new Conflict[] { conflict }, itemPropertyFilters, ResolveErrorOptions.THROW_ON_ERROR, resolvedConflicts, externalToolset, finishedHandler, capturedStandardOutput, capturedStandardError)
public void resolveConflicts(Conflict[] conflicts, java.lang.String[] itemPropertyFilters, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
resolveConflicts(conflicts, itemPropertyFilters, ResolveErrorOptions.RAISE_WARNINGS_FOR_ERROR, resolvedConflicts)
public void resolveConflicts(Conflict[] conflicts, java.lang.String[] itemPropertyFilters, ResolveErrorOptions errorOptions, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
resolveConflicts(conflicts, itemPropertyFilters, errorOptions, resolvedConflicts, null, null, null, null)
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)
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.
conflicts
- The conflicts to resolve (not null
)itemAttributeFilters
- A list of versioned item properties to return with each get
operationitemPropertyFilters
- a list of versioned item properties to return with each get
operationerrorOptions
- 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.public PendingSet getPendingChanges()
public PendingSet getPendingChanges(java.lang.String[] serverPaths, RecursionType recursionType, boolean includeDownloadInfo)
getPendingChanges(serverPaths, recursionType, includeDownloadInfo, null)
public PendingSet getPendingChanges(java.lang.String[] serverPaths, RecursionType recursionType, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
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
)
public PendingSet getPendingChanges(ItemSpec[] specs, boolean includeDownloadInfo)
getPendingChanges(specs, includeDownloadInfo, null)
public PendingSet getPendingChanges(ItemSpec[] specs, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
specs
- ItemSpec
s 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
)
public PendingChange[] getPendingChangesWithCandidates(ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.util.concurrent.atomic.AtomicReference<PendingChange[]> candidateChanges)
getPendingChangesWithCandidates(itemSpecs, includeDownloadInfo, candidateChanges, null)
public PendingChange[] getPendingChangesWithCandidates(ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.util.concurrent.atomic.AtomicReference<PendingChange[]> candidateChanges, java.lang.String[] itemPropertyFilters)
specs
- ItemSpec
s 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
)
null
or an empty array if there are no pending
changes for the given specspublic PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths, RecursionType recursionType, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo)
queryPendingSets(serverOrLocalPaths, recursionType, queryWorkspaceName, queryWorkspaceOwner, includeDownloadInfo, null)
public PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths, RecursionType recursionType, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
VersionControlClient.queryPendingSets(String[], RecursionType,
boolean, String, String, String[])
public PendingSet[] queryPendingSets(ItemSpec[] itemSpecs, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo)
queryPendingSets(itemSpecs, queryWorkspaceName, queryWorkspaceOwner, includeDownloadInfo, null)
public PendingSet[] queryPendingSets(ItemSpec[] itemSpecs, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
VersionControlClient.queryPendingSets(ItemSpec[], boolean, String,
String, boolean, String[])
public PendingSet[] queryShelvedChanges(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs)
queryShelvedChanges(shelvesetName, shelvesetOwner, itemSpecs, false)
public PendingSet[] queryShelvedChanges(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs, boolean includeDownloadInfo)
queryShelvedChanges(shelvesetName, shelvesetOwner, itemSpecs, includeDownloadInfo, null)
public PendingSet[] queryShelvedChanges(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
VersionControlClient.queryShelvedChanges(String, String, ItemSpec[],
boolean, String[])
public void update(java.lang.String newName, java.lang.String newComment, WorkingFolder[] newMappings)
newName
- the new name or null
to keep the existing valuenewComment
- the new comment or null
to keep the existing valuenewMappings
- the new mappings or null
to keep the existing valuenewComputer
- the new computer name or null
to keep the existing
valuepublic void update(java.lang.String newName, java.lang.String newComment, WorkingFolder[] newMappings, boolean removeUnparentedCloaks)
newName
- the new name or null
to keep the existing valuenewComment
- the new comment or null
to keep the existing valuenewMappings
- the new mappings or null
to keep the existing valuenewComputer
- the new computer name or null
to keep the existing
valueremoveUnparentedCloaks
- When true, will strip from the mappings any cloaks not parented by
a mappingpublic void update(java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, WorkingFolder[] newMappings, boolean removeUnparentedCloaks)
newName
- the new name or null
to keep the existing valuenewOwner
- the new owner or null
to keep the existing valuenewComment
- the new comment or null
to keep the existing valuenewMappings
- the new mappings or null
to keep the existing valueremoveUnparentedCloaks
- When true, will strip from the mappings any cloaks not parented by
a mappingpublic void update(java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, java.lang.String newComputer, WorkingFolder[] newMappings, WorkspacePermissionProfile newPermissionProfile, boolean removeUnparentedCloaks)
newName
- the new name or null
to keep the existing valuenewOwner
- the new owner or null
to keep the existing valuenewComment
- the new comment or null
to keep the existing valuenewComputer
- the new computer or null
to keep the existing valuenewMappings
- the new mappings or null
to keep the existing valuenewPermissionProfile
- the new permission profile or null
to keep the
existing valueremoveUnparentedCloaks
- When true, will strip from the mappings any cloaks not parented by
a mappingpublic 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)
newName
- the new name or null
to keep the existing valuenewOwner
- the new owner or null
to keep the existing valuenewComment
- the new comment or null
to keep the existing valuenewComputer
- the new computer or null
to keep the existing valuenewMappings
- the new mappings or null
to keep the existing valuenewPermissionProfile
- the new permission profile or null
to keep the
existing valueremoveUnparentedCloaks
- When true, will strip from the mappings any cloaks not parented by
a mappingnewOptions
- the new options or null
to keep the existing valuepublic 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)
newName
- the new name or null
to keep the existing valuenewOwner
- the new owner or null
to keep the existing valuenewComment
- the new comment or null
to keep the existing valuenewComputer
- the new computer or null
to keep the existing valuenewMappings
- the new mappings or null
to keep the existing valuenewPermissionProfile
- the new permission profile or null
to keep the
existing valueremoveUnparentedCloaks
- When true, will strip from the mappings any cloaks not parented by
a mappingnewOptions
- the new options or null
to keep the existing valuenewLocation
- the new workspace location or null
to keep the
existing valuepublic void updateComputerName()
public void updateFromWorkspace(Workspace updateSource)
RuntimeWorkspaceCache
to
update properties of a Workspace
object when new information has
been retrieved from the server.
updateSource
- the workspace to update from (must not be null
)public void updateLastSavedCheckin(Shelveset shelveset)
shelveset
- the shelveset (must not be null
)public void updateLastSavedCheckin(Shelveset shelveset, PendingChange[] unshelvedChanges)
shelveset
- the shelveset containing the desired metadata (must not be
null
)unshelvedChanges
- the pending changes that where unshelved (may be null
)public void refreshIfNeeded()
public void refreshMappingsIfNeeded()
public void refresh()
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.
public int undo(ItemSpec[] 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.
items
- the items to undo (must not be null
)
public int undo(ItemSpec[] items, GetOptions getOptions)
undo(items, getOptions, null)
public int undo(ItemSpec[] items, GetOptions getOptions, java.lang.String[] itemPropertyFilters)
undo(items, getOptions, false, itemPropertyFilters)
public int undo(ItemSpec[] items, GetOptions getOptions, boolean deleteAdds, java.lang.String[] itemPropertyFilters)
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.
items
- the items to undo (must not be null
)getOptions
- the GetOptions
to use (must not be null
)deleteAdds
- determines if adds should be deleteditemPropertyFilters
- a list of versioned item properties to return with each get
operation (may be null
)
public SavedCheckin getLastSavedCheckin()
null
.public void setLastSavedCheckin(SavedCheckin newSavedCheckin)
newSavedCheckin
- the new SavedCheckin
, which may be null
public boolean isLocal()
getLocation()
public boolean isLocalWorkspace()
getLocation()
public WorkspaceLocation getLocation()
isLocal()
public boolean isDeleted()
public void setDeleted(boolean deleted)
public com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLock lock()
WorkspaceLock
or null
if the workspace
type is not lockable (workspace location is not
WorkspaceLocation.LOCAL
)public void removeLocalConflict(Conflict conflict)
conflict
- the local conflict (not null
)public void removeLocalConflicts(Conflict[] conflicts)
conflicts
- the local conflicts (not null
or empty)public FileType[] queryFileTypes()
public void setFileTypes(FileType[] fileTypes)
fileTypes
- array of AFileType objects, each representing a FileType, which is
a server-registered file type (must not be null
)public void shelve(Shelveset set, PendingChange[] changesToShelve, boolean replace, boolean move) throws ShelveException
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.
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.
ShelveException
- if there were failures that caused the shelveset to not be
created.public SavedCheckin buildEmptyLastSavedCheckin()
SavedCheckin
that has the save excluded server
paths that the existing SavedCheckin
has, or
null
if this workpsace has no SavedCheckin
public UnshelveResult unshelve(java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs) throws UnshelveException
unshelve(shelvesetName, shelvesetOwner, itemSpecs, null, null, false, true)
UnshelveException
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
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 (Conflict
s will be
produced)noAutoResolve
- true
to disable automerging of conflicting changes,
false
to perform an automerge
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
UnshelveException
public boolean matchName(java.lang.String workspaceName)
public boolean matchOwner(java.lang.String owner)
public boolean matchComputer(java.lang.String computer)
public BranchHistory getBranchHistory(ItemSpec itemSpec, VersionSpec versionSpec)
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
)
BranchHistory
is returned in
the array. The array may be empty but never null. Items in the
array may be null.public BranchHistory[] getBranchHistory(ItemSpec[] itemSpecs, VersionSpec versionSpec)
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
)
BranchHistory
is returned in
the array. The array may be empty but never null. Items in the
array may be null.protected BranchHistory buildBranchHistoryTree(ms.tfs.versioncontrol.clientservices._03._BranchRelative[] relatives)
public MergeCandidate[] getMergeCandidates(java.lang.String sourcePath, java.lang.String targetPath, RecursionType recursion, MergeFlags mergeFlags)
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
).
public GetStatus merge(java.lang.String sourcePath, java.lang.String targetPath, VersionSpec sourceVersionFrom, VersionSpec sourceVersionTo, LockLevel lockLevel, RecursionType recursion, MergeFlags mergeFlags)
merge(sourcePath, targetPath, sourceVersionFrom, sourceVersionTo, lockLevel, recursion, mergeFlags, null)
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)
merge(new ItemSpec(sourcePath, recursion), targetPath, sourceVersionFrom, sourceVersionTo, lockLevel, mergeFlags, null)
public GetStatus merge(ItemSpec sourceSpec, java.lang.String targetPath, VersionSpec sourceVersionFrom, VersionSpec sourceVersionTo, LockLevel lockLevel, MergeFlags mergeFlags, java.lang.String[] itemPropertyFilters)
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.
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
)
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.
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
)
ReconcilePendingChangesStatus
containing the pending
changes and additional information (never null
)
CanceledException
- if the operation was canceled via the TaskMonitor
public java.lang.String getDisplayName()
WorkspaceSpec
class.
public java.lang.String getUniqueName()
WorkspaceSpec
class.
public WorkspacePermissions getPermissions()
public WorkspacePermissionProfile getPermissionsProfile()
Workspace
public void setPermissionsProfile(WorkspacePermissionProfile newPermissionProfile)
public java.lang.String toString()
toString
in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
public int compareTo(Workspace other)
CachedWorkspace
for an
identical implementation of Comparable.compareTo(Object)
.
compareTo
in interface java.lang.Comparable<Workspace>
public boolean equals(java.lang.Object obj)
equals
in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
public int hashCode()
hashCode
in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
public static WorkingFolder[] checkForInternalMappingConflicts(java.lang.String workspaceName, WorkingFolder[] folders, boolean removeUnparentedCloaks)
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
null
)
MappingConflictException
- if there was a mapping conflictpublic boolean hasAdministerPermission()
public boolean hasWorkspacePermission(WorkspacePermissions permissionToCheck)
permissionToCheck
- WorkspacePermissions bits to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |