Class ScriptPagingDetails


  • public class ScriptPagingDetails
    extends PagingRequest
    A simple paging details wrapper, to hold things like the skip count, max items and total items. This is typically used with Scripts and WebScripts, and feeds into the Repository level paging support. This class is typically used with ModelUtil. Note that org.alfresco.repo.web.util.paging.Paging provides an alternate solution for other paging use cases. TODO Set a value for PagingRequest.setRequestTotalCountMax(int)
    • Constructor Detail

      • ScriptPagingDetails

        public ScriptPagingDetails()
      • ScriptPagingDetails

        public ScriptPagingDetails​(int maxItems,
                                   int skipCount)
      • ScriptPagingDetails

        public ScriptPagingDetails​(int maxItems,
                                   int skipCount,
                                   String queryExecutionId)
      • ScriptPagingDetails

        public ScriptPagingDetails​(PagingRequest paging)
      • ScriptPagingDetails

        public ScriptPagingDetails​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                   int maxResultCount)
                            throws org.springframework.extensions.webscripts.WebScriptException
        Creates a new PagingRequest object (in the form of ScriptPagingDetails), based on the standard URL parameters for webscript paging.
        Parameters:
        req - The request object to extract parameters from
        maxResultCount - The maximum results count if none is specified
        Throws:
        org.springframework.extensions.webscripts.WebScriptException
    • Method Detail

      • buildPagingRequest

        public static PagingRequest buildPagingRequest​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                                       int maxResultCount)
                                                throws org.springframework.extensions.webscripts.WebScriptException
        Creates a new PagingRequest object, based on the standard URL parameters for webscript paging.
        Parameters:
        req - The request object to extract parameters from
        maxResultCount - The maximum results count if none is specified
        Throws:
        org.springframework.extensions.webscripts.WebScriptException
      • getTotalItems

        public int getTotalItems()
        Get the total number of items. See getConfidence() for an idea of the accuracy/confidence on this value.
      • setTotalItems

        public <R> void setTotalItems​(PagingResults<R> results)
        Records the total number of results found, and the confidence in this, from the Paging Results
        Parameters:
        results - The PagingResults to extract the information from