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

java.lang.Object
  extended by com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
      extended by com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Item
All Implemented Interfaces:
java.lang.Comparable<Item>
Direct Known Subclasses:
WorkspaceItem

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

Contains information about a version control item.

Since:
TEE-SDK-10.1

Field Summary
 
Fields inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
webServiceObject
 
Constructor Summary
Item(ms.tfs.versioncontrol.clientservices._03._Item item)
           
Item()
           
Item(ItemType itemType, java.lang.String serverItem, int encoding)
           
 
Method Summary
 int compareTo(Item other)
           
 void downloadFile(VersionControlClient client, java.lang.String filePath)
          Downloads the content for this version of the item.
 java.io.File downloadFileToTempLocation(VersionControlClient client, java.lang.String fileName)
          Downloads the content for this version of the item to a temp file in a new temp directory allocated with TempStorageService.
 int getChangeSetID()
           
 java.util.Calendar getCheckinDate()
           
 byte[] getContentHashValue()
           
 long getContentLength()
           
 int getDeletionID()
           
 java.lang.String getDownloadURL()
           
 FileEncoding getEncoding()
           
 int getItemID()
           
 ItemType getItemType()
           
 PropertyValue[] getPropertyValues()
           
 java.lang.String getServerItem()
           
 java.lang.String getTimeZone()
           
 java.lang.String getTimeZoneO()
           
 ms.tfs.versioncontrol.clientservices._03._Item getWebServiceObject()
          Gets the web service object this class wraps.
 boolean isBranch()
          This method always returns false for items in a TFS 2005 or TFS 2008 server.
 boolean isContentDestroyed(VersionControlClient client)
           
 void setChangeSetID(int cs)
           
 void setCheckinDate(java.util.Calendar date)
           
 void setContentHashValue(byte[] hash)
           
 void setContentLength(long len)
           
 void setDeletionID(int did)
           
 void setDownloadURL(java.lang.String url)
           
 void setEncoding(FileEncoding encoding)
           
 void setItemID(int itemid)
           
 void setItemType(ItemType type)
           
 void setPropertyValues(PropertyValue[] properties)
           
 void setServerItem(java.lang.String item)
           
 
Methods inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Item

public Item()

Item

public Item(ItemType itemType,
            java.lang.String serverItem,
            int encoding)

Item

public Item(ms.tfs.versioncontrol.clientservices._03._Item item)
Method Detail

getWebServiceObject

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

Returns:
the web service object this class wraps.

compareTo

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

getChangeSetID

public int getChangeSetID()

setChangeSetID

public void setChangeSetID(int cs)

getCheckinDate

public java.util.Calendar getCheckinDate()

setCheckinDate

public void setCheckinDate(java.util.Calendar date)

getDeletionID

public int getDeletionID()

setDeletionID

public void setDeletionID(int did)

getEncoding

public FileEncoding getEncoding()

setEncoding

public void setEncoding(FileEncoding encoding)

getContentHashValue

public byte[] getContentHashValue()

setContentHashValue

public void setContentHashValue(byte[] hash)

getServerItem

public java.lang.String getServerItem()

setServerItem

public void setServerItem(java.lang.String item)

getItemID

public int getItemID()

setItemID

public void setItemID(int itemid)

getContentLength

public long getContentLength()

setContentLength

public void setContentLength(long len)

getItemType

public ItemType getItemType()

setItemType

public void setItemType(ItemType type)

setDownloadURL

public void setDownloadURL(java.lang.String url)

getDownloadURL

public java.lang.String getDownloadURL()

getTimeZone

public java.lang.String getTimeZone()

getTimeZoneO

public java.lang.String getTimeZoneO()

getPropertyValues

public PropertyValue[] getPropertyValues()

setPropertyValues

public void setPropertyValues(PropertyValue[] properties)

isBranch

public boolean isBranch()
This method always returns false for items in a TFS 2005 or TFS 2008 server.

Returns:
true if the item is a branch, false if it is not a branch
Since:
TFS2010

downloadFileToTempLocation

public java.io.File downloadFileToTempLocation(VersionControlClient client,
                                               java.lang.String fileName)
Downloads the content for this version of the item to a temp file in a new temp directory allocated with TempStorageService.

Parameters:
fileName - the file name (not full path) to give the temporary file
Returns:
the temporary file created

downloadFile

public void downloadFile(VersionControlClient client,
                         java.lang.String filePath)
Downloads the content for this version of the item.

Parameters:
filePath - where to save the downloaded file contents (must not be null)

isContentDestroyed

public boolean isContentDestroyed(VersionControlClient client)
Returns:
true if the content for this file has been destroyed, false if the content exists, or if the item is a directory.


© 2015 Microsoft. All rights reserved.