Class ResultItemSetCollector
- java.lang.Object
-
- org.onehippo.forge.content.exim.repository.jaxrs.util.ResultItemSetCollector
-
public class ResultItemSetCollector extends Object
Utility to collectResultItem
s based on various conditions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Result
collectItemsFromExecutionParams(javax.jcr.Session session, ExecutionParams params)
CollectResultItem
s from the givenparams
by picking nodes from the given paths or querying nodes from the given queries.static void
fillResultItemsForNodePaths(javax.jcr.Session session, Collection<String> nodePaths, boolean binary, Set<String> pathsCache, Result resultOut)
static void
fillResultItemsFromQueries(javax.jcr.Session session, Collection<String> queries, boolean binary, Set<String> pathsCache, Result resultOut)
-
-
-
Method Detail
-
collectItemsFromExecutionParams
public static Result collectItemsFromExecutionParams(javax.jcr.Session session, ExecutionParams params) throws javax.jcr.RepositoryException
CollectResultItem
s from the givenparams
by picking nodes from the given paths or querying nodes from the given queries.- Parameters:
session
- JCR sessionparams
- ExecutionParams instance- Returns:
- collected
ResultItem
s - 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
- Parameters:
session
- JCR sessionnodePaths
- document or binary node paths to validatebinary
- flag whether the node paths are for binary content or notpathsCache
- 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
- Parameters:
session
- JCR sessionqueries
- JCR query statements for documents or binariesbinary
- flag whether the node paths are for binary content or notpathsCache
- 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
-
-