Class ResultItemSetCollector


  • public class ResultItemSetCollector
    extends Object
    Utility to collect ResultItems based on various conditions.
    • Method Detail

      • collectItemsFromExecutionParams

        public static Result collectItemsFromExecutionParams​(javax.jcr.Session session,
                                                             ExecutionParams params)
                                                      throws javax.jcr.RepositoryException
        Collect ResultItems from the given params by picking nodes from the given paths or querying nodes from the given queries.
        Parameters:
        session - JCR session
        params - ExecutionParams instance
        Returns:
        collected ResultItems
        Throws:
        javax.jcr.RepositoryException - if repository exception occurs
      • fillResultItemsForNodePaths

        public static void fillResultItemsForNodePaths​(javax.jcr.Session session,
                                                       Collection<String> nodePaths,
                                                       boolean binary,
                                                       Set<String> pathsCache,
                                                       Result resultOut)
                                                throws javax.jcr.RepositoryException
        Collect nodes from nodePaths with validations and fill ResultItem instances in resultOut.
        Parameters:
        session - JCR session
        nodePaths - document or binary node paths to validate
        binary - flag whether the node paths are for binary content or not
        pathsCache - node path cache set, which can be useful if you want to avoid putting the same items multiple times. This can be null.
        resultOut - Result instance
        Throws:
        javax.jcr.RepositoryException - if repository exception occurs
      • fillResultItemsFromQueries

        public static void fillResultItemsFromQueries​(javax.jcr.Session session,
                                                      Collection<String> queries,
                                                      boolean binary,
                                                      Set<String> pathsCache,
                                                      Result resultOut)
                                               throws javax.jcr.RepositoryException
        Collect nodes by executing the queries with validations and fill ResultItem instances in resultOut.
        Parameters:
        session - JCR session
        queries - JCR query statements for documents or binaries
        binary - flag whether the node paths are for binary content or not
        pathsCache - node path cache set, which can be useful if you want to avoid putting the same items multiple times. This can be null.
        resultOut - Result instance
        Throws:
        javax.jcr.RepositoryException - if repository exception occurs