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 classNoFile2SecurityPolicy.NoFileTransformerTransformer 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.TransformerNO_FILE_TRANSFORMER
-
Constructor Summary
Constructors Constructor Description NoFile2SecurityPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLQuery.TransformergetQueryTransformer(String repositoryName)Get the transformer to use to apply this policy to a query.booleanisExpressibleInQuery(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:SecurityPolicyChecks 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:
isExpressibleInQueryin interfaceSecurityPolicy- Overrides:
isExpressibleInQueryin classNoFileSecurityPolicy- Parameters:
repositoryName- the target repository name.- Returns:
trueif the policy can be expressed in a query
-
getQueryTransformer
public SQLQuery.Transformer getQueryTransformer(String repositoryName)
Description copied from interface:SecurityPolicyGet the transformer to use to apply this policy to a query.Called only when
SecurityPolicy.isExpressibleInQuery(String)returnedtrue- Specified by:
getQueryTransformerin interfaceSecurityPolicy- Overrides:
getQueryTransformerin classNoFileSecurityPolicy- Parameters:
repositoryName- the target repository name.- Returns:
- the transformer
-
-