Package org.dogtagpki.legacy.policy
Interface IPolicyProcessor
-
- All Superinterfaces:
IPolicy
,ISubsystem
public interface IPolicyProcessor extends ISubsystem, IPolicy
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 Modifier and Type Field Description static java.lang.String
PROP_CLASS
static java.lang.String
PROP_DEF_POLICIES
static java.lang.String
PROP_ENABLE
static java.lang.String
PROP_IMPL
static java.lang.String
PROP_IMPL_NAME
static java.lang.String
PROP_ORDER
static java.lang.String
PROP_PREDICATE
static java.lang.String
PROP_RULE
static java.lang.String
PROP_UNDELETABLE_POLICIES
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPolicyImpl(java.lang.String id, java.lang.String classPath)
Adds a policy implementation identified by an impl id.void
addPolicyInstance(java.lang.String id, java.util.Hashtable<java.lang.String,java.lang.String> ht)
Adds a policy instancevoid
changePolicyInstanceOrdering(java.lang.String policyOrderStr)
Modifies policy ordering.void
deletePolicyImpl(java.lang.String id)
Deletes a policy implementation identified by an impl id.void
deletePolicyInstance(java.lang.String id)
Deletes a policy instance identified by an instance id.ISubsystem
getAuthority()
IPolicyRule
getPolicyImpl(java.lang.String id)
Returns an implementation identified by a given id.java.util.Vector<java.lang.String>
getPolicyImplConfig(java.lang.String id)
Returns configuration for an implmentation.java.util.Enumeration<IPolicyRule>
getPolicyImpls()
Returns the rule implementations registered with this processor.java.util.Enumeration<java.lang.String>
getPolicyImplsInfo()
Returns information on Policy impls.IPolicyRule
getPolicyInstance(java.lang.String id)
Returns instance configuration for a given instance id.java.util.Vector<java.lang.String>
getPolicyInstanceConfig(java.lang.String id)
Returns instance configuration for a given instance id.java.util.Enumeration<IPolicyRule>
getPolicyInstances()
Returns policy instances registered with this processor.java.util.Enumeration<java.lang.String>
getPolicyInstancesInfo()
Returns information on Policy instances.java.lang.String
getPolicySubstoreId()
Returns the policy substore id.void
modifyPolicyInstance(java.lang.String id, java.util.Hashtable<java.lang.String,java.lang.String> ht)
Modifies a policy instance-
Methods inherited from interface com.netscape.certsrv.base.ISubsystem
getConfigStore, getId, init, setId, shutdown, startup
-
-
-
-
Field Detail
-
PROP_DEF_POLICIES
static final java.lang.String PROP_DEF_POLICIES
- See Also:
- Constant Field Values
-
PROP_UNDELETABLE_POLICIES
static final java.lang.String PROP_UNDELETABLE_POLICIES
- See Also:
- Constant Field Values
-
PROP_ENABLE
static final java.lang.String PROP_ENABLE
- See Also:
- Constant Field Values
-
PROP_RULE
static final java.lang.String PROP_RULE
- See Also:
- Constant Field Values
-
PROP_CLASS
static final java.lang.String PROP_CLASS
- See Also:
- Constant Field Values
-
PROP_IMPL_NAME
static final java.lang.String PROP_IMPL_NAME
- See Also:
- Constant Field Values
-
PROP_PREDICATE
static final java.lang.String PROP_PREDICATE
- See Also:
- Constant Field Values
-
PROP_IMPL
static final java.lang.String PROP_IMPL
- See Also:
- Constant Field Values
-
PROP_ORDER
static final java.lang.String PROP_ORDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAuthority
ISubsystem getAuthority()
-
getPolicySubstoreId
java.lang.String getPolicySubstoreId()
Returns the policy substore id.- Returns:
- storeID The policy store id used by this processor.
-
getPolicyImplsInfo
java.util.Enumeration<java.lang.String> 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
java.util.Enumeration<IPolicyRule> getPolicyImpls()
Returns the rule implementations registered with this processor.- Returns:
- An Enumeration of uninitialized IPolicyRule objects.
-
getPolicyImpl
IPolicyRule getPolicyImpl(java.lang.String id)
Returns an implementation identified by a given id.- Parameters:
id
- The implementation id.- Returns:
- The uninitialized instance of the policy rule.
-
getPolicyImplConfig
java.util.Vector<java.lang.String> getPolicyImplConfig(java.lang.String id)
Returns configuration for an implmentation.- Parameters:
id
- The implementation id.- Returns:
- A vector of name/value pairs in the form of name=value.
-
deletePolicyImpl
void deletePolicyImpl(java.lang.String id) throws EBaseException
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
void addPolicyImpl(java.lang.String id, java.lang.String classPath) throws EBaseException
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
java.util.Enumeration<java.lang.String> getPolicyInstancesInfo()
Returns information on Policy instances.- Returns:
- An Enumeration of Strings describing the information about policy rule instances.
-
getPolicyInstances
java.util.Enumeration<IPolicyRule> getPolicyInstances()
Returns policy instances registered with this processor.- Returns:
- An Enumeration of policy instances.
-
getPolicyInstanceConfig
java.util.Vector<java.lang.String> getPolicyInstanceConfig(java.lang.String id)
Returns instance configuration for a given instance id.- Parameters:
id
- The rule id.- Returns:
- A vector of name/value pairs in the form of name=value.
-
getPolicyInstance
IPolicyRule getPolicyInstance(java.lang.String id)
Returns instance configuration for a given instance id.- Parameters:
id
- The rule id.- Returns:
- the policy instance identified by the id.
-
deletePolicyInstance
void deletePolicyInstance(java.lang.String id) throws EBaseException
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
void addPolicyInstance(java.lang.String id, java.util.Hashtable<java.lang.String,java.lang.String> ht) throws EBaseException
Adds 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
void modifyPolicyInstance(java.lang.String id, java.util.Hashtable<java.lang.String,java.lang.String> ht) throws EBaseException
Modifies 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
void changePolicyInstanceOrdering(java.lang.String policyOrderStr) throws EBaseException
Modifies policy ordering.- Parameters:
policyOrderStr
- The comma separated list of instance ids.- Throws:
EBaseException
-
-