com.microsoft.tfs.core.checkinpolicies
Class PolicyFailure

java.lang.Object
  extended by com.microsoft.tfs.core.checkinpolicies.PolicyFailure
Direct Known Subclasses:
PolicyExceptionFailure

public class PolicyFailure
extends java.lang.Object

Contains information about a single failure detected during checkin policy evaluation (PolicyInstance.evaluate(PolicyContext)). Once produced, a failure may be examined by UI code, sent with events, queried for help text, or used in other ways.

Implementations should be immutable or thread-safe.

Since:
TEE-SDK-10.1
Thread-safety:
immutable, thread-safe

Constructor Summary
PolicyFailure(java.lang.String message, PolicyInstance policy)
          Creates a PolicyFailure with the given message for the given policy.
 
Method Summary
 java.lang.String getMessage()
           
 PolicyInstance getPolicy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyFailure

public PolicyFailure(java.lang.String message,
                     PolicyInstance policy)
Creates a PolicyFailure with the given message for the given policy.

Parameters:
message - the message that describes the failure. If null, a generic message is displayed.
policy - the policy that detected and created the failure (must not be null)
Method Detail

getMessage

public java.lang.String getMessage()
Returns:
the text that describes the failure (may be null).

getPolicy

public PolicyInstance getPolicy()
Returns:
the policy that detected and created this failure.


© 2015 Microsoft. All rights reserved.