public class DefaultSearchEntitiesManager extends Object implements SearchEntitiesManager
MATCH_ALL, MATCH_ANY
Constructor and Description |
---|
DefaultSearchEntitiesManager(PermissionManager permissionManager,
com.atlassian.user.search.query.EntityQueryParser entityQueryParser) |
Modifier and Type | Method and Description |
---|---|
<T extends com.atlassian.user.Entity> |
createUserQuery(List<? extends com.atlassian.user.search.query.Query<T>> queries,
String operator) |
List<com.atlassian.user.Group> |
findGroupsAsList(com.atlassian.user.search.query.TermQuery<com.atlassian.user.Group> tQuery)
Find all groups matching a particular query.
|
List<com.atlassian.user.Group> |
findGroupsAsList(com.atlassian.user.search.query.TermQuery<com.atlassian.user.Group> tQuery,
boolean filterGroups)
Find the groups that match a particular query, optionally filtering out groups not visible to the current
user.
|
List<com.atlassian.user.User> |
findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> userQuery)
Finds users according to the specified query.
|
List<com.atlassian.user.User> |
findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> userQuery,
boolean showUnlicensedUsers)
Find all users matching a particular query.
|
com.atlassian.user.search.query.TermQuery<com.atlassian.user.Group> |
getGroupNameTermQuery(String groupnameTerm) |
<T extends com.atlassian.user.Entity> |
getTermQuery(String term,
Class<? extends com.atlassian.user.search.query.TermQuery<T>> termQueryClass)
Returns an instance of TermQuery based on the passed Class.
|
public DefaultSearchEntitiesManager(PermissionManager permissionManager, com.atlassian.user.search.query.EntityQueryParser entityQueryParser)
public List<com.atlassian.user.Group> findGroupsAsList(com.atlassian.user.search.query.TermQuery<com.atlassian.user.Group> tQuery) throws com.atlassian.user.EntityException
SearchEntitiesManager
findGroupsAsList
in interface SearchEntitiesManager
tQuery
- the query to search oncom.atlassian.user.EntityException
public List<com.atlassian.user.Group> findGroupsAsList(com.atlassian.user.search.query.TermQuery<com.atlassian.user.Group> tQuery, boolean filterGroups) throws com.atlassian.user.EntityException
SearchEntitiesManager
findGroupsAsList
in interface SearchEntitiesManager
tQuery
- the query to search onfilterGroups
- true will filter out groups the current user is not permitted to seecom.atlassian.user.EntityException
public List<com.atlassian.user.User> findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> userQuery) throws com.atlassian.user.EntityException
findUsersAsList
in interface SearchEntitiesManager
userQuery
- the user queryEntity.getName()
will be returned.com.atlassian.user.EntityException
public List<com.atlassian.user.User> findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> userQuery, boolean showUnlicensedUsers) throws com.atlassian.user.EntityException
SearchEntitiesManager
findUsersAsList
in interface SearchEntitiesManager
userQuery
- the user query.showUnlicensedUsers
- whether to only include licensed users in the results.Entity.getName()
will be returned.com.atlassian.user.EntityException
public <T extends com.atlassian.user.Entity> com.atlassian.user.search.query.TermQuery<T> getTermQuery(String term, Class<? extends com.atlassian.user.search.query.TermQuery<T>> termQueryClass) throws com.atlassian.user.search.query.EntityQueryException
For example to retrieve a UserNameTermQuery you can call: getTermQuery(usernameTerm, UserNameTermQuery.class)
getTermQuery
in interface SearchEntitiesManager
term
- The search termtermQueryClass
- The class of the object that should be returnedcom.atlassian.user.search.query.EntityQueryException
public com.atlassian.user.search.query.TermQuery<com.atlassian.user.Group> getGroupNameTermQuery(String groupnameTerm) throws com.atlassian.user.search.query.EntityQueryException
getGroupNameTermQuery
in interface SearchEntitiesManager
com.atlassian.user.search.query.EntityQueryException
public <T extends com.atlassian.user.Entity> com.atlassian.user.search.query.Query<T> createUserQuery(List<? extends com.atlassian.user.search.query.Query<T>> queries, String operator) throws com.atlassian.user.search.query.EntityQueryException
createUserQuery
in interface SearchEntitiesManager
com.atlassian.user.search.query.EntityQueryException
Copyright © 2003–2016 Atlassian. All rights reserved.