Class PolicyProcessor
java.lang.Object
org.dogtagpki.legacy.policy.PolicyProcessor
- Direct Known Subclasses:
GenericPolicyProcessor
A generic interface for a policy processor. By making a processor
extend the policy interface, we make even the processor a rule -
which makes sense because a processor may be based on some rule
such as evaluate all policies before returning the final result or
return as soon as one of the policies return a failure and so on.
By making both processor and policy rules implement a common
interface, one can write rules that are processors as well.
NOTE: The Policy Framework has been replaced by the Profile Framework.
- Version:
- $Revision$, $Date$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddPolicyImpl(String id, String classPath) Adds a policy implementation identified by an impl id.abstract voidaddPolicyInstance(String id, Hashtable<String, String> ht) Adds a policy instanceabstract voidchangePolicyInstanceOrdering(String policyOrderStr) Modifies policy ordering.abstract voidDeletes a policy implementation identified by an impl id.abstract voidDeletes a policy instance identified by an instance id.abstract IAuthorityabstract PolicyRulegetPolicyImpl(String id) Returns an implementation identified by a given id.Returns configuration for an implmentation.abstract Enumeration<PolicyRule> Returns the rule implementations registered with this processor.abstract Enumeration<String> Returns information on Policy impls.abstract PolicyRuleReturns instance configuration for a given instance id.Returns instance configuration for a given instance id.abstract Enumeration<PolicyRule> Returns policy instances registered with this processor.abstract Enumeration<String> Returns information on Policy instances.abstract StringReturns the policy substore id.abstract voidmodifyPolicyInstance(String id, Hashtable<String, String> ht) Modifies a policy instance
-
Field Details
-
PROP_DEF_POLICIES
- See Also:
-
PROP_UNDELETABLE_POLICIES
- See Also:
-
PROP_ENABLE
- See Also:
-
PROP_RULE
- See Also:
-
PROP_CLASS
- See Also:
-
PROP_IMPL_NAME
- See Also:
-
PROP_PREDICATE
- See Also:
-
PROP_IMPL
- See Also:
-
PROP_ORDER
- See Also:
-
-
Constructor Details
-
PolicyProcessor
public PolicyProcessor()
-
-
Method Details
-
getAuthority
-
getPolicySubstoreId
Returns the policy substore id.- Returns:
- storeID The policy store id used by this processor.
-
getPolicyImplsInfo
Returns information on Policy impls.- Returns:
- An enumeration of strings describing the information about policy implementations. Currently only the the implementation id is expected.
-
getPolicyImpls
Returns the rule implementations registered with this processor.- Returns:
- An Enumeration of uninitialized IPolicyRule objects.
-
getPolicyImpl
Returns an implementation identified by a given id.- Parameters:
id- The implementation id.- Returns:
- The uninitialized instance of the policy rule.
-
getPolicyImplConfig
-
deletePolicyImpl
Deletes a policy implementation identified by an impl id.- Parameters:
id- The impl id of the policy to be deleted. There shouldn't be any active instance for this implementation.- Throws:
EBaseException- is thrown if an error occurs in deletion.
-
addPolicyImpl
Adds a policy implementation identified by an impl id.- Parameters:
id- The impl id of the policy to be added. The id should be unique.classPath- The fully qualified path for the implementation.- Throws:
EBaseException- is thrown if an error occurs in addition.
-
getPolicyInstancesInfo
Returns information on Policy instances.- Returns:
- An Enumeration of Strings describing the information about policy rule instances.
-
getPolicyInstances
Returns policy instances registered with this processor.- Returns:
- An Enumeration of policy instances.
-
getPolicyInstanceConfig
-
getPolicyInstance
Returns instance configuration for a given instance id.- Parameters:
id- The rule id.- Returns:
- the policy instance identified by the id.
-
deletePolicyInstance
Deletes a policy instance identified by an instance id.- Parameters:
id- The instance id of the policy to be deleted.- Throws:
EBaseException- is thrown if an error occurs in deletion.
-
addPolicyInstance
public abstract void addPolicyInstance(String id, Hashtable<String, String> ht) throws EBaseExceptionAdds a policy instance- Parameters:
id- The impl id of the policy to be added. The id should be unique.ht- a Hashtable of config params.- Throws:
EBaseException- is thrown if an error occurs in addition.
-
modifyPolicyInstance
public abstract void modifyPolicyInstance(String id, Hashtable<String, String> ht) throws EBaseExceptionModifies a policy instance- Parameters:
id- The impl id of the policy to be modified. The policy instance with this id should be present.ht- a Hashtable of config params.- Throws:
EBaseException- is thrown if an error occurs in addition.
-
changePolicyInstanceOrdering
Modifies policy ordering.- Parameters:
policyOrderStr- The comma separated list of instance ids.- Throws:
EBaseException
-