Package org.dogtagpki.legacy.policy
Interface IPolicySet
-
- All Known Implementing Classes:
PolicySet
public interface IPolicySet
Represents a set of policy rules. Policy rules are ordered from lowest priority to highest priority. The priority assignment for rules is not enforced by this interface. Various implementation may use different mechanisms such as a linear ordering of rules in a configuration file or explicit assignment of priority levels ..etc. The policy system initialization needs to deal with reading the rules, sorting them in increasing order of priority and presenting an ordered vector of rules via the IPolicySet interface.NOTE: The Policy Framework has been replaced by the Profile Framework.
- Version:
- $Revision$, $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRule(java.lang.String ruleName, IPolicyRule rule)
Add a policy rule.PolicyResult
apply(IRequest req)
Apply policy rules on a request.int
count()
Returns the no of rules in a set.java.lang.String
getName()
Returns the name of the rule set.IPolicyRule
getRule(java.lang.String ruleName)
Returns the rule identified by a given name.java.util.Enumeration<IPolicyRule>
getRules()
Returns an enumeration of rules.void
removeRule(java.lang.String ruleName)
Removes a policy rule identified by the given name.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the rule set.- Returns:
- The name of the rule set.
-
count
int count()
Returns the no of rules in a set.- Returns:
- the no of rules.
-
addRule
void addRule(java.lang.String ruleName, IPolicyRule rule)
Add a policy rule.- Parameters:
ruleName
- The name of the rule to be added.rule
- The rule to be added.
-
removeRule
void removeRule(java.lang.String ruleName)
Removes a policy rule identified by the given name.- Parameters:
ruleName
- The name of the rule to be removed.
-
getRule
IPolicyRule getRule(java.lang.String ruleName)
Returns the rule identified by a given name.- Parameters:
ruleName
- The name of the rule to be return.- Returns:
- The rule identified by the given name or null if none exists.
-
getRules
java.util.Enumeration<IPolicyRule> getRules()
Returns an enumeration of rules.- Returns:
- An enumeration of rules.
-
apply
PolicyResult apply(IRequest req)
Apply policy rules on a request. This call may modify the request content.- Parameters:
req
- The request to apply policies on.- Returns:
- The policy result.
-
-