|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.clients.versioncontrol.VersionControlClient
public final class VersionControlClient
Performs client tasks for source control, including workspace management, item status, history, labels, branching, etc., communicating with the Team Foundation Server when necessary.
This class publishes several events. To register for event notification, get
the VersionControlEventEngine
from your instance using
getEventEngine()
, then add listeners to it.
Don't create an instance of this class directly, instead use
TFSTeamProjectCollection.getVersionControlClient()
.
Field Summary | |
---|---|
static com.microsoft.tfs.util.GUID |
WORKSPACE_SECURITY_NAMESPACE_ID
GUID This is the set of namespaces that exist in the version control. |
Constructor Summary | |
---|---|
|
VersionControlClient(TFSTeamProjectCollection connection,
ms.tfs.versioncontrol.clientservices._03._RepositorySoap repository,
ms.tfs.versioncontrol.clientservices._03._RepositoryExtensionsSoap repositoryExtensions,
ms.tfs.versioncontrol.clientservices._03._Repository4Soap repository4,
ms.tfs.versioncontrol.clientservices._03._Repository5Soap repository5)
Creates a VersionControlClient that will use the given web
service proxy class and the given connection. |
protected |
VersionControlClient(TFSTeamProjectCollection connection,
ms.tfs.versioncontrol.clientservices._03._RepositorySoap webService,
ms.tfs.versioncontrol.clientservices._03._RepositoryExtensionsSoap webServiceExtensions,
ms.tfs.versioncontrol.clientservices._03._Repository4Soap repository4,
ms.tfs.versioncontrol.clientservices._03._Repository5Soap repository5,
int maximumGetEngineWorkerThreads,
int getEngineWorkerThreadIdleTimeoutSeconds)
Creates a VersionControlClient that will use the given web
service proxy class and the given connection. |
Method Summary | |
---|---|
Conflict[] |
autoResolveValidConflicts(Workspace workspace,
Conflict[] conflicts,
AutoResolveOptions resolveOptions)
Takes a list of candidates for AutoResolve and attempts to resolve them with the correct resolution and performing a content merge if necessary. |
PostMethod |
beginUploadRequest()
Begins a file upload. |
void |
close()
|
void |
createAnnotation(java.lang.String annotationName,
java.lang.String annotatedServerItem,
int version,
java.lang.String annotationValue,
java.lang.String comment,
boolean overwrite)
Creates an annotation. |
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. |
int |
createBranch(java.lang.String sourceServerPath,
java.lang.String targetServerPath,
VersionSpec version,
java.lang.String owner,
java.lang.String comment,
CheckinNote checkinNote,
PolicyOverrideInfo policyOverride,
Mapping[] mappings)
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. |
Workspace |
createWorkspace(WorkingFolder[] workingFolders,
java.lang.String workspaceName,
java.lang.String owner,
java.lang.String ownerDisplayName,
java.lang.String comment,
WorkspaceLocation location,
WorkspaceOptions options)
Create a workspace on the server. |
Workspace |
createWorkspace(WorkingFolder[] workingFolders,
java.lang.String workspaceName,
java.lang.String owner,
java.lang.String ownerDisplayName,
java.lang.String comment,
WorkspaceLocation location,
WorkspaceOptions options,
WorkspacePermissionProfile permissionProfile)
|
Workspace |
createWorkspace(WorkingFolder[] workingFolders,
java.lang.String workspaceName,
java.lang.String comment,
WorkspaceLocation location,
WorkspaceOptions options)
Create a workspace on the server. |
Workspace |
createWorkspace(WorkingFolder[] workingFolders,
java.lang.String workspaceName,
java.lang.String comment,
WorkspaceLocation location,
WorkspaceOptions options,
WorkspacePermissionProfile permissionProfile)
|
void |
deleteAnnotation(java.lang.String annotationName,
java.lang.String annotatedServerItem,
int version,
java.lang.String annotationValue)
Deletes an annotation. |
void |
deleteBranchObject(ItemIdentifier branch)
Deletes a branch object. |
LabelResult[] |
deleteLabel(java.lang.String label,
java.lang.String scope)
Deletes the specified label. |
void |
deleteShelveset(java.lang.String name,
java.lang.String owner)
Delete a shelveset on the server. |
void |
deleteWorkspace(Workspace workspace)
Delete a workspace on the server. |
Item[] |
destroy(ItemSpec itemSpec,
VersionSpec versionSpec,
VersionSpec stopAt,
DestroyFlags flags)
Permanently destroys a versioned item. |
Item[] |
destroy(ItemSpec itemSpec,
VersionSpec versionSpec,
VersionSpec stopAt,
DestroyFlags flags,
java.util.List<PendingSet> affectedPendingChanges,
java.util.List<PendingSet> affectedShelvedChanges)
Permanently destroys a versioned item. |
void |
determineWorkspaceNameAndOwner(ItemSpec[] itemSpecs,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
Determine the workspace name and owner for all given items which are local paths. |
void |
determineWorkspaceNameAndOwner(ItemSpec itemSpec,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
|
void |
determineWorkspaceNameAndOwner(LabelItemSpec[] labelItemSpecs,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
|
void |
determineWorkspaceNameAndOwner(SecurityChange[] securityChanges,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
|
void |
determineWorkspaceNameAndOwner(java.lang.String[] paths,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
|
void |
determineWorkspaceNameAndOwner(java.lang.String path,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName,
java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
|
void |
downloadFile(DownloadSpec spec,
java.io.File destinationFile,
boolean autoGunzip)
|
void |
downloadFile(DownloadSpec spec,
java.io.File destinationFile,
boolean autoGunzip,
EventSource eventSource,
TaskMonitor taskMonitor)
Download the file described by spec to the destination file. |
void |
downloadFileToStream(DownloadSpec spec,
java.io.OutputStream outputStream,
boolean autoGunzip)
This convenience method does not support retrying downloads that failed with transient network problems. |
void |
downloadFileToStream(DownloadSpec spec,
java.io.OutputStream outputStream,
boolean autoGunzip,
EventSource eventSource,
TaskMonitor taskMonitor)
This convenience method does not support retrying downloads that failed with transient network problems. |
void |
downloadFileToStreams(DownloadSpec spec,
DownloadOutput[] outputs,
EventSource eventSource,
TaskMonitor taskMonitor)
Download the file described by spec to the destination stream or streams. |
java.io.File |
downloadFileToTempLocation(DownloadSpec spec,
java.lang.String fileName)
Downloads a file to a temporary location (created by the method), gunzipping if necessary. |
java.lang.String |
downloadItems(Item[] items,
java.lang.String serverRoot,
java.lang.String localRoot)
Downloads a collection of Item s to a temporary location
preserving the server path structure. |
void |
executeUploadRequest(PostMethod method)
Executes a file upload. |
void |
finishUploadRequest(PostMethod method)
Finishes a file upload. |
Changeset |
getChangeset(int changesetID)
Gets Changeset information including individual change
information, excluding download information. |
Changeset |
getChangeset(int changesetID,
boolean includeChanges,
boolean includeDownloadInfo,
java.lang.String[] changesetPropertyFilters,
java.lang.String[] itemPropertyFilters)
Gets the Changeset object that describes the given changeset ID. |
Change[] |
getChangesForChangeset(int changesetID,
boolean includeDownloadInfo,
int pageSize,
ItemSpec lastItem,
java.lang.String[] itemPropertyFilters,
boolean includeMergeSourceInfo)
Gets the changes within a changeset Allows the caller to page changes back from the server. |
PolicyDefinition[] |
getCheckinPoliciesForServerPaths(java.lang.String[] serverPaths)
Gets the checkin policies defined for the given server paths, which must be team projects. |
TFSTeamProjectCollection |
getConnection()
|
java.lang.String[] |
getDefaultItemPropertyFilters()
Gets the list of item property filters automatically appended to the specified filters in methods that send item property filters to the server. |
protected java.net.URI |
getDownloadURI()
|
VersionControlEventEngine |
getEventEngine()
|
ExtendedItem[][] |
getExtendedItems(ItemSpec[] itemSpecs,
DeletedState deletedState,
ItemType itemType)
|
ExtendedItem[][] |
getExtendedItems(ItemSpec[] itemSpecs,
DeletedState deletedState,
ItemType itemType,
GetItemsOptions options)
|
ExtendedItem[] |
getExtendedItems(java.lang.String itemPath,
DeletedState deletedState,
ItemType itemType)
|
ExtendedItem[][] |
getExtendedItems(java.lang.String workspaceName,
java.lang.String workspaceOwner,
ItemSpec[] itemSpecs,
DeletedState deletedState,
ItemType itemType,
GetItemsOptions options)
|
ExtendedItem[][] |
getExtendedItems(java.lang.String workspaceName,
java.lang.String workspaceOwner,
ItemSpec[] itemSpecs,
DeletedState deletedState,
ItemType itemType,
GetItemsOptions options,
java.lang.String[] itemPropertyFilters)
Gets extended information about items, with full results control. |
FileType[] |
getFileTypes()
|
Item |
getItem(int itemID,
int changesetNumber)
|
Item |
getItem(int itemID,
int changesetNumber,
boolean includeDownloadInfo)
|
Item |
getItem(int itemID,
int changesetNumber,
GetItemsOptions options)
|
Item |
getItem(java.lang.String path)
|
Item |
getItem(java.lang.String path,
VersionSpec version)
|
Item |
getItem(java.lang.String path,
VersionSpec version,
DeletedState deletedState)
|
Item |
getItem(java.lang.String path,
VersionSpec version,
DeletedState deletedState,
boolean includeDownloadInfo)
|
Item |
getItem(java.lang.String path,
VersionSpec version,
DeletedState deletedState,
GetItemsOptions options)
Gets information about one item. |
Item |
getItem(java.lang.String path,
VersionSpec version,
int deletionID)
|
Item |
getItem(java.lang.String path,
VersionSpec version,
int deletionID,
boolean includeDownloadInfo)
|
Item |
getItem(java.lang.String path,
VersionSpec version,
int deletionID,
GetItemsOptions options)
|
Item[] |
getItems(int[] itemIDs,
int changesetNumber)
|
Item[] |
getItems(int[] itemIDs,
int changesetNumber,
boolean includeDownloadInfo)
|
Item[] |
getItems(int[] itemIDs,
int changesetNumber,
GetItemsOptions options)
|
ItemSet[] |
getItems(ItemSpec[] itemSpecs,
VersionSpec version,
DeletedState deletedState,
ItemType itemType)
|
ItemSet[] |
getItems(ItemSpec[] itemSpecs,
VersionSpec version,
DeletedState deletedState,
ItemType itemType,
boolean includeDownloadInfo)
|
ItemSet[] |
getItems(ItemSpec[] itemSpecs,
VersionSpec version,
DeletedState deletedState,
ItemType itemType,
GetItemsOptions options)
|
ItemSet[] |
getItems(ItemSpec[] itemSpecs,
VersionSpec version,
DeletedState deletedState,
ItemType itemType,
GetItemsOptions options,
java.lang.String[] itemPropertyFilters)
Gets information about multiple items. |
ItemSet |
getItems(ItemSpec itemSpec,
VersionSpec version,
DeletedState deletedState,
ItemType itemType,
boolean includeDownloadInfo)
|
ItemSet |
getItems(ItemSpec itemSpec,
VersionSpec version,
DeletedState deletedState,
ItemType itemType,
GetItemsOptions options)
|
ItemSet |
getItems(java.lang.String path)
|
ItemSet |
getItems(java.lang.String path,
RecursionType recursion)
|
ItemSet |
getItems(java.lang.String path,
VersionSpec version,
RecursionType recursion)
|
ItemSet |
getItems(java.lang.String path,
VersionSpec version,
RecursionType recursion,
DeletedState deletedState,
ItemType itemType)
|
ItemSet |
getItems(java.lang.String path,
VersionSpec version,
RecursionType recursion,
DeletedState deletedState,
ItemType itemType,
boolean includeDownloadInfo)
|
int |
getLatestChangesetID()
Gets the latest changeset ID from the server. |
Workspace |
getLocalWorkspace(java.lang.String localPath,
boolean throwIfNotFound)
Gets the workspace containing a mapping for the given path. |
Workspace |
getLocalWorkspace(java.lang.String workspaceName,
java.lang.String workspaceOwner)
Look up the local workspace for the specified repository, workspaceName and workspaceOwner combo. |
int |
getMaxServerPathLength()
|
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. |
PathWatcherFactory |
getPathWatcherFactory()
Gets the factory used to construct PathWatcher s for local
workspaces. |
Workspace |
getRepositoryWorkspace(java.lang.String workspaceName,
java.lang.String workspaceOwner)
Retrieve the specified workspace directly from the repository server. |
Workspace[] |
getRepositoryWorkspaces(java.lang.String workspaceName,
java.lang.String workspaceOwner,
java.lang.String computer)
Get a list of matching workspaces. |
Workspace[] |
getRepositoryWorkspaces(java.lang.String workspaceName,
java.lang.String workspaceOwner,
java.lang.String computer,
WorkspacePermissions permissionsFilter)
Get a list of matching workspaces. |
com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.RuntimeWorkspaceCache |
getRuntimeWorkspaceCache()
This method is for internal use only. |
com.microsoft.tfs.util.GUID |
getServerGUID()
|
ServerSettings |
getServerSettingsWithFallback(java.util.concurrent.atomic.AtomicBoolean fallbackUsed)
Gets ServerSettings from the Server if available If not, it will
return a settings object with appropriate defaults. |
SupportedFeatures |
getServerSupportedFeatures()
Gets the SupportedFeatures for the server this
VersionControlClient is connected to. |
WebServiceLevel |
getServiceLevel()
|
com.microsoft.tfs.core.clients.versioncontrol.internal.concurrent.BoundedExecutor |
getUploadDownloadWorkerExecutor()
|
protected java.net.URI |
getUploadURI()
|
com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer |
getWebServiceLayer()
|
Workspace |
getWorkspace(java.lang.String localPath)
Retrieve the workspace that is mapped to the provided local path. |
Workspace |
getWorkspace(java.lang.String workspaceName,
java.lang.String workspaceOwner)
Retrieve a workspace from the name and owner in the specified WorkspaceInfo . |
Workspace |
getWorkspace(WorkspaceInfo workspaceInfo)
Retrieve a workspace from the name and owner in the specified WorkspaceInfo . |
SecurityNamespace |
getWorkspaceSecurity()
|
boolean |
isAuthorizedUser(java.lang.String name)
|
java.lang.String[] |
mergeWithDefaultItemPropertyFilters(java.lang.String[] filters)
Merges the specified filters with the default item property filters configured on this VersionControlClient . |
Annotation[] |
queryAnnotation(java.lang.String annotationName,
java.lang.String annotatedServerItem,
int version)
Gets the value associated with the given annotation name for the given item at the given version. |
BranchObject[] |
queryBranchObjects(ItemIdentifier rootItem,
RecursionType recursion)
Gets the branch objects inside the given root item with the given recursion. |
FileType |
queryCachedFileType(java.lang.String extension)
|
java.util.SortedSet<CheckinNoteFieldDefinition> |
queryCheckinNoteFieldDefinitionsForServerPaths(java.lang.String[] serverPaths)
For the passed array of server paths, work out the list of Team Projects associated with those items then query the server for the Checkin Note Field Definitions for those projects. |
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. |
ItemIdentifier[] |
queryMergeRelationships(java.lang.String serverItem)
Returns all items which have a merge relationship to the provided item. |
ChangesetMerge[] |
queryMerges(java.lang.String sourceItem,
VersionSpec sourceVersion,
java.lang.String targetItem,
VersionSpec targetVersion,
VersionSpec versionFrom,
VersionSpec versionTo,
RecursionType recursion)
Gets information about merges performed on the given target item (and version), optionally qualified by a source item (which can be null). |
ExtendedMerge[] |
queryMergesExtended(ItemSpec targetItemSpec,
VersionSpec targetVersionSpec,
VersionSpec versionFrom,
VersionSpec versionTo,
QueryMergesExtendedOptions options)
Gets source changes for a given ItemSpec in a specific version
range. |
ChangesetMergeDetails |
queryMergesWithDetails(java.lang.String sourceItem,
VersionSpec sourceVersion,
int sourceDeletionID,
java.lang.String targetItem,
VersionSpec targetVersion,
int targetDeletionID,
VersionSpec versionFrom,
VersionSpec versionTo,
RecursionType recursion)
Gets detailed information about merges performed on the given target item (and version), optionally qualified by a source item (which can be null). |
PendingSet[] |
queryPendingSets(ItemSpec[] itemSpecs,
boolean includeDownloadInfo,
java.lang.String queryWorkspaceName,
java.lang.String queryWorkspaceOwner)
|
PendingSet[] |
queryPendingSets(ItemSpec[] itemSpecs,
boolean includeDownloadInfo,
java.lang.String queryWorkspaceName,
java.lang.String queryWorkspaceOwner,
boolean includeCandidates)
|
PendingSet[] |
queryPendingSets(ItemSpec[] itemSpecs,
boolean includeDownloadInfo,
java.lang.String queryWorkspaceName,
java.lang.String queryWorkspaceOwner,
boolean includeCandidates,
java.lang.String[] itemPropertyFilters)
Get pending changes for the given item specs, even from another user's workspace. |
PendingSet[] |
queryPendingSets(java.lang.String[] serverOrLocalPaths,
RecursionType recursionType,
boolean includeDownloadInfo,
java.lang.String queryWorkspaceName,
java.lang.String queryWorkspaceOwner)
|
PendingSet[] |
queryPendingSets(java.lang.String[] serverOrLocalPaths,
RecursionType recursionType,
boolean includeDownloadInfo,
java.lang.String queryWorkspaceName,
java.lang.String queryWorkspaceOwner,
java.lang.String[] itemPropertyFilters)
Get pending changes for the given item paths, even from another user's workspace. |
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)
Gets the shelved changes for the given item specs. |
PendingSet[] |
queryShelvedChanges(java.lang.String workspaceName,
java.lang.String workspaceOwner,
java.lang.String shelvesetName,
java.lang.String shelvesetOwner,
ItemSpec[] itemSpecs,
boolean includeDownloadInfo,
java.lang.String[] itemPropertyFilters)
Gets the shelved changes for the given item specs. |
Shelveset[] |
queryShelvesets(java.lang.String shelvesetName,
java.lang.String shelvesetOwner,
java.lang.String[] itemPropertyFilters)
Queries the server for the set of matching shelvesets. |
Workspace |
queryWorkspace(java.lang.String name,
java.lang.String owner)
Returns the workspace on the server that matches the given parameters. |
Workspace[] |
queryWorkspaces(java.lang.String name,
java.lang.String owner,
java.lang.String computer)
Always queries the server immediately; does not check the local workspace cache. |
Workspace[] |
queryWorkspaces(java.lang.String workspaceName,
java.lang.String workspaceOwner,
java.lang.String computer,
WorkspacePermissions permissionsFilter)
Returns all workspaces on the server that match the given parameters. |
void |
recordDownloadProxyFailure()
Called to record that the download proxy has failed. |
void |
refreshServerGUID()
Called by Workstation when refreshing the workspace cache file. |
WorkspaceInfo |
removeCachedWorkspace(java.lang.String workspaceName,
java.lang.String workspaceOwner)
Removes a cached workspace that matches the given name and owner and this client's server's GUID from the Workstation 's cache. |
void |
reportFailures(Workspace workspace,
Failure[] failures)
Report failures from the server to the user. |
void |
resolveConflicts(Workspace workspace,
Conflict[] conflicts,
java.lang.String[] itemPropertyFilters,
ResolveErrorOptions errorOptions,
java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
|
void |
resolveLocalConflicts(Workspace workspace,
Conflict[] conflicts,
ResolveErrorOptions errorOptions)
Resolve local file conflicts. |
java.lang.String |
resolveUserDisplayName(java.lang.String user)
Resolve the specified user name to an actual, fully qualified user name. |
java.lang.String |
resolveUserUniqueName(java.lang.String user)
Resolve the specified user name to an actual, fully qualified unique user name. |
void |
setCheckinPolicies(java.lang.String teamProjectPath,
PolicyDefinition[] definitions)
Sets the checkin policies for the given team project path. |
void |
setDefaultItemPropertyFilters(java.lang.String[] filters)
Sets the list of item property filters automatically appended to the specified filters in methods that send item property filters to the server. |
void |
setExclusiveCheckout(java.lang.String serverPath,
boolean exclusiveCheckout)
Set the exclusive checkout property on a project. |
void |
setPathWatcherFactory(PathWatcherFactory pathWatcherFactory)
Sets the factory used to construct PathWatcher s for local
workspaces. |
boolean |
testItemExists(java.lang.String path)
|
boolean |
testItemExists(java.lang.String path,
VersionSpec version)
|
boolean |
testItemExists(java.lang.String path,
VersionSpec version,
DeletedState deletedState)
Tests whether an item exists in the repository at the given version. |
Workspace |
tryGetWorkspace(java.lang.String localPath)
This is the same as GetWorkspace() except that it returns null rather than throwing ItemNotMappedException if the path is not in any known local workspace. |
LabelResult[] |
unlabelItem(java.lang.String label,
java.lang.String scope,
ItemSpec[] items,
VersionSpec version)
Removes a label that was applied to an item. |
void |
updateBranchObject(BranchProperties branchProperties,
boolean updateExisting)
|
void |
updateChangeset(Changeset changeset)
Updates a changeset's information with the comment and check-in notes in the given Changeset . |
void |
updateUserName()
Asks the server to update the authenticated user's display name. |
void |
updateWorkspace(Workspace workspace,
java.lang.String newName,
java.lang.String newOwner,
java.lang.String newComment,
WorkingFolder[] newMappings,
java.lang.String newComputer)
Update a workspace. |
void |
updateWorkspace(Workspace workspace,
java.lang.String newName,
java.lang.String newOwner,
java.lang.String newComment,
WorkingFolder[] newMappings,
java.lang.String newComputer,
WorkspacePermissionProfile newPermissionProfile)
Update a workspace. |
void |
updateWorkspace(Workspace workspace,
java.lang.String newName,
java.lang.String newOwner,
java.lang.String newComment,
WorkingFolder[] newMappings,
java.lang.String newComputer,
WorkspacePermissionProfile newPermissionProfile,
boolean removeUnparentedCloaks,
WorkspaceOptions newOptions,
WorkspaceLocation newLocation)
Update a workspace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final com.microsoft.tfs.util.GUID WORKSPACE_SECURITY_NAMESPACE_ID
Constructor Detail |
---|
protected VersionControlClient(TFSTeamProjectCollection connection, ms.tfs.versioncontrol.clientservices._03._RepositorySoap webService, ms.tfs.versioncontrol.clientservices._03._RepositoryExtensionsSoap webServiceExtensions, ms.tfs.versioncontrol.clientservices._03._Repository4Soap repository4, ms.tfs.versioncontrol.clientservices._03._Repository5Soap repository5, int maximumGetEngineWorkerThreads, int getEngineWorkerThreadIdleTimeoutSeconds)
Creates a VersionControlClient
that will use the given web
service proxy class and the given connection. The size of the download
worker thread pool and the thread idle timeouts can also be specified.
Generally you do not instantiate this class yourself. See
TFSConnection.getClient(Class)
.
connection
- the connection to use (must not be null
)webService
- the _RepositorySoap
web service proxy to use (must not be
null
)webServiceExtensions
- the _RepositoryExtensionsSoap
proxy to use for TFS 2010
features (may be null)repository4
- the _Repository4Soap
proxy to use for TFS 2012 features
(may be null)repository5
- the _Repository5Soap
proxy to use for TFS 2012 QU1
features (may be null)maximumGetEngineWorkerThreads
- the maximum number of simultaneous worker threads started to
process get operations. This controls the maximum number of
threads that could be performing a file download in parallel,
though these worker threads perform non-network work that may
prevent the workers reaching maximum theoretical network
parallelism. Must be > 0.getEngineWorkerThreadIdleTimeoutSeconds
- the number of seconds of consecutive idle time after which a get
engine worker thread stops running. Choose a number that provides
for some thread re-use between calls that process get operations
(so threads can be reused from previous operations). Choosing a
very large number will result in idle threads hanging around long
after their last get operation, possibly consuming resources when
it is unlikely there will be any get-related work for them to
perform in the near future. Must be >= 0.public VersionControlClient(TFSTeamProjectCollection connection, ms.tfs.versioncontrol.clientservices._03._RepositorySoap repository, ms.tfs.versioncontrol.clientservices._03._RepositoryExtensionsSoap repositoryExtensions, ms.tfs.versioncontrol.clientservices._03._Repository4Soap repository4, ms.tfs.versioncontrol.clientservices._03._Repository5Soap repository5)
VersionControlClient
that will use the given web
service proxy class and the given connection. This client will use the
default download worker thread pool size and timeout.
Generally you do not instantiate this class yourself. See
TFSConnection.getClient(Class)
.
connection
- the connection to use (must not be null
)repository
- the _RepositorySoap
web service proxy to use (must not be
null
)repositoryExtensions
- the _RepositoryExtensionsSoap
proxy to use for TFS 2010
features (may be null)repository4
- the _Repository4Soap
proxy to use for TFS 2012 features
(may be null)Method Detail |
---|
public void close()
close
in interface com.microsoft.tfs.util.Closable
public com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer getWebServiceLayer()
null
)public com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.RuntimeWorkspaceCache getRuntimeWorkspaceCache()
RuntimeWorkspaceCache
(never null
)public PathWatcherFactory getPathWatcherFactory()
PathWatcher
s for local
workspaces.
public void setPathWatcherFactory(PathWatcherFactory pathWatcherFactory)
PathWatcher
s for local
workspaces.
public java.lang.String[] getDefaultItemPropertyFilters()
null
)public void setDefaultItemPropertyFilters(java.lang.String[] filters)
filters
- the default item property filters (may be null
or
empty)public WebServiceLevel getServiceLevel()
null
)public VersionControlEventEngine getEventEngine()
public final com.microsoft.tfs.util.GUID getServerGUID()
public void refreshServerGUID()
public com.microsoft.tfs.core.clients.versioncontrol.internal.concurrent.BoundedExecutor getUploadDownloadWorkerExecutor()
BoundedExecutor
that throttles access to the worker
process pool for uploads and downloads.public Workspace getLocalWorkspace(java.lang.String localPath, boolean throwIfNotFound) throws ItemNotMappedException
ItemNotMappedException
if there is no mapping or it's not mapped
for this server.
localPath
- a local path (must not be null
or empty)throwIfNotFound
- if true
, this method throws
ItemNotMappedException
if the path is not mapped;
otherwise, returns null
null
if throwIfNotFound is false and no matching
workspace was found
ItemNotMappedException
- if the path is not mapped to any local workspacepublic Workspace getLocalWorkspace(java.lang.String workspaceName, java.lang.String workspaceOwner)
public Workspace getRepositoryWorkspace(java.lang.String workspaceName, java.lang.String workspaceOwner) throws WorkspaceNotFoundException
workspaceName
- the workspace name (must not be null
or empty)workspaceOwner
- (must not be null
or empty)
WorkspaceNotFoundException
- if the workspace could not be foundpublic Workspace[] getRepositoryWorkspaces(java.lang.String workspaceName, java.lang.String workspaceOwner, java.lang.String computer)
workspaceName
- the name of the workspaces (null
matches any)workspaceOwner
- the owner name of the workspaces (null
matches any)computer
- the computer the workspaces are on (null
matches any)
public Workspace[] getRepositoryWorkspaces(java.lang.String workspaceName, java.lang.String workspaceOwner, java.lang.String computer, WorkspacePermissions permissionsFilter)
workspaceName
- the name of the workspaces (null
matches any)workspaceOwner
- the owner name of the workspaces (null
matches any)computer
- the computer the workspaces are on (null
matches any)permissionsFilter
- WorkspacePermissions
to use for filtering by the
AuthorizedUsers's permissions. Supply
WorkspacePermissions.NONE_OR_NOT_SUPPORTED
to not use
permission filtering.
public Workspace createWorkspace(WorkingFolder[] workingFolders, java.lang.String workspaceName, java.lang.String comment, WorkspaceLocation location, WorkspaceOptions 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.
workingFolders
- the initial working folder mappings for this workspace. May be
null, which means no working folders mapped.workspaceName
- the name of the new workspace (must not be null
)comment
- an optional comment to be stored with this workspace (may be
null).location
- where the workspace data is stored (if null
, the
server's default is used)options
- options to use on the newly created workspace (if
null
, the default options are used)
public Workspace createWorkspace(WorkingFolder[] workingFolders, java.lang.String workspaceName, java.lang.String comment, WorkspaceLocation location, WorkspaceOptions options, WorkspacePermissionProfile permissionProfile)
public Workspace createWorkspace(WorkingFolder[] workingFolders, java.lang.String workspaceName, java.lang.String owner, java.lang.String ownerDisplayName, java.lang.String comment, WorkspaceLocation location, WorkspaceOptions 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.
workingFolders
- the initial working folder mappings for this workspace. May be
null, which means no working folders mapped.workspaceName
- the name of the new workspace (must not be null
)owner
- the name of the workspace owner (if null
, empty, or
VersionControlConstants.AUTHENTICATED_USER
the currently
authorized user's name is used)ownerDisplayName
- the display name of the workspace owner (if null
,
empty, or VersionControlConstants.AUTHENTICATED_USER
the
currently authorized user's display name is used)comment
- an optional comment to be stored with this workspace (may be
null).location
- where the workspace data is stored (if null
, the
server's default is used)options
- options to use on the newly created workspace (if
null
, the default options are used)
public Workspace createWorkspace(WorkingFolder[] workingFolders, java.lang.String workspaceName, java.lang.String owner, java.lang.String ownerDisplayName, java.lang.String comment, WorkspaceLocation location, WorkspaceOptions options, WorkspacePermissionProfile permissionProfile)
public void updateWorkspace(Workspace workspace, java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, WorkingFolder[] newMappings, java.lang.String newComputer)
workspace
- the workspace to update; after this method completes, the object
will match server's properties for this workspace (must not be
null
)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 valuenewComputer
- the new computer or null
to keep the existing valuepublic void updateWorkspace(Workspace workspace, java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, WorkingFolder[] newMappings, java.lang.String newComputer, WorkspacePermissionProfile newPermissionProfile)
workspace
- the workspace to update; after this method completes, the object
will match server's properties for this workspace (must not be
null
)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 valuenewComputer
- the new computer or null
to keep the existing valuenewPermissionProfile
- the new permissions or null
to keep the existing
valuepublic void updateWorkspace(Workspace workspace, java.lang.String newName, java.lang.String newOwner, java.lang.String newComment, WorkingFolder[] newMappings, java.lang.String newComputer, WorkspacePermissionProfile newPermissionProfile, boolean removeUnparentedCloaks, WorkspaceOptions newOptions, WorkspaceLocation newLocation)
workspace
- the workspace to update; after this method completes, the object
will match server's properties for this workspace (must not be
null
)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 valuenewComputer
- the new computer or null
to keep the existing valuenewPermissionProfile
- the new permissions or null
to keep the existing
valueremoveUnparentedCloaks
- When true, will strip from the mappings any cloaks not parented by
a mapping (default is false
when other overloads are
used)newOptions
- the new workspace options or null
to keep the
existing valuenewLocation
- the new workspace location or null
to keep the
existing valuepublic void deleteWorkspace(Workspace workspace)
This method is an core event origination point. The
EventSource
object that accompanies each event fired by this
method describes the execution context (current thread, etc.) when and
where this method was invoked.
workspace
- the workspace to delete.public Workspace getWorkspace(java.lang.String localPath) throws ItemNotMappedException
localPath
- A local path for which a workspace is desired (must not be
null
)
ItemNotMappedException
- if the path is not mapped to any local workspacepublic Workspace tryGetWorkspace(java.lang.String localPath)
localPath
- A local path for which a workspace is desired (must not be
null
)
public Workspace getWorkspace(WorkspaceInfo workspaceInfo) throws WorkspaceNotFoundException
WorkspaceInfo
. The workspace does not need to be on the current
computer. The local cache is consulted first, and if it does not contain
a matching workspace, the server is queried. If the workspace cannot be
found, the method throws.
workspaceInfo
- workspace information object (must not be null
)
WorkspaceNotFoundException
- if no matching workspace was foundpublic Workspace getWorkspace(java.lang.String workspaceName, java.lang.String workspaceOwner) throws WorkspaceNotFoundException
WorkspaceInfo
. The workspace does not need to be on the current
computer. The local cache is consulted first, and if it does not contain
a matching workspace, the server is queried. If the workspace cannot be
found, the method throws.
workspaceName
- The name of the workspace (must not be null
)workspaceOwner
- The owner of the workspace (must not be null
)
WorkspaceNotFoundException
- if no matching workspace was foundpublic Workspace queryWorkspace(java.lang.String name, java.lang.String owner)
Unlike queryWorkspaces(String, String, String)
, this method does
not update the local workspace cache when workspaces are queried, because
the workspace's computer is unknown (and the computer must be know to
update the cache).
name
- the workspace name to match, null to match all.owner
- the owner name to match, null to match all. Use
VersionControlConstants.AUTHENTICATED_USER
to retrieve
workspaces owned by the currently logged in user.
public Workspace[] queryWorkspaces(java.lang.String name, java.lang.String owner, java.lang.String computer)
queryWorkspaces(String, String, String, WorkspacePermissions)
public Workspace[] queryWorkspaces(java.lang.String workspaceName, java.lang.String workspaceOwner, java.lang.String computer, WorkspacePermissions permissionsFilter)
workspaceName
- the workspace name to match, null to match all.workspaceOwner
- the owner name to match, null to match all. Use
VersionControlConstants.AUTHENTICATED_USER
to retrieve
workspaces owned by the currently logged in user.computer
- the computer name to match, null to match all. Use
LocalHost.getShortName() to match workspaces for this computer.permissions
- find only workspaces matching the given permissions (must not be
null
) Use
WorkspacePermissions.NONE_OR_NOT_SUPPORTED
to find all
workspaces.
public Shelveset[] queryShelvesets(java.lang.String shelvesetName, java.lang.String shelvesetOwner, java.lang.String[] itemPropertyFilters)
shelvesetName
- the name of the desired shelvesets; null to match all.shelvesetOwner
- the owner of the desired shelvesets; null to match all.itemPropertyFilters
- the list of properties to be returned on the shelvesets. To get
all properties pass a single filter that is simply "*" (may be
null
)
public void deleteShelveset(java.lang.String name, java.lang.String owner)
name
- the name of the shelveset to delete (must not be null
or empty).owner
- the owner of the shelveset to delete (must not be
null
or empty).public void reportFailures(Workspace workspace, Failure[] failures)
workspace
- the workspace where these failures occurred (must not be
null
)failures
- the failure array returned from the server (if null, this method
does nothing)public void recordDownloadProxyFailure()
protected java.net.URI getDownloadURI()
protected java.net.URI getUploadURI()
public void downloadFile(DownloadSpec spec, java.io.File destinationFile, boolean autoGunzip) throws CanceledException
downloadFile(spec, destinationFile, autoGunzip, null, null)
CanceledException
public void downloadFile(DownloadSpec spec, java.io.File destinationFile, boolean autoGunzip, EventSource eventSource, TaskMonitor taskMonitor) throws CanceledException
If a download proxy is configured and enabled, and an error is
encountered download the file, the VersionControlClient
is
configured to bypass the download proxy for the rest of its lifetime and
the download is retried one time directly from the TFS application
server.
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.
spec
- the spec that describes the file to download (must not be
null
)destinationFile
- the local file that will receive the contents of the downloaded
file (must not be null
or empty). This file will be
created if it does not exist, otherwise it will be overwritten.autoGunzip
- if true, the content downloaded is automatically decompressed via
gzip if its Content-Type is application/gzip before being written
to disk (almost all users of this class want this behavior). If
false, the file is written directly to disk without being
uncompressed.eventSource
- a custom EventSource
or null
to use
EventSource.newFromHere()
taskMonitor
- a custom TaskMonitor
or null
to use the
monitor from the TaskMonitorService
CanceledException
- if the download was canceled by the user via the
TaskMonitor
. This method tries to delete the
destinationFile after cancelation but this may fail (and these
errors are logged but not rethrown).public java.io.File downloadFileToTempLocation(DownloadSpec spec, java.lang.String fileName) throws CanceledException
Has the same transient network problem retry behavior as
downloadFile(DownloadSpec, File, boolean)
.
spec
- the spec that describes the file to download (must not be
null
)fileName
- the file name (not full path) to give the file locally, once it is
downloaded (must not be null
or empty)
FileAttachmentDownloadException
where the file's data
was written.
CanceledException
- if the operation was canceled via the default TaskMonitor
public void downloadFileToStream(DownloadSpec spec, java.io.OutputStream outputStream, boolean autoGunzip) throws CanceledException
downloadFileToStreams(DownloadSpec, DownloadOutput[], EventSource, TaskMonitor)
with a DownloadOutput
that supports stream reset if you need
retries.
downloadFileToStream(spec, outputStream, autoGunzip, null, null)
CanceledException
public void downloadFileToStream(DownloadSpec spec, java.io.OutputStream outputStream, boolean autoGunzip, EventSource eventSource, TaskMonitor taskMonitor) throws CanceledException
downloadFileToStreams(DownloadSpec, DownloadOutput[], EventSource, TaskMonitor)
with a DownloadOutput
that supports stream reset if you need
retries.
downloadFileToStreams(spec, new DownloadOutput[] { new OutputStreamDownloadOutput(outputStream, autoGunzip) }, eventSource, taskMonitor)
CanceledException
public void downloadFileToStreams(DownloadSpec spec, DownloadOutput[] outputs, EventSource eventSource, TaskMonitor taskMonitor) throws CanceledException
This method can only recover from transient network problems (TCP socket
resets) if all DownloadOutput
s support stream reset. Download
proxy connect errors do not require output stream reset because not data
will have been written to them yet.
The output streams are always left open (they may have been reset, but no effort is made to finally close them), even when an exception is thrown.
spec
- the spec that describes the file to download (must not be
null
)outputs
- the outputs where the downloaded data will be written (must not be
null
or empty)eventSource
- a custom EventSource
or null
to use
EventSource.newFromHere()
taskMonitor
- a custom TaskMonitor
or null
to use the
monitor from the TaskMonitorService
CanceledException
- if the download was cancelled by the user via core's
TaskMonitor
. The output streams may have had some data
written to them.public java.lang.String downloadItems(Item[] items, java.lang.String serverRoot, java.lang.String localRoot) throws CanceledException
Item
s to a temporary location
preserving the server path structure. The local download location is
specified by the localRoot parameter, which can be null (a temporary
location is chosen by the method in this case).
Item
s that are files must have a non-null download URL. Folder
Item
s will be created on disk even if empty.
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 set of items to download (must not be null
)serverRoot
- the server path shared by all items (must not be null
or empty).localRoot
- the local path where the downloaded items will be placed. If null,
a temporary path is chosen by the method.
CanceledException
- if this operation is canceled by the default TaskMonitor
public PostMethod beginUploadRequest()
NOTE: This method is not synchronized (but is thread-safe) because doing so would allow deadlock during concurrent uploads. When there are more uploader threads than available connections in the HttpClient's pool, a thread may sleep in the HttpClient code (while holding a lock on this object) until a connection becomes available, which can only happen if other threads finish using their connections (which they can't because they need to acquire a lock on this object to do so).
public void executeUploadRequest(PostMethod method) throws java.io.IOException
method
- the object constructed by beginUploadRequest() and configured with
your post data.
java.io.IOException
- if an error occurred opening the connection to the server
VersionControlException
- if an error occurred executing the method (if the status code is
not HttpStatus.SC_OK).public void finishUploadRequest(PostMethod method)
method
- the object constructed by beginUploadRequest().public Changeset getChangeset(int changesetID)
Changeset
information including individual change
information, excluding download information.
public Changeset getChangeset(int changesetID, boolean includeChanges, boolean includeDownloadInfo, java.lang.String[] changesetPropertyFilters, java.lang.String[] itemPropertyFilters)
Changeset
object that describes the given changeset ID.
changesetID
- the ID of the changeset to get information for.includeChanges
- if true
information about the individual changes in
the changeset are returnedincludeDownloadInfo
- if true
the individual change items will have
download URLschangesetPropertyFilters
- a list of properties to return with the changeset (may be
null
)itemPropertyFilters
- a list of properties to return on the items in the changeset (may
be null
)
Changeset
that describes the changeset information.public Change[] getChangesForChangeset(int changesetID, boolean includeDownloadInfo, int pageSize, ItemSpec lastItem, java.lang.String[] itemPropertyFilters, boolean includeMergeSourceInfo)
changesetID
- the changeset for which to get changesincludeDownloadInfo
- 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.pageSize
- the number of items to returnlastItem
- instructs the server to return items which sort after this item.
If null, the server will begin from the start of the changeset.
This parameter should be null in the first call to this method,
and then should be the last seen value on subsequent callsitemPropertyFilters
- a list of versioned item properties to return with each item (may
be null
)includeMergeSourceInfo
- whether to include source information about renames / merges
public Item getItem(int itemID, int changesetNumber)
public Item getItem(int itemID, int changesetNumber, GetItemsOptions options)
public Item getItem(int itemID, int changesetNumber, boolean includeDownloadInfo)
public Item[] getItems(int[] itemIDs, int changesetNumber)
public Item[] getItems(int[] itemIDs, int changesetNumber, boolean includeDownloadInfo)
public Item[] getItems(int[] itemIDs, int changesetNumber, GetItemsOptions options)
public Item getItem(java.lang.String path)
getItem(path, LatestVersionSpec.INSTANCE)
public Item getItem(java.lang.String path, VersionSpec version)
getItem(path, version, 0)
public Item getItem(java.lang.String path, VersionSpec version, DeletedState deletedState)
getItem(path, version, deletedState, false)
public Item getItem(java.lang.String path, VersionSpec version, int deletionID)
getItem(path, version, deletionId, false);
public Item getItem(java.lang.String path, VersionSpec version, DeletedState deletedState, boolean includeDownloadInfo)
getItem(path, version, deletedState, includeDownloadInfo ? GetItemsOptions.DOWNLOAD : GetItemsOptions.NONE)
public Item getItem(java.lang.String path, VersionSpec version, int deletionID, GetItemsOptions options)
getItem(path, version, (deletionID > 0) ? DeletedState.DELETED : DeletedState.NON_DELETED, options)
public Item getItem(java.lang.String path, VersionSpec version, int deletionID, boolean includeDownloadInfo)
getItem(path, version, deletionID, includeDownloadInfo ? GetItemsOptions.DOWNLOAD : GetItemsOptions.NONE)
public Item getItem(java.lang.String path, VersionSpec version, DeletedState deletedState, GetItemsOptions options)
path
- the server or local path of the item to get information for (no
wildcards) (must not be null
or empty)version
- the version of the item to get information about (must not be
null
)options
- flags that control the amount of information returned for the item
Item
describing the given path, never
null
(throws VersionControlException
if the
item was not found)
VersionControlException
- if wildcards were present in the path, or if the item was not
found in the repositorypublic boolean testItemExists(java.lang.String path)
testItemExists(path, LatestVersionSpec.INSTANCE, DeletedState.NON_DELETED)
public boolean testItemExists(java.lang.String path, VersionSpec version)
testItemExists(path, version, DeletedState.NON_DELETED)
public boolean testItemExists(java.lang.String path, VersionSpec version, DeletedState deletedState)
path
- the server or local path to test for existence (must not be
null
or empty)version
- the version of the item to test for (must not be null
)deletedState
- the deleted state of the item to test for (must not be
null
)
VersionControlException
- if the path contained wildcardspublic ItemSet getItems(java.lang.String path)
getItems(path, LatestVersionSpec.INSTANCE, RecursionType.NONE)
public ItemSet getItems(java.lang.String path, RecursionType recursion)
getItems(path, LatestVersionSpec.INSTANCE, recursion)
public ItemSet getItems(java.lang.String path, VersionSpec version, RecursionType recursion)
getItems(path, version, recursion, DeletedState.NON_DELETED, ItemType.ANY, false)
public ItemSet[] getItems(ItemSpec[] itemSpecs, VersionSpec version, DeletedState deletedState, ItemType itemType)
getItems(itemSpecs, version, deletedState, itemType, false)
public ItemSet getItems(ItemSpec itemSpec, VersionSpec version, DeletedState deletedState, ItemType itemType, GetItemsOptions options)
getItems(new ItemSpec[] { itemSpec }, version, deletedState, itemType, options)[0]
public ItemSet getItems(ItemSpec itemSpec, VersionSpec version, DeletedState deletedState, ItemType itemType, boolean includeDownloadInfo)
getItems(new ItemSpec[] { itemSpec }, version, deletedState, itemType, includeDownloadInfo)[0]
public ItemSet[] getItems(ItemSpec[] itemSpecs, VersionSpec version, DeletedState deletedState, ItemType itemType, boolean includeDownloadInfo)
getItems(itemSpecs, version, deletedState, itemType, includeDownloadInfo ? GetItemsOptions.DOWNLOAD : GetItemsOptions.NONE)
public ItemSet getItems(java.lang.String path, VersionSpec version, RecursionType recursion, DeletedState deletedState, ItemType itemType)
getItems(path, version, recursion, deletedState, itemType, false)
public ItemSet getItems(java.lang.String path, VersionSpec version, RecursionType recursion, DeletedState deletedState, ItemType itemType, boolean includeDownloadInfo)
getItems(new ItemSpec(path, recursion), version, deletedState, itemType, includeDownloadInfo)
public ItemSet[] getItems(ItemSpec[] itemSpecs, VersionSpec version, DeletedState deletedState, ItemType itemType, GetItemsOptions options)
getItems(itemSpecs, version, deletedState, itemType, options, null)
public ItemSet[] getItems(ItemSpec[] itemSpecs, VersionSpec version, DeletedState deletedState, ItemType itemType, GetItemsOptions options, java.lang.String[] itemPropertyFilters)
ItemSet
is returned for
each query item.
itemSpecs
- the items to get information about (must not be null
or empty)version
- the version of each of the items to get information about (not
null)deletedState
- the deleted state of items (must not be null
)itemType
- the types of matching items that should be returned (must not be
null
)options
- flags that control the amount of information returned for the itemitemPropertyFilters
- a list of versioned item properties to return with each item (may
be null
)
ItemSet
instances, one for each given
ItemSpec
in the original order. May be empty but never
null.public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType)
getExtendedItems(itemSpecs, deletedState, itemType, GetItemsOptions.NONE)
public ExtendedItem[][] getExtendedItems(ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, GetItemsOptions options)
getExtendedItems(null, null, itemSpecs, deletedState, itemType, options)
public ExtendedItem[] getExtendedItems(java.lang.String itemPath, DeletedState deletedState, ItemType itemType)
getExtendedItems(new ItemSpec[] { new ItemSpec(itemPath, RecursionType.NONE) }, deletedState, itemType, GetItemsOptions.NONE)[0]
public ExtendedItem[][] getExtendedItems(java.lang.String workspaceName, java.lang.String workspaceOwner, ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, GetItemsOptions options)
getExtendedItems(workspaceName, workspaceOwner, itemSpecs, deletedState, itemType, options, null)
public ExtendedItem[][] getExtendedItems(java.lang.String workspaceName, java.lang.String workspaceOwner, ItemSpec[] itemSpecs, DeletedState deletedState, ItemType itemType, GetItemsOptions options, java.lang.String[] itemPropertyFilters)
workspaceName
- the name of the workspace to get extended information for. If the
paths in the itemSpecs are server paths, this parameter is ignored
(may be null). If this parameter is null and the itemSpec paths
are local, the correct local workspace is determined
automatically.workspaceOwner
- the owner of the workspace to get extended information for. If the
paths in the itemSpecs are server paths, this parameter is ignored
(may be null). If this parameter is null and the itemSpec paths
are local, the correct local workspace is determined
automatically.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 versioned item properties to return with each extended
item (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 final java.util.SortedSet<CheckinNoteFieldDefinition> queryCheckinNoteFieldDefinitionsForServerPaths(java.lang.String[] serverPaths)
serverPaths
- Sting array containing paths to server items that the calling
method requires the checkin note field definitions.
public final void setExclusiveCheckout(java.lang.String serverPath, boolean exclusiveCheckout)
serverPath
- server path of project or file in project (must not be
null
or empty).exclusiveCheckout
- flag indicating if force exclusive checkout should be enabled or
disabled.public Annotation[] queryAnnotation(java.lang.String annotationName, java.lang.String annotatedServerItem, int version)
null
)
annotationName
- the name of the annotation to query. If null, annotatedServerItem
must not be null, and all annotations for the given server item
and version are returned.annotatedServerItem
- the server path of the item to query annotations for. If null,
annotationName must not be null, and all annotations for all
server items that match the given annotation name and version will
be returned.version
- the version of the given annotatedServerItem to query annotations
for. If 0, annotations that are not attached to any version of
that item are returned.
public void createAnnotation(java.lang.String annotationName, java.lang.String annotatedServerItem, int version, java.lang.String annotationValue, java.lang.String comment, boolean overwrite)
annotationName
- the name of the annotation to create. If null, annotatedServerItem
must not be null, and an annotation for the given server item and
version is created.annotatedServerItem
- the server path of the item to create an annotation on (must not
be null
) deleted.version
- the version of the given annotatedServerItem to create. If 0, an
annotation that is not attached to any version of that item is
created.annotationValue
- the value to store in the annotation. Can be a very large string
(must not be null
)comment
- an optional comment (may be null).overwrite
- true to overwrite an existing annotation with the same location
information, false to error if one already exists.public void deleteAnnotation(java.lang.String annotationName, java.lang.String annotatedServerItem, int version, java.lang.String annotationValue)
annotationName
- the name of the annotation to delete. If null, annotatedServerItem
must not be null, and all annotations for the given server item
and version are deleted.annotatedServerItem
- the server path of the item to delete annotations on. If null,
annotationName must not be null, and all annotations for all
server items that match the given annotation name and version will
be deleted.version
- the version of the given annotatedServerItem to delete annotations
for. If 0, annotations that are not attached to any version of
that item are deleted.annotationValue
- the value (may be null
)public TFSTeamProjectCollection getConnection()
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
serverOrLocalPath
- the server or local path to the server item being queried for its
history (must not be null
or empty).version
- the version of the item to query history for (history older than
this version will be returned) (must not be null
)deletionID
- the deletion ID for the item, if it is a deleted item (pass 0 if
the item is not deleted).recursion
- whether to query recursively (must not be null
)user
- only include historical changes made by this user (pass null to
retrieve changes made by all users).versionFrom
- the beginning version to query historical changes from (pass null
to start at the first version).versionTo
- the ending version to query historical changes to (pass null to
end at the most recent version).maxCount
- the maximum number of changes to return (pass Integer.MAX_VALUE
for all available values). Must be > 0.includeFileDetails
- true to include individual file change details with the returned
results, false to return only general changeset information.slotMode
- if true, all items that have occupied the given serverPath (during
different times) will have their changes returned. If false, only
the item that matches that path at the given version will have its
changes returned.sortAscending
- when true
gets the top maxCount changes in ascending
order, when false
gets them in descending order
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.
serverOrLocalPath
- the server or local path to the server item being queried for its
history (must not be null
or empty).version
- the version of the item to query history for (history older than
this version will be returned) (must not be null
)deletionID
- the deletion ID for the item, if it is a deleted item (pass 0 if
the item is not deleted).recursion
- whether to query recursively (must not be null
)user
- only include historical changes made by this user (pass null to
retrieve changes made by all users).versionFrom
- the beginning version to query historical changes from (pass null
to start at the first version).versionTo
- the ending version to query historical changes to (pass null to
end at the most recent version).maxCount
- the maximum number of changes to return (pass Integer.MAX_VALUE
for all available values). Must be > 0.includeFileDetails
- true to include individual file change details with the returned
results, false to return only general changeset information.slotMode
- if true, all items that have occupied the given serverPath (during
different times) will have their changes returned. If false, only
the item that matches that path at the given version will have its
changes returned.sortAscending
- when true
gets the top maxCount changes in ascending
order, when false
gets them in descending order
ServerPathFormatException
public int createBranch(java.lang.String sourceServerPath, java.lang.String targetServerPath, VersionSpec version)
Note
This method exists as a fast alternative to the standard method of creating a branch: by pending a branch change, then checking in those changes.
Only server paths are accepted.
This method is only supported by Team Foundation Server 2008 SP1 and later.
sourceServerPath
- the server path to an existing item which will be branched (must
not be null
)targetServerPath
- the server path to the destination where the branch will be made
(not null).version
- the version of the source item to branch into the target item (not
null).
java.lang.UnsupportedOperationException
- if this method is used when connected to a server that does not
support branch creation without pending changes.public int createBranch(java.lang.String sourceServerPath, java.lang.String targetServerPath, VersionSpec version, java.lang.String owner, java.lang.String comment, CheckinNote checkinNote, PolicyOverrideInfo policyOverride, Mapping[] mappings)
Note
This method exists as a fast alternative to the standard method of creating a branch: by pending a branch change, then checking in those changes.
Only server paths are accepted.
This method is only supported by Team Foundation Server 2008 SP1 and later.
sourceServerPath
- the server path to an existing item which will be branched (must
not be null
)targetServerPath
- the server path to the destination where the branch will be made
(not null).version
- the version of the source item to branch into the target item (not
null).owner
- the owner of the changeset that creates the branch (may be null)comment
- the comment for the changeset that creates the branch (may be
null)checkinNote
- the checkin note provided with the changeset that creates the
branch (may be null)policyOverride
- the check-in policy override information for the changeset that
creates the branch (may be null)mappings
- the mappings to use for the branch (may be null)
java.lang.UnsupportedOperationException
- if this method is used when connected to a server that does not
support branch creation without pending changes.public void updateChangeset(Changeset changeset)
Changeset
.
changeset
- the new changeset information, where the changeset ID number
matches an existing changeset (must not be null
)public LabelResult[] createLabel(VersionControlLabel label, LabelItemSpec[] items, LabelChildOption options)
label
- the label to create or update (must not be null
)items
- the items to be included in the label creation or update (not
null).options
- options that affect the processing of the label creation or update
(must not be null
or empty).
public LabelResult[] deleteLabel(java.lang.String label, java.lang.String scope)
label
- the label to delete (must not be null
)scope
- the scope of the label to delete (must not be null
)
public LabelResult[] unlabelItem(java.lang.String label, java.lang.String scope, ItemSpec[] items, VersionSpec version)
label
- the label to remove (must not be null
)scope
- the scope of the label to remove (must not be null
)items
- the items to remove from the label (must not be null
or empty)version
- the version of the items to remove to match (may be
null
)
public VersionControlLabel[] queryLabels(java.lang.String label, java.lang.String scope, java.lang.String owner, boolean includeItemDetails, java.lang.String filterItem, VersionSpec filterItemVersion)
label
- the label name to match (may be null?).scope
- the scope of the label to match (may be null?).owner
- the owner of the label to match (may be null?).includeItemDetails
- if true, details about the labeled items are included in the
results, otherwise only general label information is included.filterItem
- if not null
, only labels containing this item are
returned.filterItemVersion
- if filterItem was supplied, only labels that include this version
of the filterItem are returned, otherwise may be null.
public PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths, RecursionType recursionType, boolean includeDownloadInfo, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner)
queryPendingSets( serverOrLocalPaths, recursionType, includeDownloadInfo, queryWorkspaceName, queryWorkspaceOwner, null)
public PendingSet[] queryPendingSets(java.lang.String[] serverOrLocalPaths, RecursionType recursionType, boolean includeDownloadInfo, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, java.lang.String[] itemPropertyFilters)
serverOrLocalPaths
- the 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 (must not
be null
)queryWorkspaceName
- the name of the workspace to query for pending changes. Pass
null
to match all.queryWorkspaceOwner
- the owner of the workspace to query for pending changes. Pass
null
to match all.itemPropertyFilters
- a list of property names to return on the pending change object if
they exist (may be null
)
null
.public PendingSet[] queryPendingSets(ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner)
queryPendingSets(itemSpecs, includeDownloadInfo, queryWorkspaceName, queryWorkspaceOwner, false)
public PendingSet[] queryPendingSets(ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeCandidates)
queryPendingSets( itemSpecs, includeDownloadInfo, queryWorkspaceName, queryWorkspaceOwner, includeCandidates, null)
public PendingSet[] queryPendingSets(ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.lang.String queryWorkspaceName, java.lang.String queryWorkspaceOwner, boolean includeCandidates, java.lang.String[] itemPropertyFilters)
itemSpecs
- the ItemSpecs to get pending changes for (must not be
null
or empty)queryWorkspaceName
- the name of the workspace to query for pending changes. Pass null
to match all.queryWorkspaceOwner
- the owner of the workspace to query for pending changes. Pass null
to match all.includeCandidates
- if true
for a local workspace, candidate changes will
be populated on the pending set. A pending set will be returned if
the workspace contains pending changes or candidate changesitemPropertyFilters
- a list of property names to return on the pending change object if
they exist (may be null
)
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)
shelvesetName
- the shelveset name (may be null)shelvesetOwner
- the user name (may be null), which is the shelveset owner if the
shelveset name is not null
itemSpecs
- the items to query changes for (null for all).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 PendingSet[] queryShelvedChanges(java.lang.String workspaceName, java.lang.String workspaceOwner, java.lang.String shelvesetName, java.lang.String shelvesetOwner, ItemSpec[] itemSpecs, boolean includeDownloadInfo, java.lang.String[] itemPropertyFilters)
workspaceName
- the name of the workspace to query for (may be null
)workspaceOwner
- the owner of the workspace to query for (may be null
)shelvesetName
- the shelveset name (may be null)shelvesetOwner
- the user name (may be null), which is the shelveset owner if the
shelveset name is not null
itemSpecs
- the items to query changes for (null for all).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 PolicyDefinition[] getCheckinPoliciesForServerPaths(java.lang.String[] serverPaths) throws PolicySerializationException
serverPaths
- the paths to get policy definitions for. If null, an empty array
is returned.
PolicySerializationException
- if an error occurred reading the policy definitions from the
server.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
(must not be null
or empty)targetPath
- the local or server path of the target of the potential merge
(must not be 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
).
null
.public BranchObject[] queryBranchObjects(ItemIdentifier rootItem, RecursionType recursion)
rootItem
- the root item (must not be null
)recursion
- the recursion type (must not be null
)
public void updateBranchObject(BranchProperties branchProperties, boolean updateExisting)
public void deleteBranchObject(ItemIdentifier branch)
branch
- the branch item to delete (must not be null
)public ChangesetMerge[] queryMerges(java.lang.String sourceItem, VersionSpec sourceVersion, java.lang.String targetItem, VersionSpec targetVersion, VersionSpec versionFrom, VersionSpec versionTo, RecursionType recursion)
sourceItem
- the item that is the source of merges to be returned (may be
null
)sourceVersion
- the version of the source item for the merges (may be
null
if sourceItem is null
)targetItem
- the item that is the target of merges to be returned (must not be
null
or empty)targetVersion
- the version of the target item for the merges (must not be
null
)versionFrom
- the oldest version to be included in the results (may be
null
)versionTo
- the most recent version to be included in the results (may be
null
)recursion
- the type of recursion to apply to the given items (must not be
null
)
ChangesetMerge
s returned by the server. May be empty
but never null
.public ChangesetMergeDetails queryMergesWithDetails(java.lang.String sourceItem, VersionSpec sourceVersion, int sourceDeletionID, java.lang.String targetItem, VersionSpec targetVersion, int targetDeletionID, VersionSpec versionFrom, VersionSpec versionTo, RecursionType recursion)
sourceItem
- the item that is the source of merges to be returned (may be null)sourceVersion
- the version of the source item for the merges (may be null if
sourceItem is null)sourceDeletionID
- the deletion ID for the source item, if a specific deletion is
being queried.targetItem
- the item that is the target of merges to be returned (must not be
null
or empty)targetVersion
- the version of the target item for the merges (must not be
null
)targetDeletionID
- the deletion ID for the target item, if a specific deletion is
being queried.versionFrom
- the oldest version to be included in the results (may be null)versionTo
- the most recent version to be included in the results (may be
null)recursion
- the type of recursion to apply to the given items (must not be
null
)
ChangesetMergeDetails
returned by the server.public ExtendedMerge[] queryMergesExtended(ItemSpec targetItemSpec, VersionSpec targetVersionSpec, VersionSpec versionFrom, VersionSpec versionTo, QueryMergesExtendedOptions options)
ItemSpec
in a specific version
range. The result is the set of changes as ExtendedMerge objects, which
contain the source of the merge (item, version, deletionID, and change)
as well as the changeset details. The Changeset
is not a complete
object: only the owner, committer, date, comment, and changesetID are
available. No items, release notes, or other data are available.
targetItemSpec
- the item that is the target of merges to be queried (must not be
null
)targetVersionSpec
- the version of the target item to query at (must not be
null
)versionFrom
- the oldest version to be included in the results (may be null)versionTo
- the most recent version to be included in the results (may be
null)options
- the options to use (must not be null
)
ChangesetMergeDetails
returned by the server.public ItemIdentifier[] queryMergeRelationships(java.lang.String serverItem)
serverItem
- Server Item to query.
ItemIdentifier
objects.public void setCheckinPolicies(java.lang.String teamProjectPath, PolicyDefinition[] definitions)
null
or empty, all policies are removed
(annotation is deleted).
teamProjectPath
- the team project path to set policies for (must not be
null
)definitions
- the policy definitions to set for the path, overwriting any
previously set policy definitions. If null
or empty,
all policies are removed for the team project.public SupportedFeatures getServerSupportedFeatures()
SupportedFeatures
for the server this
VersionControlClient
is connected to. This value is retrieved
from the server the first time this method is called. Subsequent calls to
this method will return the cached value.
null
)public ServerSettings getServerSettingsWithFallback(java.util.concurrent.atomic.AtomicBoolean fallbackUsed)
ServerSettings
from the Server if available If not, it will
return a settings object with appropriate defaults.
fallbackUsed
- Returns true if the default was used due to the server not
supporting this featurepublic int getMaxServerPathLength()
public int getLatestChangesetID()
public Item[] destroy(ItemSpec itemSpec, VersionSpec versionSpec, VersionSpec stopAt, DestroyFlags flags)
ItemSpec
(which must contain a server path and
use full recursion) and an VersionSpec
. The destroyed item is the
item that has the specified server path at the specified version. The
item to be destroyed does not need to be deleted before calling destroy.
If the item is deleted, a deletion ID can be specified in the item spec.
If destroy is successful, the items are immediately destroyed on the server - destroy does not create pending changes like many other version control methods.
The destroy feature is not available in TFS 2005. This method will throw
an exception if this VersionControlClient
is connected to a Team
Foundation server that does not support destroy. Additionally, the
authenticated user must have the AdminProjectRights permission on all
items that will be destroyed.
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.
itemSpec
- identifies the item to destroy (must not be null
and
must contain a server path, not a local path)versionSpec
- identifies the item to destroy (must not be null
)stopAt
- if keeping history, identifies the version including and after
which file contents will be preserved for - defaults to latest
version (must be null
if not passing
DestroyFlags.KEEP_HISTORY
)flags
- the flags for this destroy operation, or DestroyFlags.NONE
for default options
null
)public Item[] destroy(ItemSpec itemSpec, VersionSpec versionSpec, VersionSpec stopAt, DestroyFlags flags, java.util.List<PendingSet> affectedPendingChanges, java.util.List<PendingSet> affectedShelvedChanges)
ItemSpec
(which must contain a server path and
use full recursion) and an VersionSpec
. The destroyed item is the
item that has the specified server path at the specified version. The
item to be destroyed does not need to be deleted before calling destroy.
If the item is deleted, a deletion ID can be specified in the item spec.
If destroy is successful (and DestroyFlags.PREVIEW
was not
specified), the items are immediately destroyed on the server - destroy
does not create pending changes like many other version control methods.
The destroy feature is not available in TFS 2005. This method will throw
an exception if this VersionControlClient
is connected to a Team
Foundation server that does not support destroy. Additionally, the
authenticated user must have the AdminProjectRights permission on all
items that will be destroyed.
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.
itemSpec
- identifies the item to destroy (must not be null
and
must contain a server path, not a local path)versionSpec
- identifies the item to destroy (must not be null
)stopAt
- if keeping history, identifies the version including and after
which file contents will be preserved for - defaults to latest
version (must be null
if not passing
DestroyFlags.KEEP_HISTORY
)flags
- the flags for this destroy operation, or DestroyFlags.NONE
for default optionsaffectedPendingChanges
- a list to be filled with the pending sets affected by the destroy
operation if the DestroyFlags.AFFECTED_CHANGES
flag is
set. May be null
if the list of changes is not
required.affectedShelvedChanges
- a list to be filled with the shelved sets affected by the destroy
operation if the DestroyFlags.AFFECTED_CHANGES
flag is
set. May be null
if the list of changes is not
required.
null
)public void resolveLocalConflicts(Workspace workspace, Conflict[] conflicts, ResolveErrorOptions errorOptions)
public Conflict[] autoResolveValidConflicts(Workspace workspace, Conflict[] conflicts, AutoResolveOptions resolveOptions)
conflicts
- The candidate conflictsresolveOptions
- Resolution options
public void resolveConflicts(Workspace workspace, Conflict[] conflicts, java.lang.String[] itemPropertyFilters, ResolveErrorOptions errorOptions, java.util.concurrent.atomic.AtomicReference<Conflict[]> resolvedConflicts)
public void updateUserName()
public void determineWorkspaceNameAndOwner(ItemSpec itemSpec, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
#determineWorkspaceNameAndOwner(ItemSpec[], AtomicReference,
AtomicReference)
public void determineWorkspaceNameAndOwner(java.lang.String path, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
#determineWorkspaceNameAndOwner(ItemSpec[], AtomicReference,
AtomicReference)
public void determineWorkspaceNameAndOwner(LabelItemSpec[] labelItemSpecs, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
#determineWorkspaceNameAndOwner(ItemSpec[], AtomicReference,
AtomicReference)
public void determineWorkspaceNameAndOwner(SecurityChange[] securityChanges, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
#determineWorkspaceNameAndOwner(ItemSpec[], AtomicReference,
AtomicReference)
public void determineWorkspaceNameAndOwner(java.lang.String[] paths, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
#determineWorkspaceNameAndOwner(ItemSpec[], AtomicReference,
AtomicReference)
public void determineWorkspaceNameAndOwner(ItemSpec[] itemSpecs, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceName, java.util.concurrent.atomic.AtomicReference<java.lang.String> workspaceOwner)
AtomicReference
values are set to null
).
itemSpecs
- the ItemSpec
s to determine name and owner for (if
null
, both AtomicReference
values are
set to null
)workspaceName
- the AtomicReference
to update with the workspace
name (must not be null
)workspaceOwner
- the AtomicReference
to update with the workspace
owner (must not be null
)
OnlyOneWorkspaceException
- if any two paths are in different workspacespublic java.lang.String resolveUserUniqueName(java.lang.String user)
user
- the user name to resolve (if null
, null
is returned)
null
if null
was givenpublic java.lang.String resolveUserDisplayName(java.lang.String user)
user
- the user name to resolve (if null
, null
is returned)
null
if null
was givenpublic boolean isAuthorizedUser(java.lang.String name)
public WorkspaceInfo removeCachedWorkspace(java.lang.String workspaceName, java.lang.String workspaceOwner)
Workstation
's cache. The caller
is responsible for saving the Workstation
cache.
public FileType queryCachedFileType(java.lang.String extension)
public FileType[] getFileTypes()
public java.lang.String[] mergeWithDefaultItemPropertyFilters(java.lang.String[] filters)
VersionControlClient
. Only unique filters are
returned (case insensitive) and order is not preserved.
filters
- some item property filters or null
null
if the specified
filters were null and there are no default filtersgetDefaultItemPropertyFilters()
,
setDefaultItemPropertyFilters(String[])
public SecurityNamespace getWorkspaceSecurity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |