com.microsoft.tfs.core.checkinpolicies
Class PolicyContext

java.lang.Object
  extended by com.microsoft.tfs.core.checkinpolicies.PolicyContext

public class PolicyContext
extends java.lang.Object

PolicyContext contains optional values that are passed down to a check-in policy by the execution environment that hosts the policy. A context is available during several operations on PolicyInstance.

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

Constructor Summary
PolicyContext()
          Creates a PolicyContext with no keys initially set.
 
Method Summary
 void addProperty(java.lang.String key, java.lang.Object value)
          Adds a property to this PolicyContext.
 java.lang.Object getProperty(java.lang.String key)
          Gets a property from this PolicyContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyContext

public PolicyContext()
Creates a PolicyContext with no keys initially set.

Method Detail

addProperty

public void addProperty(java.lang.String key,
                        java.lang.Object value)
Adds a property to this PolicyContext. If the property is already defined, the old value will be overwritten.

Parameters:
key - the property key (must not be null)
value - the property value (can be null)

getProperty

public java.lang.Object getProperty(java.lang.String key)
Gets a property from this PolicyContext.

Parameters:
key - the property key (must not be null)
Returns:
the value for the key (possibly null if not set or previously set to null)


© 2015 Microsoft. All rights reserved.