com.microsoft.tfs.core.clients.versioncontrol
Class GatedCheckinUtils

java.lang.Object
  extended by com.microsoft.tfs.core.clients.versioncontrol.GatedCheckinUtils

public abstract class GatedCheckinUtils
extends java.lang.Object

Stateless methods to validate gated checkin changesets. These are required because changesets created by the build system for gated definitions differ slightly from normal changesets.


Constructor Summary
GatedCheckinUtils()
           
 
Method Summary
static boolean gatedCheckinCommentsMatch(java.lang.String committedComment, java.lang.String pendingComment)
          Tests whether a committed changeset's comment matches a pending comment, accounting for whitespace differences and the ***NO_CI*** comment for gated checkins.
static boolean gatedCheckinNotesMatch(CheckinNote committedCheckinNotes, CheckinNote pendingCheckinNotes)
          Tests whether a committed check in note matches the pending checkin note.
static boolean gatedCheckinWorkItemsMatch(int[] committedWorkItemIds, int[] pendingWorkItemIds)
          Tests whether the given work item ID arrays match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatedCheckinUtils

public GatedCheckinUtils()
Method Detail

gatedCheckinNotesMatch

public static boolean gatedCheckinNotesMatch(CheckinNote committedCheckinNotes,
                                             CheckinNote pendingCheckinNotes)
Tests whether a committed check in note matches the pending checkin note. All of the committed notes must be present and identical to the pending notes.

Parameters:
committedCheckinNotes - the notes which were committed (may be null)
pendingCheckinNotes - the notes which belong to the pending changes (may be null)
Returns:
true if the notes match, false if they do not match

gatedCheckinCommentsMatch

public static boolean gatedCheckinCommentsMatch(java.lang.String committedComment,
                                                java.lang.String pendingComment)
Tests whether a committed changeset's comment matches a pending comment, accounting for whitespace differences and the ***NO_CI*** comment for gated checkins.

Parameters:
committedComment - the comment which was committed (may be null)
pendingComment - the comment which belongs to the pending changes (may be null)
Returns:
true if the comments match, false if they do not match

gatedCheckinWorkItemsMatch

public static boolean gatedCheckinWorkItemsMatch(int[] committedWorkItemIds,
                                                 int[] pendingWorkItemIds)
Tests whether the given work item ID arrays match.

Parameters:
committedWorkItemIds - the associated IDs which were committed (may be null)
pendingWorkItemIds - the associated IDs which belong to the pending changes (may be null)
Returns:
true if the IDs match, false if they do not match


© 2015 Microsoft. All rights reserved.