public class PolicySet extends java.lang.Object implements IPolicySet
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
PolicySet(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRule(java.lang.String ruleName,
IPolicyRule rule)
Add a policy rule.
|
PolicyResult |
apply(IRequest req)
Apply policies on a given request from a rule set.
|
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 |
printPolicies() |
void |
removeRule(java.lang.String ruleName)
Removes a policy rule identified by the given name.
|
void |
replaceRule(java.lang.String ruleName,
IPolicyRule rule)
Remplaces a policy rule identified by the given name.
|
public java.lang.String getName()
getName in interface IPolicySetpublic int count()
count in interface IPolicySetpublic void addRule(java.lang.String ruleName,
IPolicyRule rule)
addRule in interface IPolicySetruleName - The name of the rule to be added.rule - The rule to be added.public void replaceRule(java.lang.String ruleName,
IPolicyRule rule)
id - The name of the rule to be replaced.rule - The rule to be replaced.public void removeRule(java.lang.String ruleName)
removeRule in interface IPolicySetid - The name of the rule to be removed.public IPolicyRule getRule(java.lang.String ruleName)
getRule in interface IPolicySetid - The name of the rule to be return.public java.util.Enumeration<IPolicyRule> getRules()
getRules in interface IPolicySetpublic PolicyResult apply(IRequest req)
apply in interface IPolicySetreq - The request to apply policies on.public void printPolicies()