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.String
PROP_ENABLE
static java.lang.String
PROP_IMPLNAME
static java.lang.String
PROP_PREDICATE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PolicyResult
apply(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.String
getDescription()
Gets the description for this policy rule.java.lang.String
getInstanceName()
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.String
getName()
Returns the name of the policy rule class.IExpression
getPredicate()
Returns the predicate expression for the rule.void
init(IPolicyProcessor owner, IConfigStore config)
Initializes the policy rule.void
setError(IRequest req, java.lang.String format, java.lang.Object[] params)
void
setInstanceName(java.lang.String instanceName)
void
setPolicyException(IRequest req, EBaseException ex)
void
setPredicate(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)
-
-