|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuxeo.ecm.platform.actions.DefaultActionFilter
public class DefaultActionFilter
| Constructor Summary | |
|---|---|
DefaultActionFilter()
|
|
DefaultActionFilter(String id,
FilterRule[] rules)
|
|
DefaultActionFilter(String id,
FilterRule[] rules,
boolean append)
|
|
| Method Summary | |
|---|---|
boolean |
accept(Action action,
ActionContext context)
Checks whether this action is valid in the given context. |
protected boolean |
checkConditions(Action action,
ActionContext context,
String[] conditions)
Returns true if one of the conditions is verified, else false. |
protected boolean |
checkFacets(Action action,
ActionContext context,
String[] facets)
Returns true if document has one of the given facets, else false. |
protected boolean |
checkPermissions(Action action,
ActionContext context,
String[] permissions)
Returns true if given document has one of the permissions, else false. |
protected boolean |
checkRule(FilterRule rule,
Action action,
ActionContext context)
Returns true if all conditions defined in the rule are true. |
protected boolean |
checkSchemas(Action action,
ActionContext context,
String[] schemas)
Returns true if document has one of the given schemas, else false. |
protected boolean |
checkTypes(Action action,
ActionContext context,
String[] types)
Returns true if document type is one of the given types, else false. |
boolean |
getAppend()
|
String |
getId()
|
FilterRule[] |
getRules()
|
void |
setAppend(boolean append)
|
void |
setId(String id)
|
void |
setRules(FilterRule[] rules)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultActionFilter()
public DefaultActionFilter(String id,
FilterRule[] rules)
public DefaultActionFilter(String id,
FilterRule[] rules,
boolean append)
| Method Detail |
|---|
public String getId()
getId in interface ActionFilterpublic void setId(String id)
setId in interface ActionFilterpublic 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 ActionFilteraction -
protected final boolean checkRule(FilterRule rule,
Action action,
ActionContext context)
protected final boolean checkFacets(Action action,
ActionContext context,
String[] facets)
protected final boolean checkPermissions(Action action,
ActionContext context,
String[] permissions)
If no document is found, return true only if principal is a manager.
protected final boolean checkConditions(Action action,
ActionContext context,
String[] conditions)
If one evaluation fails, return false.
protected final boolean checkTypes(Action action,
ActionContext context,
String[] types)
If document is null, consider context is the server and return true if 'Server' is in the list.
protected final boolean checkSchemas(Action action,
ActionContext context,
String[] schemas)
public boolean getAppend()
public void setAppend(boolean append)
|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||