com.microsoft.tfs.core.clients.versioncontrol.workspacecache
Class SavedCheckin

java.lang.Object
  extended by com.microsoft.tfs.core.clients.versioncontrol.workspacecache.SavedCheckin
All Implemented Interfaces:
java.lang.Cloneable

public class SavedCheckin
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
static java.lang.String XML_SAVED_CHECKIN
           
 
Constructor Summary
SavedCheckin()
           
SavedCheckin(java.util.Collection<java.lang.String> excludedServerPaths, java.lang.String comment, CheckinNote checkinNotes, WorkItemCheckedInfo[] workItemCheckedInfo, java.lang.String policyOverrideComment)
           
SavedCheckin(Shelveset shelveset)
           
SavedCheckin(java.lang.String comment, PendingChange[] excludedChanges, CheckinNote checkinNotes, WorkItemCheckedInfo[] workItemCheckedInfo, java.lang.String policyOverrideComment)
           
 
Method Summary
 java.lang.Object clone()
           
 WorkItemCheckedInfo[] getAssociateOrResolveWorkItemsCheckedInfo()
           
 CheckinNote getCheckinNotes()
           
 java.lang.String getComment()
           
 java.lang.String[] getExcludedServerPaths()
           
 java.lang.String getPolicyOverrideComment()
           
 WorkItemCheckedInfo[] getWorkItemsCheckedInfo()
           
 WorkItemCheckinInfo[] getWorkItemsCheckinInfo(WorkItemClient workItemClient)
          Convenience method to get the checked work item info as WorkItemCheckinInfo (used for web services) instead of WorkItemCheckedInfo (used for persistence).
 boolean isExcluded(java.lang.String targetServerItem)
          Returns true if there if the item is excluded in this checkin.
static SavedCheckin loadFromXML(org.w3c.dom.Element attemptedCheckinNode)
          Creates an instance from the XML representation used in the cache file.
 void mergeShelvesetMetadata(Shelveset shelveset, PendingChange[] unshelvedChanges)
          Reinitialize this SavedCheckin with the metadata contined within the specified shelveset and update the check states with the the specified set of pending changes.
 void mergeWorkItems(WorkItemCheckedInfo[] workItems)
          Merge the work items
 void saveAsXML(org.w3c.dom.Element parent)
          Saves this instance to the XML format used in the cache file.
 void setCheckinNotes(CheckinNote checkinNotes)
           
 void setComment(java.lang.String comment)
           
 void setExcludedServerPaths(java.lang.String[] serverPaths)
           
 void setPersistentWorkItemsCheckedInfo(WorkItemCheckedInfo[] persistentWorkItemsCheckedInfo)
           
 void setPolicyOverrideComment(java.lang.String policyOverrideComment)
           
 void updateCheckinItems(PendingChange[] checkedPendingChanges, PendingChange[] uncheckedPendingChanges)
          Update the saved channel info with the current check states.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_SAVED_CHECKIN

public static final java.lang.String XML_SAVED_CHECKIN
Constant Field Value:
"SavedCheckin"
See Also:
Constant Field Values
Constructor Detail

SavedCheckin

public SavedCheckin()

SavedCheckin

public SavedCheckin(java.lang.String comment,
                    PendingChange[] excludedChanges,
                    CheckinNote checkinNotes,
                    WorkItemCheckedInfo[] workItemCheckedInfo,
                    java.lang.String policyOverrideComment)

SavedCheckin

public SavedCheckin(java.util.Collection<java.lang.String> excludedServerPaths,
                    java.lang.String comment,
                    CheckinNote checkinNotes,
                    WorkItemCheckedInfo[] workItemCheckedInfo,
                    java.lang.String policyOverrideComment)

SavedCheckin

public SavedCheckin(Shelveset shelveset)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

isExcluded

public boolean isExcluded(java.lang.String targetServerItem)
Returns true if there if the item is excluded in this checkin.

Parameters:
targetServerItem - the target item to check

mergeShelvesetMetadata

public void mergeShelvesetMetadata(Shelveset shelveset,
                                   PendingChange[] unshelvedChanges)
Reinitialize this SavedCheckin with the metadata contined within the specified shelveset and update the check states with the the specified set of pending changes.

Parameters:
shelveset - The shelveset containing the desired metadata
unshelvedChanges - The pending changes that where unshelved

mergeWorkItems

public void mergeWorkItems(WorkItemCheckedInfo[] workItems)
Merge the work items

Parameters:
workItems - the work items to be merged (may be null or empty)

updateCheckinItems

public void updateCheckinItems(PendingChange[] checkedPendingChanges,
                               PendingChange[] uncheckedPendingChanges)
Update the saved channel info with the current check states. The specified checked states may be a filtered subset of the overall set of pending changes so this list does not replace the current channel checked states. Instead, this method ensures that the specified checked states exist in saved channel info and the unchecked changes do not.

Parameters:
checkedPendingChanges - the set of checked pending changes to merge with the overall set of checked items (may be null)
uncheckedPendingChanges - the set of unchecked pending changes to remove from the overall set of checked items (may be null)

loadFromXML

public static SavedCheckin loadFromXML(org.w3c.dom.Element attemptedCheckinNode)
Creates an instance from the XML representation used in the cache file.

Parameters:
attemptedCheckinNode - the XML node (must not be null)
Returns:
an instance of SavedCheckin created from the XML

saveAsXML

public void saveAsXML(org.w3c.dom.Element parent)
Saves this instance to the XML format used in the cache file.

Parameters:
parent - the XML parent node (must not be null)

getComment

public java.lang.String getComment()

setComment

public void setComment(java.lang.String comment)

getPolicyOverrideComment

public java.lang.String getPolicyOverrideComment()

setPolicyOverrideComment

public void setPolicyOverrideComment(java.lang.String policyOverrideComment)

getCheckinNotes

public CheckinNote getCheckinNotes()

setCheckinNotes

public void setCheckinNotes(CheckinNote checkinNotes)

getWorkItemsCheckedInfo

public WorkItemCheckedInfo[] getWorkItemsCheckedInfo()

getWorkItemsCheckinInfo

public WorkItemCheckinInfo[] getWorkItemsCheckinInfo(WorkItemClient workItemClient)
Convenience method to get the checked work item info as WorkItemCheckinInfo (used for web services) instead of WorkItemCheckedInfo (used for persistence).

The server may be contacted to instantiate WorkItems. Permissions may restrict which work items are returned or cause exceptions. Use getWorkItemsCheckedInfo() to get the raw persisted information.

Parameters:
workItemClient - the work item client to use to instantiate WorkItems (must not be null)
Returns:
the WorkItemCheckinInfos for this server

setPersistentWorkItemsCheckedInfo

public void setPersistentWorkItemsCheckedInfo(WorkItemCheckedInfo[] persistentWorkItemsCheckedInfo)

getExcludedServerPaths

public java.lang.String[] getExcludedServerPaths()

setExcludedServerPaths

public void setExcludedServerPaths(java.lang.String[] serverPaths)

getAssociateOrResolveWorkItemsCheckedInfo

public WorkItemCheckedInfo[] getAssociateOrResolveWorkItemsCheckedInfo()
Returns:
the WorkItemCheckedInfo objects in this SavedCheckin that have an action of either CheckinWorkItemAction.RESOLVE or CheckinWorkItemAction.ASSOCIATE (excludes CheckinWorkItemAction.NONE).


© 2015 Microsoft. All rights reserved.