com.microsoft.tfs.core.clients.versioncontrol.conflicts
Class ConflictDescriptionFactory

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

public class ConflictDescriptionFactory
extends java.lang.Object


Constructor Summary
ConflictDescriptionFactory()
           
 
Method Summary
static ConflictDescription getConflictDescription(ConflictCategory category)
          Get a ConflictDescription which describes the type of conflict, but does not hold a particular Conflict.
static ConflictDescription getConflictDescription(ConflictCategory category, Conflict conflict)
          Get a ConflictDescription which describes the type of conflict.
static ConflictDescription getConflictDescription(Workspace workspace, Conflict conflict, ItemSpec[] conflictItemSpecs)
          Get a ConflictDescription for this particular Conflict.
static ConflictDescription[] getConflictDescriptions(Workspace workspace, Conflict[] conflicts, ItemSpec[] conflictItemSpecs)
          Convenience method to get multiple conflict descriptions for multiple conflicts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConflictDescriptionFactory

public ConflictDescriptionFactory()
Method Detail

getConflictDescription

public static final ConflictDescription getConflictDescription(Workspace workspace,
                                                               Conflict conflict,
                                                               ItemSpec[] conflictItemSpecs)
Get a ConflictDescription for this particular Conflict.

Parameters:
workspace - the Workspace that this conflict belongs to
conflict - the Conflict in question
Returns:
a ConflictDescription for this conflict, or null if it is an unknown conflict type.

getConflictDescription

public static final ConflictDescription getConflictDescription(ConflictCategory category)
Get a ConflictDescription which describes the type of conflict, but does not hold a particular Conflict. This is used occasionally in the UI when we need to determine text / resolution options for the category of conflicts of this type, not a specific conflict. This should be used carefully, as it can't be resolved.

Parameters:
category - The ConflictCategory to return a description for
Returns:
A dummy ConflictDescription describing the general type of this conflict. This ConflictDescription MAY NOT be resolved.

getConflictDescription

public static final ConflictDescription getConflictDescription(ConflictCategory category,
                                                               Conflict conflict)
Get a ConflictDescription which describes the type of conflict.

Parameters:
category - The ConflictCategory to return a description for
conflict - The core Conflict
Returns:
A ConflictDescription describing the general type of this conflict.

getConflictDescriptions

public static final ConflictDescription[] getConflictDescriptions(Workspace workspace,
                                                                  Conflict[] conflicts,
                                                                  ItemSpec[] conflictItemSpecs)
Convenience method to get multiple conflict descriptions for multiple conflicts.

Parameters:
workspace - The workspace this conflict belongs to
conflicts - The core Conflicts
conflictItemSpecs - The itemspecs that were queried for this conflict (these will be requeried later by the UI). may be null
Returns:
A list of ConflictDescription describing these conflict, respectively


© 2015 Microsoft. All rights reserved.