Class AbstractSecurityPolicy

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

public abstract class AbstractSecurityPolicy extends Object implements SecurityPolicy
Abstract security policy
Author:
Anahide Tchertchian, Florent Guillaume
  • Constructor Details

    • AbstractSecurityPolicy

      public AbstractSecurityPolicy()
  • Method Details

    • isRestrictingPermission

      public boolean isRestrictingPermission(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
    • 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) returned true

      Specified by:
      getQueryTransformer in interface SecurityPolicy
      Parameters:
      repositoryName - the target repository name.
      Returns:
      the transformer
    • getQueryTransformer

      public SecurityPolicy.QueryTransformer getQueryTransformer(String repositoryName, String queryLanguage)
      Description copied from interface: SecurityPolicy
      Get the string-based transformer to use to apply this policy to a query.

      Called only when SecurityPolicy.isExpressibleInQuery(String, String) returned true

      Specified by:
      getQueryTransformer in interface SecurityPolicy
      Parameters:
      repositoryName - the target repository name.
      Returns:
      the transformer
    • 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 interface SecurityPolicy
      Parameters:
      repositoryName - the target repository name.
      Returns:
      true if the policy can be expressed in a query
    • isExpressibleInQuery

      public boolean isExpressibleInQuery(String repositoryName, String queryLanguage)
      Description copied from interface: SecurityPolicy
      Checks 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:
      isExpressibleInQuery in interface SecurityPolicy
      Parameters:
      repositoryName - the target repository name.
      Returns:
      true if the policy can be expressed in a string-based query