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

java.lang.Object
  extended by com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
      extended by com.microsoft.tfs.core.clients.versioncontrol.soapextensions.ChangeRequest

public class ChangeRequest
extends com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper

Contains information about an change a user is making to a version control resource.

Since:
TEE-SDK-10.1

Field Summary
 
Fields inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
webServiceObject
 
Constructor Summary
ChangeRequest(ms.tfs.versioncontrol.clientservices._03._ChangeRequest request)
          Construct a ChangeRequest.
ChangeRequest(ItemSpec item, VersionSpec version, RequestType requestType, ItemType itemType, int encoding, LockLevel lockLevel, int deletionID, java.lang.String targetItem, boolean detectTargetItemType)
          Creates a ChangeRequest for the given item at the given version.
 
Method Summary
static ChangeRequest[] fromSpecs(ItemSpec[] specs, RequestType requestType, LockLevel[] lockLevel, FileEncoding[] fileEncoding)
          Create change requests from an array of specs.
static ChangeRequest[] fromStrings(java.lang.String[] paths, RequestType requestType, LockLevel[] lockLevel, RecursionType recursionType, FileEncoding[] fileEncoding)
          Create change requests from an array of string paths.
 int getDeletionID()
           
 int getEncoding()
           
 ItemSpec getItemSpec()
           
 ItemType getItemType()
           
 LockLevel getLockLevel()
           
 PropertyValue[] getProperties()
           
 RequestType getRequestType()
           
 java.lang.String getTargetItem()
           
 ItemType getTargetItemType()
           
 VersionSpec getVersionSpec()
           
 ms.tfs.versioncontrol.clientservices._03._ChangeRequest getWebServiceObject()
          Gets the web service object this class wraps.
 void setDeletionID(int did)
           
 void setEncoding(int enc)
           
 void setItemSpec(ItemSpec item)
           
 void setItemType(ItemType type)
           
 void setLockLevel(LockLevel lock)
           
 void setProperties(PropertyValue[] properties)
           
 void setRequestType(RequestType req)
           
 void setTargetItem(java.lang.String target)
           
 void setTargetItemType(ItemType targettype)
           
 void setVersionSpec(VersionSpec vspec)
           
 java.lang.String toString()
           
 
Methods inherited from class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChangeRequest

public ChangeRequest(ms.tfs.versioncontrol.clientservices._03._ChangeRequest request)
              throws ChangeRequestValidationException
Construct a ChangeRequest.

Parameters:
request - the request object to use as default values. All local paths in this request object must be absolute.
Throws:
ChangeRequestValidationException - if this request fails validation.

ChangeRequest

public ChangeRequest(ItemSpec item,
                     VersionSpec version,
                     RequestType requestType,
                     ItemType itemType,
                     int encoding,
                     LockLevel lockLevel,
                     int deletionID,
                     java.lang.String targetItem,
                     boolean detectTargetItemType)
              throws ChangeRequestValidationException
Creates a ChangeRequest for the given item at the given version.

Parameters:
item - the item to change (must not be null)
version - the version of the item to change (may be null to let the server apply the default version appropriate for the path)
requestType - the type of change requested (must not be null)
itemType - the type of item (may be null if detectTargetItemType is true, otherwise not null)
encoding - the item's encoding (must not be null)
lockLevel - the lock level desired (must not be null)
deletionID - the deletion ID of the item
targetItem - the target item (may be null if the change does not require a different target item)
detectTargetItemType - true to examine the item's local representation to determine the type (file or folder), false to use the given item type (which must not be null)
Throws:
ChangeRequestValidationException - if the change request is not valid after parameters are interpreted
Method Detail

getWebServiceObject

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

Returns:
the web service object this class wraps.

getDeletionID

public int getDeletionID()

getEncoding

public int getEncoding()

getItemSpec

public ItemSpec getItemSpec()

getLockLevel

public LockLevel getLockLevel()

getRequestType

public RequestType getRequestType()

getTargetItem

public java.lang.String getTargetItem()

getTargetItemType

public ItemType getTargetItemType()

getItemType

public ItemType getItemType()

getVersionSpec

public VersionSpec getVersionSpec()

setDeletionID

public void setDeletionID(int did)

setEncoding

public void setEncoding(int enc)

setItemSpec

public void setItemSpec(ItemSpec item)

setLockLevel

public void setLockLevel(LockLevel lock)

setRequestType

public void setRequestType(RequestType req)

setTargetItem

public void setTargetItem(java.lang.String target)

setTargetItemType

public void setTargetItemType(ItemType targettype)

setItemType

public void setItemType(ItemType type)

setVersionSpec

public void setVersionSpec(VersionSpec vspec)

getProperties

public PropertyValue[] getProperties()

setProperties

public void setProperties(PropertyValue[] properties)

fromStrings

public static ChangeRequest[] fromStrings(java.lang.String[] paths,
                                          RequestType requestType,
                                          LockLevel[] lockLevel,
                                          RecursionType recursionType,
                                          FileEncoding[] fileEncoding)
                                   throws ChangeRequestValidationException
Create change requests from an array of string paths. The encodings of disk files are automatically detected.

Parameters:
paths - the local disk or server paths of files or folders to create a change request for (must not be null) Local paths will be canonicalized (therefore made absolute). Any server paths will not have their encoding automatically detected. (must not be null)
requestType - the type of change that is being requested.
lockLevel - an array containing the lock level for each file.
recursionType - what kind of recursion to perform on the paths supplied as the first argument.
fileEncoding - an array containing the encoding for each item spec, or null to indicate that the encoding is unchanged. If the array is null, VersionControlConstants.ENCODING_UNCHANGED is used for all.
Returns:
a new array of AChangeRequest instances.
Throws:
ChangeRequestValidationException - if an error occurred constructing an AChangeRequest because a local disk file could not be examined.

fromSpecs

public static ChangeRequest[] fromSpecs(ItemSpec[] specs,
                                        RequestType requestType,
                                        LockLevel[] lockLevel,
                                        FileEncoding[] fileEncoding)
                                 throws ChangeRequestValidationException
Create change requests from an array of specs. The encodings of disk files are automatically detected.

Parameters:
specs - the items specs to create requests for. Local paths will be canonicalized (therefore made absolute). Any server paths will not have their encoding automatically detected. (must not be null)
requestType - the type of change that is being requested.
lockLevel - an array containing the lock level for each item spec.
fileEncoding - an array containing the encoding for each item spec, or null to indicate that the encoding is unchanged. If the array is null, VersionControlConstants.ENCODING_UNCHANGED is used for all.
Returns:
a new array of AChangeRequest instances.
Throws:
ChangeRequestValidationException - if an error occurred constructing an AChangeRequest because a local disk file could not be examined.

toString

public java.lang.String toString()
Overrides:
toString in class com.microsoft.tfs.core.internal.wrappers.WebServiceObjectWrapper


© 2015 Microsoft. All rights reserved.