Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.query.test
Class NoFile2SecurityPolicy

java.lang.Object
  extended by org.nuxeo.ecm.core.query.test.NoFileSecurityPolicy
      extended by org.nuxeo.ecm.core.query.test.NoFile2SecurityPolicy
All Implemented Interfaces:
SecurityPolicy

public class NoFile2SecurityPolicy
extends NoFileSecurityPolicy

Dummy security policy denying all access to File objects with a query transformer.

Author:
Florent Guillaume

Nested Class Summary
static class NoFile2SecurityPolicy.NoFileTransformer
          Transformer that adds AND ecm:primaryType <> 'File' to the query.
 
Field Summary
static SQLQuery.Transformer NO_FILE_TRANSFORMER
           
 
Constructor Summary
NoFile2SecurityPolicy()
           
 
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.
 
Methods inherited from class org.nuxeo.ecm.core.query.test.NoFileSecurityPolicy
checkPermission, isRestrictingPermission
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_FILE_TRANSFORMER

public static final SQLQuery.Transformer NO_FILE_TRANSFORMER
Constructor Detail

NoFile2SecurityPolicy

public NoFile2SecurityPolicy()
Method Detail

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
Overrides:
isExpressibleInQuery in class NoFileSecurityPolicy
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
Overrides:
getQueryTransformer in class NoFileSecurityPolicy
Returns:
the transformer

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.