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

java.lang.Object
  extended by com.microsoft.tfs.util.BitField
      extended by com.microsoft.tfs.core.clients.versioncontrol.GetOptions
All Implemented Interfaces:
java.io.Serializable

public final class GetOptions
extends com.microsoft.tfs.util.BitField

Options which control how items are processed during get operations.

See Also:
Serialized Form
Since:
TEE-SDK-10.1

Field Summary
static GetOptions GET_ALL
          Ask the server to send all files, not just ones it thinks are out of date.
static GetOptions NO_AUTO_RESOLVE
           Used only on the client.
static GetOptions NO_DISK_UPDATE
          Perform the get as normal, but do not actually download the files from the server and do not update any data on disk.
static GetOptions NONE
          No get options.
static GetOptions OVERWRITE
          Overwrite local files that happen to be writeable (except files checked out to the user) with the versions from the server.
static GetOptions PREVIEW
          Perform the get as normal, but do not actually download the files from the server and do not update any data on disk.
static GetOptions REMAP
           Updates the database references of the local remapped branch for all items where the content on the local disk is the same as the content you are downloading from the version control branch.
 
Method Summary
 GetOptions combine(GetOptions other)
           
static GetOptions combine(GetOptions[] changeTypes)
           
 boolean contains(GetOptions other)
           
 boolean containsAll(GetOptions other)
           
 boolean containsAny(GetOptions other)
           
 GetOptions remove(GetOptions other)
           
 GetOptions retain(GetOptions other)
           
 
Methods inherited from class com.microsoft.tfs.util.BitField
combine, combineInternal, containsAllInternal, containsAnyInternal, containsInternal, equals, fromStringValues, getCombinedSpecialFlags, hashCode, isEmpty, registerStringValue, registerStringValue, removeInternal, retainInternal, toFullStringValues, toIntFlags, toString, toStringValues
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final GetOptions NONE
No get options.


OVERWRITE

public static final GetOptions OVERWRITE
Overwrite local files that happen to be writeable (except files checked out to the user) with the versions from the server. Normally writeable files that are not checked out are flagged as writeable conflicts.


GET_ALL

public static final GetOptions GET_ALL
Ask the server to send all files, not just ones it thinks are out of date.


PREVIEW

public static final GetOptions PREVIEW
Perform the get as normal, but do not actually download the files from the server and do not update any data on disk. Local version updates are not sent to the server. GetStatus objects are returned to the caller as if all operations were actually processed, and events are fired as if the files were actually downloaded.

The general rule of Preview is that no workspace information on the server and no workspace information on disk is changed during its operation. It is safe to perform gets with Preview enabled without worrying about what state may change.

Some errors that would appear during a non-preview get will not occur when Preview is enabled. For instance, file permissions problems on disk won't be encountered when Preview is enabled and will not be reported.


REMAP

public static final GetOptions REMAP

Updates the database references of the local remapped branch for all items where the content on the local disk is the same as the content you are downloading from the version control branch.

This means that if re-mapping a local folder to a new server path then we only download files that are different between the two paths. If talking to an older TFS instance with this flag then it is ignored and all files will be downloaded.

Since:
TFS 2008 SP1

NO_AUTO_RESOLVE

public static final GetOptions NO_AUTO_RESOLVE

Used only on the client. Instructs the client not to try to auto resolve conflicts

Since:
TFS 2012

NO_DISK_UPDATE

public static final GetOptions NO_DISK_UPDATE
Perform the get as normal, but do not actually download the files from the server and do not update any data on disk. Local version updates are sent to the server. GetStatus objects are returned to the caller as if all operations were actually processed, and events are fired as if the files were actually downloaded.

Unlike PREVIEW, using this option makes changes to TFS workspace information (pending changes and local versions).

This option is useful for clients who must participate in a larger "managed resources" framework, like Eclipse, where it is better to let the framework actually update the disk after the change is pended.

Some errors such as local disk permissions problems won't appear if this option is enabled, and it is the responsibility of the code pending the change to recover (undo the change, synthesize the disk change, etc.).

Warnings:
this is a TEE client specific feature - therefore it should be removed from the flags before options are sent to the server.
Method Detail

combine

public static GetOptions combine(GetOptions[] changeTypes)

containsAll

public boolean containsAll(GetOptions other)

contains

public boolean contains(GetOptions other)

containsAny

public boolean containsAny(GetOptions other)

remove

public GetOptions remove(GetOptions other)

retain

public GetOptions retain(GetOptions other)

combine

public GetOptions combine(GetOptions other)


© 2015 Microsoft. All rights reserved.