1 package com.atlassian.user.search.query;
2
3 import com.atlassian.user.EntityException;
4 import com.atlassian.user.repository.RepositoryIdentifier;
5 import com.atlassian.user.search.SearchResult;
6
7 /**
8 * Implementations can currently only support one boolean condition
9 */
10 public interface EntityQueryParser
11 {
12 /**
13 * Generates a {@link SearchResult} object holding results for each {@link RepositoryIdentifier} the
14 * the entityQueryParser can access..
15 */
16 SearchResult findUsers(Query query) throws EntityException;
17
18 /**
19 * Generates a {@link SearchResult} object holding results for each {@link RepositoryIdentifier} the
20 * the entityQueryParser can access..
21 */
22 SearchResult findGroups(Query query) throws EntityException;
23
24 /**
25 * Generates a {@link SearchResult} object holding results for each {@link RepositoryIdentifier} the
26 * entityQueryParser has been instructed, via a {@link QueryContext} to search.
27 *
28 * @return returns the search result or null if this entity query parser is out of scope of the context
29 */
30 SearchResult findUsers(Query query, QueryContext context) throws EntityException;
31
32 /**
33 * Generates a {@link SearchResult} object holding results for each {@link RepositoryIdentifier} the
34 * entityQueryParser has been instructed, via a {@link QueryContext} to search.
35 */
36 SearchResult findGroups(Query query, QueryContext context) throws EntityException;
37 }