Package org.dogtagpki.legacy.policy
Interface IPolicyRule
-
- All Superinterfaces:
IPolicy
- All Known Subinterfaces:
IEnrollmentPolicy,IKeyArchivalPolicy,IKeyRecoveryPolicy,IRenewalPolicy,IRevocationPolicy
- All Known Implementing Classes:
APolicyRule,ManualAuthentication
public interface IPolicyRule extends IPolicy
Interface for a policy rule.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.StringPROP_ENABLEstatic java.lang.StringPROP_IMPLNAMEstatic java.lang.StringPROP_PREDICATE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PolicyResultapply(IRequest req)Applies the policy on the given Request.java.util.Vector<java.lang.String>getDefaultParams()Return default parameters for a policy implementation.java.lang.StringgetDescription()Gets the description for this policy rule.java.lang.StringgetInstanceName()Returns the name of the policy rule instance.java.util.Vector<java.lang.String>getInstanceParams()Return configured parameters for a policy rule instance.java.lang.StringgetName()Returns the name of the policy rule class.IExpressiongetPredicate()Returns the predicate expression for the rule.voidinit(IPolicyProcessor owner, IConfigStore config)Initializes the policy rule.voidsetError(IRequest req, java.lang.String format, java.lang.Object[] params)voidsetInstanceName(java.lang.String instanceName)voidsetPolicyException(IRequest req, EBaseException ex)voidsetPredicate(IExpression exp)Sets a predicate expression for rule matching.
-
-
-
Field Detail
-
PROP_ENABLE
static final java.lang.String PROP_ENABLE
- See Also:
- Constant Field Values
-
PROP_PREDICATE
static final java.lang.String PROP_PREDICATE
- See Also:
- Constant Field Values
-
PROP_IMPLNAME
static final java.lang.String PROP_IMPLNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(IPolicyProcessor owner, IConfigStore config) throws EBaseException
Initializes the policy rule.- Parameters:
config- The config store reference- Throws:
EBaseException
-
getDescription
java.lang.String getDescription()
Gets the description for this policy rule.- Returns:
- The Description for this rule.
-
getName
java.lang.String getName()
Returns the name of the policy rule class.- Returns:
- The name of the policy class.
-
getInstanceName
java.lang.String getInstanceName()
Returns the name of the policy rule instance.- Returns:
- The name of the policy rule instance. If none is set the name of the implementation will be returned.
-
setPredicate
void setPredicate(IExpression exp)
Sets a predicate expression for rule matching.- Parameters:
exp- The predicate expression for the rule.
-
getPredicate
IExpression getPredicate()
Returns the predicate expression for the rule.- Returns:
- The predicate expression for the rule.
-
apply
PolicyResult apply(IRequest req)
Applies the policy on the given Request. This may modify the request appropriately.
-
getInstanceParams
java.util.Vector<java.lang.String> getInstanceParams()
Return configured parameters for a policy rule instance.- Returns:
- nvPairs A Vector of name/value pairs. Each name/value pair is constructed as a String in name=value format.
-
getDefaultParams
java.util.Vector<java.lang.String> getDefaultParams()
Return default parameters for a policy implementation.- Returns:
- nvPairs A Vector of name/value pairs. Each name/value pair is constructed as a String in name=value.
-
setError
void setError(IRequest req, java.lang.String format, java.lang.Object[] params)
-
setInstanceName
void setInstanceName(java.lang.String instanceName)
-
setPolicyException
void setPolicyException(IRequest req, EBaseException ex)
-
-