1 package com.atlassian.user.search.query;
2
3 import com.atlassian.user.repository.RepositoryIdentifier;
4
5 import java.util.List;
6
7 /**
8 * Indicates the context in which a query should run.
9 */
10 public interface QueryContext
11 {
12 /**
13 * indicates that the Query Context should search in all delegated repositories.
14 *
15 * @deprecated since 2.1 should not be on the interface, use {@link AllRepositoriesQueryContext} to model this behaviour
16 */
17 final String ALL_REPOSITORIES = "_all_repositories_";
18
19 /**
20 * @deprecated since 2.1 should not be on the interface, use {@link DefaultQueryContext#DefaultQueryContext(RepositoryIdentifier...)}
21 */
22 void addRepositoryKey(String key);
23
24 /**
25 * @deprecated since 2.1 use {@link #contains(RepositoryIdentifier)} instead
26 */
27 List<String> getRepositoryKeys();
28
29 /**
30 * Returns {@code true} if the specified repository is in this query context, otherwise {@code false}.
31 *
32 * @since 2.1
33 */
34 boolean contains(RepositoryIdentifier repositoryIdentifier);
35 }