Class AbstractCannedQueryPermissions<R>

java.lang.Object
org.alfresco.query.AbstractCannedQuery<R>
org.alfresco.repo.security.permissions.impl.acegi.AbstractCannedQueryPermissions<R>
All Implemented Interfaces:
org.alfresco.query.CannedQuery<R>
Direct Known Subclasses:
DraftsAndPublishedBlogPostsCannedQuery, GetArchivedNodesCannedQuery, GetAuthoritiesCannedQuery, GetBlogPostsCannedQuery, GetCalendarEntriesCannedQuery, GetChildrenAuditableCannedQuery, GetChildrenCannedQuery, GetChildrenWithTargetAssocsAuditableCannedQuery, GetDiscussionTopcisWithPostsCannedQuery, GetDownloadsCannedQuery, GetNodesWithAspectCannedQuery, SiteContainersCannedQuery

public abstract class AbstractCannedQueryPermissions<R> extends org.alfresco.query.AbstractCannedQuery<R>
Basic support for canned query implementations - permission check
Since:
4.0
Author:
janv
  • Field Summary

    Fields inherited from class org.alfresco.query.AbstractCannedQuery

    parameters, queryExecutionId
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractCannedQueryPermissions(org.alfresco.query.CannedQueryParameters parameters, MethodSecurityBean<R> methodSecurity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<R>
    applyPostQueryPermissions(List<R> results, int requestedCount)
     
    protected Pair<Integer,Integer>
    Overrides the default implementation to check for the permission data that will allow a good guess as to the maximum number of results in the event of a permission-based cut-off.
    protected boolean

    Methods inherited from class org.alfresco.query.AbstractCannedQuery

    applyPostQueryPaging, applyPostQuerySorting, createCannedQueryResults, execute, getParameters, isApplyPostQueryPaging, isApplyPostQuerySorting, queryAndFilter, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AbstractCannedQueryPermissions

      protected AbstractCannedQueryPermissions(org.alfresco.query.CannedQueryParameters parameters, MethodSecurityBean<R> methodSecurity)
  • Method Details

    • isApplyPostQueryPermissions

      protected boolean isApplyPostQueryPermissions()

      By default, the is a permission checking class. Override the method if you wish to switch the behaviour at runtime.

      Overrides:
      isApplyPostQueryPermissions in class org.alfresco.query.AbstractCannedQuery<R>
      Returns:
      true always
    • applyPostQueryPermissions

      protected List<R> applyPostQueryPermissions(List<R> results, int requestedCount)
      Overrides:
      applyPostQueryPermissions in class org.alfresco.query.AbstractCannedQuery<R>
    • getTotalResultCount

      protected Pair<Integer,Integer> getTotalResultCount(List<R> results)
      Overrides the default implementation to check for the permission data that will allow a good guess as to the maximum number of results in the event of a permission-based cut-off.
      Overrides:
      getTotalResultCount in class org.alfresco.query.AbstractCannedQuery<R>