Skip to content

Commit

Permalink
SLING-4752 : New query api - throw exception if sorting or paginating…
Browse files Browse the repository at this point in the history
… is requested across providers

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1685363 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cziegeler committed Jun 14, 2015
1 parent 3a2cc7f commit d0646c8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,19 @@ public interface QueryManager {
/**
* Execute the given query in the context of the resource resolver.
*
* In general a search is performed across all resource providers supporting
* search. However, sorting and pagination across providers can't be done in
* a general but fast way, therefore as soon as a query instructions object
* is provided, the search is only performed against a single provider. If
* the query is restricted by path, the provider handling that path is used.
* If potentially more than one provider is targeted and a query instructions
* is provided, an {@code IllegalArgumentException} is thrown.
*
* @param resolver The resource resolver
* @param q The query
* @param qi The optional query instructions
* @return An iterator of resources - the result might be empty.
* @throws IllegalArgumentException If the query is invalid.
*/
@Nonnull Iterator<Resource> find(@Nonnull ResourceResolver resolver,
@Nonnull Query q,
Expand Down

0 comments on commit d0646c8

Please sign in to comment.