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

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

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

Describes the work required to be done by the client to complete a "get".

Since:
TEE-SDK-10.1
Thread-safety:
thread-safe

Field Summary
static java.util.Comparator<GetOperation> GET_OPERATION_COMPARATOR
           
 
Fields inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
webServiceObject
 
Constructor Summary
GetOperation(ms.tfs.versioncontrol.clientservices._03._GetOperation op)
           
GetOperation()
           
 
Method Summary
 void clearLocalItem()
          Called by code during get when multiple operations affect a single local item.
 int compareTo(GetOperation other)
           
 DownloadSpec createDownloadSpec()
          Creates an download spec instance for this operation.
 boolean equals(java.lang.Object o)
           
 byte[] getBaselineFileGUID()
          Byte representation of the guid that is used to locate original file content in the baseline folder.
 ChangeType getChangeType()
          Gets the types of the pending change described by this item.
 ChangeType getConflictingChangeType()
          Gets the type of change that conflicts with this item.
 int getConflictingItemID()
           
 java.lang.String getCurrentLocalItem()
           
 int getDeletionID()
          Gets the deletion ID of the item.
 java.lang.String getDownloadURL()
          Gets the URL at which this item can be downloaded.
 ChangeType getEffectiveChangeType()
           
 int getEncoding()
           
 byte[] getHashValue()
          Gets the hash code for the target item affected by this operation.
 int getItemID()
          Gets the numeric ID of the item affected by this operation.
 ItemType getItemType()
          Gets the type of the item affected by this operation.
 com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLocalItem getLocalVersionEntry()
          Before looping through the GetOperations and calling ProcessOperation on each one, a pass is made to tag GetOperations meeting certain criteria with their local version entries.
 LockLevel getLockLevel()
          Gets the lock status for this operation.
 Conflict getMergeDetails()
           
 int getPendingChangeID()
          Gets the ID of the pending change.
 PropertyValue[] getPropertyValues()
           
 java.lang.String getSourceLocalItem()
          Gets the local item that is the source of this operation, as defined by the web service object.
 java.lang.String getSourceServerItem()
           
 java.lang.String getTargetLocalItem()
          Gets the local item that is the target of this operation.
 java.lang.String getTargetServerItem()
          Gets the server item that is the target of this operation.
 ProcessType getType()
           
 int getVersionLocal()
          Gets the version of the item locally.
 int getVersionServer()
          Gets the version of the item on the server.
 java.util.Calendar getVersionServerDate()
          Get the date / time the server version was created.
 ms.tfs.versioncontrol.clientservices._03._GetOperation getWebServiceObject()
          Gets the web service object this class wraps.
 boolean hasConflict()
          Gets whether this operation conflicts with another.
 int hashCode()
           
 boolean hasPendingChange()
          Gets whether this operation has a pending change.
 boolean isCaseChangingRename()
          Tests whether this operation describes a rename that is simply changing the character case of the file in this operation.
 boolean isContentDestroyed()
           
 boolean isDelete()
           
 boolean isDownloadCompleted()
           
 boolean isIgnore()
          True if this GetOperation should be ignored by the client-side Get logic.
 boolean isLatest()
          Gets whether this operation is for the latest version of a file.
 boolean isNamespaceConflict()
           
 boolean isNewContentNeeded()
           
 boolean isOkayToOverwriteExistingLocal()
          This flag indicates that writable file conflicts should be suppressed for this GetOperation, if the target local item is equal to the source local item.
 boolean isUndo()
           
 void setBaselineFileGUID(byte[] guid)
           
 void setChangeType(ChangeType changeType)
          Sets the types of the pending change described by this item.
 void setConflictingChangeType(ChangeType changeType)
          Sets the type of change that conflicts with this item.
 void setDeletionID(int did)
          Sets the deletion ID of the item.
 void setDownloadCompleted(boolean completed)
           
 void setDownloadURL(java.lang.String url)
          Sets the URL at which this item can be downloaded.
 void setEncoding(int encoding)
           
 void setHasConflict(boolean conflict)
          Sets whether this operation conflicts with another.
 void setHashValue(byte[] hashValue)
          Sets the hash code for the target item affected by this operation.
 void setIgnore(boolean value)
           
 void setItemID(int id)
          Sets the numeric ID of the item affected by this operation.
 void setItemType(ItemType type)
          Sets the type of the item affected by this operation.
 void setLocalVersionEntry(com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLocalItem entry)
           
 void setLockLevel(LockLevel lock)
          Sets the lock status for this operation.
 void setMergeDetails(Conflict mergeDetails)
          Sets the merge details for this operation.
 void setOkayToOverwriteExistingLocal(boolean value)
           
 void setPendingChangeID(int pcid)
          Sets the ID of the pending change.
 void setProcessType(ProcessType processType)
           
 void setPropertyValues(PropertyValue[] propertyValues)
           
 void setSourceLocalItem(java.lang.String item)
          Sets the local item that is the source of this operation.
 void setSourceServerItem(java.lang.String item)
           
 void setTargetLocalItem(java.lang.String item)
          Sets the local item that is the target of this operation.
 void setTargetServerItem(java.lang.String item)
          Sets the server item that is the target of this operation.
 void setVersionLocal(int version)
          Sets the version of the item locally.
 void setVersionServer(int version)
          Sets the version of the item on the server.
 void setVersionServerDate(java.util.Calendar value)
          Set the date / time the server version was created.
 
