Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.actions
Class DefaultActionFilter

java.lang.Object
  extended by org.nuxeo.ecm.platform.actions.DefaultActionFilter
All Implemented Interfaces:
java.io.Serializable, ActionFilter

public class DefaultActionFilter
extends java.lang.Object
implements ActionFilter

Author:
Bogdan Stefanescu, Ruslan Spivak, Anahide Tchertchian
See Also:
Serialized Form

Constructor Summary
DefaultActionFilter()
           
DefaultActionFilter(java.lang.String id, FilterRule[] rules)
           
DefaultActionFilter(java.lang.String id, FilterRule[] rules, boolean append)
           
 
Method Summary
 boolean accept(Action action, ActionContext context)
          Checks whether this action is valid in the given context.
 boolean getAppend()
           
 java.lang.String getId()
           
 FilterRule[] getRules()
           
 void setAppend(boolean append)
           
 void setId(java.lang.String id)
           
 void setRules(FilterRule[] rules)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultActionFilter

public DefaultActionFilter()

DefaultActionFilter

public DefaultActionFilter(java.lang.String id,
                           FilterRule[] rules)

DefaultActionFilter

public DefaultActionFilter(java.lang.String id,
                           FilterRule[] rules,
                           boolean append)
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface ActionFilter

setId

public void setId(java.lang.String id)
Specified by:
setId in interface ActionFilter

getRules

public FilterRule[] getRules()

setRules

public void setRules(FilterRule[] rules)

accept

public boolean accept(Action action,
                      ActionContext context)
Checks whether this action is valid in the given 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,...).

Specified by:
accept in interface ActionFilter
Parameters:
action -
Returns:

getAppend

public boolean getAppend()

setAppend

public void setAppend(boolean append)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.