com.microsoft.tfs.core.checkinpolicies.loaders
Class NullPolicyLoader

java.lang.Object
  extended by com.microsoft.tfs.core.checkinpolicies.loaders.NullPolicyLoader
All Implemented Interfaces:
PolicyLoader

public class NullPolicyLoader
extends java.lang.Object
implements PolicyLoader

Loads no checking policies. Can be passed to methods that require a PolicyLoader when checkin policy evaluation is not desired.

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

Constructor Summary
NullPolicyLoader()
          Creates a NullPolicyLoader, which never loads any policy implementations, but does not error.
 
Method Summary
 java.lang.String[] getAvailablePolicyTypeIDs()
          Returns all the policy type ID strings that could be loaded by this loader.
 PolicyInstance load(java.lang.String policyTypeID)
          Loads a policy instance that is appropriate for the given policy type ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullPolicyLoader

public NullPolicyLoader()
Creates a NullPolicyLoader, which never loads any policy implementations, but does not error.

Method Detail

load

public PolicyInstance load(java.lang.String policyTypeID)
                    throws PolicyLoaderException
Loads a policy instance that is appropriate for the given policy type ID.

Specified by:
load in interface PolicyLoader
Parameters:
policyTypeID - the string that identifies the type of policy to load (must not be null or empty)
Returns:
a new policy instance whose type ID matches the given ID, or null if no matching PolicyInstances could be found.
Throws:
PolicyLoaderException - if an I/O error occurred loading the policy.

getAvailablePolicyTypeIDs

public java.lang.String[] getAvailablePolicyTypeIDs()
                                             throws PolicyLoaderException
Returns all the policy type ID strings that could be loaded by this loader. It's possible that an ID returned by this method will fail to load for other reasons when PolicyLoader.load(String) is invoked.

Specified by:
getAvailablePolicyTypeIDs in interface PolicyLoader
Returns:
an array of policy type ID strings that could be loaded by this loader.
Throws:
PolicyLoaderException - if an I/O error occurred searching for policies.


© 2015 Microsoft. All rights reserved.