Methods inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GET_OPERATION_COMPARATOR

public static final java.util.Comparator<GetOperation> GET_OPERATION_COMPARATOR
Constructor Detail

GetOperation

public GetOperation()

GetOperation

public GetOperation(ms.tfs.versioncontrol.clientservices._03._GetOperation op)
Method Detail

getWebServiceObject

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

Returns:
the web service object this class wraps.

getMergeDetails

public Conflict getMergeDetails()
Returns:
the merge details (will be null if no merge conflict has occurred).

setMergeDetails

public void setMergeDetails(Conflict mergeDetails)
Sets the merge details for this operation. This method is only called when a conflict arises during a merge.

Parameters:
mergeDetails - the details to set (null to remove any details).

isNamespaceConflict

public boolean isNamespaceConflict()

getHashValue

public byte[] getHashValue()
Gets the hash code for the target item affected by this operation.

Returns:
the hash code for the target item.

setHashValue

public void setHashValue(byte[] hashValue)
Sets the hash code for the target item affected by this operation.

Parameters:
hashValue - the new hash code value for the target item.

getItemType

public ItemType getItemType()
Gets the type of the item affected by this operation.

Returns:
the type of the item.

setItemType

public void setItemType(ItemType type)
Sets the type of the item affected by this operation.

Parameters:
type - the type of the item.

getItemID

public int getItemID()
Gets the numeric ID of the item affected by this operation.

Returns:
the numeric ID of the item.

setItemID

public void setItemID(int id)
Sets the numeric ID of the item affected by this operation.

Parameters:
id - the numeric ID of the item.

getDownloadURL

public java.lang.String getDownloadURL()
Gets the URL at which this item can be downloaded.

Returns:
the url where this item can be downloaded.

getSourceServerItem

public java.lang.String getSourceServerItem()
Returns:
the name of the file or folder in the server's repository path space. If null this means that this is a pre-Dev11 server which doesn't support sending it back

setSourceServerItem

public void setSourceServerItem(java.lang.String item)

getEncoding

public int getEncoding()
Returns:
the file's encoding, always VersionControlConstants.ENCODING_UNCHANGED for pre-Dev 11 servers.

setEncoding

public void setEncoding(int encoding)

getCurrentLocalItem

public java.lang.String getCurrentLocalItem()
Returns:
the current local item is the source local item, unless clearLocalItem() has been called, in which case it is null.

getSourceLocalItem

public java.lang.String getSourceLocalItem()
Gets the local item that is the source of this operation, as defined by the web service object. The source item is the name of the item before the operation (i.e. rename.) This will always return the underlying web service object, even if the get operation has been modified by the GetEngine and the source local item has been cleared.

Returns:
the name of the source local item
See Also:
getCurrentLocalItem()

setSourceLocalItem

public void setSourceLocalItem(java.lang.String item)
Sets the local item that is the source of this operation. The source item is the name of the item before the operation (i.e. rename).

Parameters:
item - the path to the source local item.

getTargetLocalItem

public java.lang.String getTargetLocalItem()
Gets the local item that is the target of this operation. The target item is the name of the item after the operation (i.e. rename).

Returns:
the path to the target local item.

setTargetLocalItem

public void setTargetLocalItem(java.lang.String item)
Sets the local item that is the target of this operation. The target item is the name of the item after the operation (i.e. rename).

Parameters:
item - the path to the target local item.

getTargetServerItem

public java.lang.String getTargetServerItem()
Gets the server item that is the target of this operation. The target item is the name of the item after the operation (i.e. rename).

Returns:
the path to the target server item.

setTargetServerItem

public void setTargetServerItem(java.lang.String item)
Sets the server item that is the target of this operation. The target item is the name of the item after the operation (i.e. rename).

Parameters:
item - the path to the target server item.

getVersionServer

public int getVersionServer()
Gets the version of the item on the server.

Returns:
the version of the item on the server.

setVersionServer

public void setVersionServer(int version)
Sets the version of the item on the server.

Parameters:
version - the version of the item on the server.

getVersionLocal

public int getVersionLocal()
Gets the version of the item locally.

Returns:
the local version of the item.

setVersionLocal

public void setVersionLocal(int version)
Sets the version of the item locally.

Parameters:
version - the local version of the item.

getVersionServerDate

public java.util.Calendar getVersionServerDate()
Get the date / time the server version was created.

Returns:

setVersionServerDate

public void setVersionServerDate(java.util.Calendar value)
Set the date / time the server version was created.

Parameters:
value -

getDeletionID

public int getDeletionID()
Gets the deletion ID of the item.

Returns:
the deletion ID.

setDeletionID

public void setDeletionID(int did)
Sets the deletion ID of the item.

Parameters:
did - the deletion ID of the item.

getChangeType

public ChangeType getChangeType()
Gets the types of the pending change described by this item.

Returns:
the types of the pending change described by this item.

