Class NoFile2SecurityPolicy
- java.lang.Object
-
- org.nuxeo.ecm.core.security.AbstractSecurityPolicy
-
- org.nuxeo.ecm.core.storage.sql.security.NoFileSecurityPolicy
-
- org.nuxeo.ecm.core.storage.sql.security.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
Nested Classes Modifier and Type Class Description static class
NoFile2SecurityPolicy.NoFileTransformer
Transformer that addsAND ecm:primaryType <> 'File'
to the query.-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.security.SecurityPolicy
SecurityPolicy.IdentityQueryTransformer, SecurityPolicy.QueryTransformer
-
-
Field Summary
Fields Modifier and Type Field Description static SQLQuery.Transformer
NO_FILE_TRANSFORMER
-
Constructor Summary
Constructors Constructor Description NoFile2SecurityPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLQuery.Transformer
getQueryTransformer(String repositoryName)
Get the transformer to use to apply this policy to a query.boolean
isExpressibleInQuery(String repositoryName)
Checks if this policy can be expressed in a query for given repository.-
Methods inherited from class org.nuxeo.ecm.core.storage.sql.security.NoFileSecurityPolicy
checkPermission, isRestrictingPermission
-
Methods inherited from class org.nuxeo.ecm.core.security.AbstractSecurityPolicy
getQueryTransformer, isExpressibleInQuery
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.security.SecurityPolicy
getQueryTransformer, isExpressibleInQuery
-
-
-
-
Field Detail
-
NO_FILE_TRANSFORMER
public static final SQLQuery.Transformer NO_FILE_TRANSFORMER
-
-
Constructor Detail
-
NoFile2SecurityPolicy
public NoFile2SecurityPolicy()
-
-
Method Detail
-
isExpressibleInQuery
public boolean isExpressibleInQuery(String repositoryName)
Description copied from interface:SecurityPolicy
Checks if this policy can be expressed in a query for given repository.If not, then any query made will have to be post-filtered.
- Specified by:
isExpressibleInQuery
in interfaceSecurityPolicy
- Overrides:
isExpressibleInQuery
in classNoFileSecurityPolicy
- Parameters:
repositoryName
- the target repository name.- Returns:
true
if the policy can be expressed in a query
-
getQueryTransformer
public SQLQuery.Transformer getQueryTransformer(String repositoryName)
Description copied from interface:SecurityPolicy
Get the transformer to use to apply this policy to a query.Called only when
SecurityPolicy.isExpressibleInQuery(String)
returnedtrue
- Specified by:
getQueryTransformer
in interfaceSecurityPolicy
- Overrides:
getQueryTransformer
in classNoFileSecurityPolicy
- Parameters:
repositoryName
- the target repository name.- Returns:
- the transformer
-
-