Package org.nuxeo.ecm.core.security
Class AbstractSecurityPolicy
java.lang.Object
org.nuxeo.ecm.core.security.AbstractSecurityPolicy
- All Implemented Interfaces:
SecurityPolicy
- Direct Known Subclasses:
CheckInSecurityPolicy,LockSecurityPolicy,MailMessageSecurityPolicy,NoFileSecurityPolicy,RetentionAndHoldSecurityPolicy
Abstract security policy
- Author:
- Anahide Tchertchian, Florent Guillaume
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.security.SecurityPolicy
SecurityPolicy.IdentityQueryTransformer, SecurityPolicy.QueryTransformer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetQueryTransformer(String repositoryName) Get the transformer to use to apply this policy to a query.getQueryTransformer(String repositoryName, String queryLanguage) Get the string-based 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.booleanisExpressibleInQuery(String repositoryName, String queryLanguage) Checks if this policy can be expressed in a string-based query for given repository.booleanisRestrictingPermission(String permission) Checks if this policy is restricting the given permission.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.ecm.core.security.SecurityPolicy
checkPermission
-
Constructor Details
-
AbstractSecurityPolicy
public AbstractSecurityPolicy()
-
-
Method Details
-
isRestrictingPermission
Description copied from interface:SecurityPolicyChecks if this policy is restricting the given permission.Queries check the BROWSE permission.
- Specified by:
isRestrictingPermissionin interfaceSecurityPolicy- Parameters:
permission- the permission to check for- Returns:
trueif the policy restricts the permission
-
getQueryTransformer
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- Parameters:
repositoryName- the target repository name.- Returns:
- the transformer
-
getQueryTransformer
public SecurityPolicy.QueryTransformer getQueryTransformer(String repositoryName, String queryLanguage) Description copied from interface:SecurityPolicyGet the string-based transformer to use to apply this policy to a query.Called only when
SecurityPolicy.isExpressibleInQuery(String, String)returnedtrue- Specified by:
getQueryTransformerin interfaceSecurityPolicy- Parameters:
repositoryName- the target repository name.- Returns:
- the transformer
-
isExpressibleInQuery
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- Parameters:
repositoryName- the target repository name.- Returns:
trueif the policy can be expressed in a query
-
isExpressibleInQuery
Description copied from interface:SecurityPolicyChecks if this policy can be expressed in a string-based query for given repository.If not, then any query made will have to be post-filtered, if possible, otherwise denied.
- Specified by:
isExpressibleInQueryin interfaceSecurityPolicy- Parameters:
repositoryName- the target repository name.- Returns:
trueif the policy can be expressed in a string-based query
-