setChangeType

public void setChangeType(ChangeType changeType)
Sets the types of the pending change described by this item.

Parameters:
changeType - the types of the pending change described by this item.

getEffectiveChangeType

public ChangeType getEffectiveChangeType()

getLockLevel

public LockLevel getLockLevel()
Gets the lock status for this operation.

Returns:
the lock status for this operation.

setLockLevel

public void setLockLevel(LockLevel lock)
Sets the lock status for this operation.

Parameters:
lock - the lock status for this operation.

getPendingChangeID

public int getPendingChangeID()
Gets the ID of the pending change.

Returns:
the ID of the pending change.

setPendingChangeID

public void setPendingChangeID(int pcid)
Sets the ID of the pending change.

Parameters:
pcid - the ID of the pending change.

setDownloadURL

public void setDownloadURL(java.lang.String url)
Sets the URL at which this item can be downloaded.

Parameters:
url - the url where this item can be downloaded.

isLatest

public boolean isLatest()
Gets whether this operation is for the latest version of a file.

Returns:
true if this operation is the latest, false if not.

hasPendingChange

public boolean hasPendingChange()
Gets whether this operation has a pending change.

Returns:
true if associated pending change is not caused just by pending change on the parent.

hasConflict

public boolean hasConflict()
Gets whether this operation conflicts with another.

Returns:
true if this operation conflicts with another, false if not.

setHasConflict

public void setHasConflict(boolean conflict)
Sets whether this operation conflicts with another.

Parameters:
conflict - true if this operation conflicts with another, false if not.

getConflictingChangeType

public ChangeType getConflictingChangeType()
Gets the type of change that conflicts with this item.

Returns:
the type of change that conflicts with this item.

setConflictingChangeType

public void setConflictingChangeType(ChangeType changeType)
Sets the type of change that conflicts with this item.

Parameters:
changeType - the type of change that conflicts with this item.

getConflictingItemID

public int getConflictingItemID()
Returns:
the item ID of the conflict item

getType

public ProcessType getType()

setProcessType

public void setProcessType(ProcessType processType)

isUndo

public boolean isUndo()
Returns:
true if the type of this operation is Undo, false if not.

isDelete

public boolean isDelete()
Returns:
true if this operation results in the ultimate deletion of a file, false if it will create a local item.

isNewContentNeeded

public boolean isNewContentNeeded()

isCaseChangingRename

public boolean isCaseChangingRename()
Tests whether this operation describes a rename that is simply changing the character case of the file in this operation. If a part of the path that is not the file is changing case, but the file is not changing case, then the method returns false.

Returns:
true if the the operation is a rename changing the case of the file.

clearLocalItem

public void clearLocalItem()
Called by code during get when multiple operations affect a single local item.


isDownloadCompleted

public boolean isDownloadCompleted()
Returns:
true if the download for this item has been completed already (used in the conflict resolution code to signal that we don't need to download the item any more).

setDownloadCompleted

public void setDownloadCompleted(boolean completed)
Parameters:
completed - whether the download for this item should be marked completed.

getBaselineFileGUID

public byte[] getBaselineFileGUID()
Byte representation of the guid that is used to locate original file content in the baseline folder. This is populated only when new content was / will be downloaded using this GetOperation object.


setBaselineFileGUID

public void setBaselineFileGUID(byte[] guid)
See Also:
getBaselineFileGUID()

getLocalVersionEntry

public com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLocalItem getLocalVersionEntry()
Before looping through the GetOperations and calling ProcessOperation on each one, a pass is made to tag GetOperations meeting certain criteria with their local version entries. This data is needed at ProcessOperation time to determine whether or not to file a writable file conflict.


setLocalVersionEntry

public void setLocalVersionEntry(com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLocalItem entry)
See Also:
getLocalVersionEntry()

isOkayToOverwriteExistingLocal

public boolean isOkayToOverwriteExistingLocal()
This flag indicates that writable file conflicts should be suppressed for this GetOperation, if the target local item is equal to the source local item. This flag is set when undoing an edit and when performing certain types of resolves (AcceptTheirs on an edit, for example).


setOkayToOverwriteExistingLocal

public void setOkayToOverwriteExistingLocal(boolean value)

createDownloadSpec

public DownloadSpec createDownloadSpec()
Creates an download spec instance for this operation. The spec instance can be passed to FileDownloader to create a connection to the server to download this file's data.

Returns:
a new DownloadSpec instance.

getPropertyValues

public PropertyValue[] getPropertyValues()

setPropertyValues

public void setPropertyValues(PropertyValue[] propertyValues)

compareTo

public int compareTo(GetOperation other)
Specified by:
compareTo in interface java.lang.Comparable<GetOperation>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper

hashCode

public int hashCode()
Overrides:
hashCode in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper

setIgnore

public void setIgnore(boolean value)

isIgnore

public boolean isIgnore()
True if this GetOperation should be ignored by the client-side Get logic. When a filtered Get is performed, the provided callback may set Ignore to true on the ILocalUpdateOperation objects it receives. That is this property.


isContentDestroyed

public boolean isContentDestroyed()


© 2015 Microsoft. All rights reserved.