com.microsoft.tfs.core.checkinpolicies
Interface PolicyLoader

All Known Implementing Classes:
ClasspathPolicyLoader, NullPolicyLoader

public interface PolicyLoader

A PolicyLoader performs all loading and instantiation of PolicyInstance objects, as well as discover of available PolicyTypes.

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

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.
 

Method Detail

load

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

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

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 load(String) is invoked.

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.