Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.security
Class AbstractSecurityPolicy

java.lang.Object
  extended by org.nuxeo.ecm.core.security.AbstractSecurityPolicy
All Implemented Interfaces:
SecurityPolicy
Direct Known Subclasses:
CheckInSecurityPolicy, LockSecurityPolicy

public abstract class AbstractSecurityPolicy
extends java.lang.Object
implements SecurityPolicy

Abstract security policy

Author:
Anahide Tchertchian, Florent Guillaume

Constructor Summary
AbstractSecurityPolicy()
           
 
Method Summary
 SQLQuery.Transformer getQueryTransformer()
          Get the transformer to use to apply this policy to a query.
 boolean isExpressibleInQuery()
          Checks if this policy can be expressed in a query.
 boolean isRestrictingPermission(java.lang.String permission)
          Checks if this policy is restricting the given permission.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.core.security.SecurityPolicy
checkPermission
 

Constructor Detail

AbstractSecurityPolicy

public AbstractSecurityPolicy()
Method Detail

isRestrictingPermission

public boolean isRestrictingPermission(java.lang.String permission)
Description copied from interface: SecurityPolicy
Checks if this policy is restricting the given permission.

Queries check the BROWSE permission.

Specified by:
isRestrictingPermission in interface SecurityPolicy
Parameters:
permission - the permission to check for
Returns:
true if the policy restricts the permission

isExpressibleInQuery

public boolean isExpressibleInQuery()
Description copied from interface: SecurityPolicy
Checks if this policy can be expressed in a query.

If not, then any query made will have to be post-filtered.

Specified by:
isExpressibleInQuery in interface SecurityPolicy
Returns:
true if the policy can be expressed in a query

getQueryTransformer

public SQLQuery.Transformer getQueryTransformer()
Description copied from interface: SecurityPolicy
Get the transformer to use to apply this policy to a query.

Called only when SecurityPolicy.isExpressibleInQuery() returned true

Specified by:
getQueryTransformer in interface SecurityPolicy
Returns:
the transformer

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.