|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.checkinpolicies.loaders.ClasspathPolicyLoader
public class ClasspathPolicyLoader
Loads check-in policies from the classpath of the ClassLoader
that
loaded this class. See POLICY_INSTANCE_PROPERTIES_FILENAME
for the
name of the classpath resource that declares available policy
implementations.
Field Summary | |
---|---|
static java.lang.String |
POLICY_INSTANCE_PROPERTIES_FILENAME
ClasspathPolicyLoader searches the ClassLoader that
loaded this class for all resources with this name. |
Constructor Summary | |
---|---|
ClasspathPolicyLoader()
Creates a ClasspathPolicyLoader , which loads implementations by
searching the classpath for implementation properties files. |
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 |
Field Detail |
---|
public static final java.lang.String POLICY_INSTANCE_PROPERTIES_FILENAME
ClasspathPolicyLoader
searches the ClassLoader
that
loaded this class for all resources with this name. These resources are
properties files which are parsed in order to determine the name of a
PolicyInstance
class to load and the policy ID the class
implements. Other properties may also be read from this resource.
"checkin-policy-instance.properties"
Constructor Detail |
---|
public ClasspathPolicyLoader()
ClasspathPolicyLoader
, which loads implementations by
searching the classpath for implementation properties files.
Method Detail |
---|
public PolicyInstance load(java.lang.String policyTypeID) throws PolicyLoaderException
load
in interface PolicyLoader
policyTypeID
- the string that identifies the type of policy to load (must not be
null
or empty)
null
if no matching PolicyInstance
s could be
found.
PolicyLoaderException
- if an I/O error occurred loading the policy.public java.lang.String[] getAvailablePolicyTypeIDs() throws PolicyLoaderException
PolicyLoader.load(String)
is invoked.
getAvailablePolicyTypeIDs
in interface PolicyLoader
PolicyLoaderException
- if an I/O error occurred searching for policies.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |