|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
com.microsoft.tfs.core.clients.versioncontrol.soapextensions.PendingChange
public final class PendingChange
Contains information about a change the user wants to perform to a versioned item (or possibly a newly added item).
Field Summary |
---|
Fields inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper |
---|
webServiceObject |
Constructor Summary | |
---|---|
PendingChange(ms.tfs.versioncontrol.clientservices._03._PendingChange change)
|
|
PendingChange(PendingChange change)
Creates a clone of the given PendingChange . |
|
PendingChange(java.lang.String serverItem,
java.lang.String sourceServerItem,
int sourceVersionFrom,
int sourceDeletionID,
int deletionID,
LockLevel lockLevel,
java.lang.String localItem,
ItemType itemType,
int itemID,
java.util.Calendar creationDate,
int version,
ChangeType changeType,
byte[] hashValue,
byte[] uploadHashValue,
int encoding,
int pendingChangeID,
PropertyValue[] properties,
boolean isCandidate)
|
|
PendingChange(Workspace workspace,
GetOperation operation,
ProcessType processType)
Construct a PendingChange from a GetOperation . |
Method Summary | |
---|---|
int |
compareTo(PendingChange other)
|
void |
downloadBaseFile(VersionControlClient client,
java.lang.String localFileName)
Downloads the content of the version of the file against which the change was pended. |
java.io.File |
downloadBaseFileToTempLocation(VersionControlClient client,
java.lang.String fileName)
Downloads the content of the version of the file against which the change was pended to a temp file in a new temp directory allocated with TempStorageService . |
void |
downloadShelvedFile(VersionControlClient client,
java.lang.String localFileName)
Downloads the shelved content for this pending change. |
java.io.File |
downloadShelvedFileToTempLocation(VersionControlClient client,
java.lang.String fileName)
Downloads the shelved content for this pending change to a temp file in a new temp directory allocated with TempStorageService . |
boolean |
equals(java.lang.Object obj)
|
boolean |
equalsIgnoringLockLevelAndVersion(java.lang.Object obj)
Like equals(Object) , but does not test the lock level and
version. |
ChangeType |
getChangeType()
|
ConflictType |
getConflictType()
|
java.util.Calendar |
getCreationDate()
|
int |
getDeletionID()
|
java.lang.String |
getDownloadURL()
|
int |
getEncoding()
|
byte[] |
getHashValue()
|
int |
getItemID()
|
ItemType |
getItemType()
|
long |
getLength()
|
java.lang.String |
getLocalItem()
|
LockLevel |
getLockLevel()
|
java.lang.String |
getLockLevelName()
The localized string appropriate for normal text lock level display (command-line client "status /format:detailed" command, for example). |
java.lang.String |
getLockLevelShortName()
The localized string appropriate for very space-constrained lock level display (command-line client "status /format:brief" command, for example). |
MergeSource[] |
getMergeSources()
|
int |
getPendingChangeID()
Deprecated. since TFS 2010 |
java.lang.String |
getPendingSetName()
Name of the PendingSet that this PendingChange is part of. |
java.lang.String |
getPendingSetOwner()
Owner of the PendingSet that this PendingChange is part of. |
java.lang.String |
getPendingSetOwnerDisplay()
Unique Owner of the PendingSet that this PendingChange is part of. |
PropertyValue[] |
getPropertyValues()
|
java.lang.String |
getServerItem()
|
java.lang.String |
getShelvedDownloadURL()
|
java.lang.String |
getSourceLocalItem()
|
java.lang.String |
getSourceServerItem()
|
int |
getSourceVersionFrom()
|
byte[] |
getUploadContentHashValue()
|
int |
getVersion()
|
ms.tfs.versioncontrol.clientservices._03._PendingChange |
getWebServiceObject()
Gets the web service object this class wraps. |
boolean |
hasContentChange()
Tests whether this pending change has local content which differs from the server item. |
int |
hashCode()
|
boolean |
hasLocalItem()
Tests whether the local item is null . |
boolean |
isAdd()
|
boolean |
isBranch()
|
boolean |
isCandidate()
If false, the change is actually pended otherwise this is a candidate change, which we have detected which the user might choose to accept or discard. |
boolean |
isDelete()
|
boolean |
isEdit()
|
boolean |
isEncoding()
|
boolean |
isInShelveset()
Flag indicating if this pending change is part of shelveset or workspace. |
boolean |
isLocalItemDelete()
|
boolean |
isLock()
|
boolean |
isMerge()
|
boolean |
isRename()
|
boolean |
isRollback()
|
static boolean |
isSourceRename(ChangeType changeType)
|
boolean |
isUnchanged(Workspace workspace)
Determine whether this pending change is unchanged using either local workspace or server workspace. |
boolean |
isUnchangedInLocalWorkspace(Workspace workspace)
Tests whether this pending change has local content which differs from local baseline. |
boolean |
isUnchangedInServerWorkspace()
Determine whether this pending change is unchanged pending change. |
boolean |
isUndelete()
|
boolean |
isUndone()
|
void |
restoreCandidateDelete(Workspace workspace)
Restores a candidate delete on disk, if it's a folder, walks children recursively and restores them as well. |
void |
setCandidate(boolean value)
|
void |
setChangeType(ChangeType changeType)
|
void |
setConflictType(ConflictType conflictType)
|
void |
setCreationDate(java.util.Calendar date)
|
void |
setDeletionID(int did)
|
void |
setDownloadURL(java.lang.String url)
|
void |
setEncoding(int enc)
|
void |
setHashValue(byte[] hash)
|
void |
setInShelveset(boolean value)
|
void |
setItemID(int itemid)
|
void |
setItemType(ItemType type)
|
void |
setLength(long value)
|
void |
setLocalItem(java.lang.String item)
|
void |
setLockLevel(LockLevel lock)
|
void |
setPendingChangeID(int pcid)
Deprecated. since TFS 2010 |
void |
setPendingSetName(java.lang.String name)
|
void |
setPendingSetOwner(java.lang.String owner)
|
void |
setPendingSetOwnerDisplay(java.lang.String owner)
|
void |
setServerItem(java.lang.String item)
|
void |
setShelvedDownloadURL(java.lang.String url)
|
void |
setSourceLocalItem(java.lang.String item)
|
void |
setSourceServerItem(java.lang.String item)
|
void |
setUploadContentHashValue(byte[] hash)
|
void |
setVersion(int version)
|
static java.lang.String[] |
toLocalItems(PendingChange[] changes)
Extracts all the non-null local items from an array of pending changes and returns a new array containing them. |
static java.lang.String[] |
toServerItems(PendingChange[] changes)
Extracts all the non-null server items from an array of pending changes and returns a new array containing them. |
java.lang.String |
toString()
|
void |
updateMissingProperties(VersionControlClient client)
Queries server for full PendingChange object (including download URL) and populates downloadUrl, shelvedDownloadUrl, SourceServerItem and SourceLocalItem of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PendingChange(ms.tfs.versioncontrol.clientservices._03._PendingChange change)
public PendingChange(PendingChange change)
PendingChange
.
change
- the change to clone (must not be null
)public PendingChange(Workspace workspace, GetOperation operation, ProcessType processType)
PendingChange
from a GetOperation
. This is
just a convenience method for GetEngine
to use. Do not use this
outside of com.microsoft.tfs.core.
workspace
- the workspace where the get operation happened (must not be
null
)operation
- the operation to initialize the pending change from (must not be
null
)processType
- the process type of the operation (must not be null
)public PendingChange(java.lang.String serverItem, java.lang.String sourceServerItem, int sourceVersionFrom, int sourceDeletionID, int deletionID, LockLevel lockLevel, java.lang.String localItem, ItemType itemType, int itemID, java.util.Calendar creationDate, int version, ChangeType changeType, byte[] hashValue, byte[] uploadHashValue, int encoding, int pendingChangeID, PropertyValue[] properties, boolean isCandidate)
Method Detail |
---|
public ms.tfs.versioncontrol.clientservices._03._PendingChange getWebServiceObject()
public java.io.File downloadShelvedFileToTempLocation(VersionControlClient client, java.lang.String fileName)
TempStorageService
. Throws
VersionControlException
this is not a shelved pending change.
fileName
- the file name (not full path) to give the temporary file (must not
be null
or empty)
public void downloadShelvedFile(VersionControlClient client, java.lang.String localFileName)
VersionControlException
this is not a shelved pending change.
client
- the VersionControlClient
to use to download the file (must
not be null
)localFileName
- where to save the downloaded file contents (must not be
null
)public java.io.File downloadBaseFileToTempLocation(VersionControlClient client, java.lang.String fileName)
TempStorageService
.
fileName
- the file name (not full path) to give the temporary file (must not
be null
or empty)
public void downloadBaseFile(VersionControlClient client, java.lang.String localFileName)
localFileName
- where to save the downloaded file contents (must not be
null
)public void updateMissingProperties(VersionControlClient client)
public ChangeType getChangeType()
public void setChangeType(ChangeType changeType)
public ConflictType getConflictType()
public void setConflictType(ConflictType conflictType)
public java.util.Calendar getCreationDate()
public void setCreationDate(java.util.Calendar date)
public int getDeletionID()
public void setDeletionID(int did)
public int getEncoding()
public void setEncoding(int enc)
public byte[] getHashValue()
public void setHashValue(byte[] hash)
hash
- the MD5 HashValue for the contents of the version of the file the
change is pended against.public java.lang.String getServerItem()
public void setServerItem(java.lang.String item)
public int getItemID()
public void setItemID(int itemid)
public boolean hasLocalItem()
null
. Skips path conversion,
making it faster than calling getLocalItem()
.
null
,
false
if the local item is null
public java.lang.String getLocalItem()
public void setLocalItem(java.lang.String item)
public LockLevel getLockLevel()
public void setLockLevel(LockLevel lock)
public int getSourceVersionFrom()
@Deprecated public int getPendingChangeID()
@Deprecated public void setPendingChangeID(int pcid)
public java.lang.String getSourceServerItem()
public void setSourceServerItem(java.lang.String item)
public java.lang.String getSourceLocalItem()
public void setSourceLocalItem(java.lang.String item)
public ItemType getItemType()
public void setItemType(ItemType type)
public byte[] getUploadContentHashValue()
public void setUploadContentHashValue(byte[] hash)
hash
- the MD5 HashValue for the file that is currently associated with
this pending change.public int getVersion()
public void setVersion(int version)
public boolean isCandidate()
public void setCandidate(boolean value)
public java.lang.String getPendingSetName()
public void setPendingSetName(java.lang.String name)
public java.lang.String getPendingSetOwner()
public void setPendingSetOwner(java.lang.String owner)
public java.lang.String getPendingSetOwnerDisplay()
public void setPendingSetOwnerDisplay(java.lang.String owner)
public boolean isInShelveset()
public void setInShelveset(boolean value)
public int compareTo(PendingChange other)
compareTo
in interface java.lang.Comparable<PendingChange>
public static java.lang.String[] toServerItems(PendingChange[] changes)
changes
- the changes to examine for server items.
public static java.lang.String[] toLocalItems(PendingChange[] changes)
changes
- the changes to examine for local items.
public boolean equalsIgnoringLockLevelAndVersion(java.lang.Object obj)
equals(Object)
, but does not test the lock level and
version. This method might be useful for some UI classes that need to
compare changes between pending change sets (e.g. during a refresh).
Object.equals(java.lang.Object)
public boolean equals(java.lang.Object obj)
equals
in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
public int hashCode()
hashCode
in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
public java.lang.String getLockLevelName()
public java.lang.String getLockLevelShortName()
public java.lang.String toString()
toString
in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
public boolean isUndone()
public boolean isLocalItemDelete()
public long getLength()
public void setLength(long value)
public java.lang.String getDownloadURL()
public void setDownloadURL(java.lang.String url)
public java.lang.String getShelvedDownloadURL()
public void setShelvedDownloadURL(java.lang.String url)
public static boolean isSourceRename(ChangeType changeType)
public MergeSource[] getMergeSources()
public boolean hasContentChange() throws CanceledException
true
if the pending change is a
ChangeType.EDIT
and the local item's contents are
different than the server's contents, false
otherwise
CanceledException
- if the hash operation was cancelled via the default
TaskMonitor
public boolean isUnchanged(Workspace workspace)
workspace
-
public boolean isUnchangedInServerWorkspace() throws CanceledException
true
if the pending change is
ChangeType.EDIT
, and the local item's has no content
changes, false
otherwise
CanceledException
- if the core operation was cancelled via the default
TaskMonitor
public boolean isUnchangedInLocalWorkspace(Workspace workspace) throws CanceledException
true
if the pending change is a
ChangeType.EDIT
and the local item's contents are same as
baseline, false
otherwise
CanceledException
- if the hash operation was cancelled via the default
TaskMonitor
public boolean isAdd()
public boolean isEdit()
public boolean isRename()
public boolean isEncoding()
public boolean isDelete()
public boolean isUndelete()
public boolean isBranch()
public boolean isMerge()
public boolean isRollback()
public boolean isLock()
public PropertyValue[] getPropertyValues()
public void restoreCandidateDelete(Workspace workspace)
workspace
- the workspace to restore changes in (must not be null
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |