public class DefaultActionFilter extends Object implements ActionFilter, Cloneable
Constructor and Description |
---|
DefaultActionFilter() |
DefaultActionFilter(String id,
FilterRule[] rules) |
DefaultActionFilter(String id,
FilterRule[] rules,
boolean append) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Action action,
ActionContext context)
Checks whether this action is valid in the given context.
|
DefaultActionFilter |
clone() |
boolean |
getAppend() |
String |
getId() |
FilterRule[] |
getRules() |
void |
setAppend(boolean append) |
void |
setId(String id) |
void |
setRules(FilterRule[] rules) |
public DefaultActionFilter()
public DefaultActionFilter(String id, FilterRule[] rules)
public DefaultActionFilter(String id, FilterRule[] rules, boolean append)
public String getId()
getId
in interface ActionFilter
public void setId(String id)
setId
in interface ActionFilter
public FilterRule[] getRules()
public void setRules(FilterRule[] rules)
public boolean accept(Action action, ActionContext context)
The action is considered valid if no denying rule is found and at least one granting rule is found. If no rule is found at all, it is valid.
In other words: OR between granting rules, AND between denying rules, denial is favored (also if exceptions occur), AND inside of rules, OR inside or rule items (type, facet,...).
accept
in interface ActionFilter
public boolean getAppend()
public void setAppend(boolean append)
public DefaultActionFilter clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2011 Nuxeo SA. All Rights Reserved.