com.atlassian.confluence.user
Class DefaultSearchEntitiesManager
java.lang.Object
com.atlassian.confluence.user.DefaultSearchEntitiesManager
- All Implemented Interfaces:
- SearchEntitiesManager
public class DefaultSearchEntitiesManager
- extends java.lang.Object
- implements SearchEntitiesManager
Method Summary |
com.atlassian.user.search.query.Query |
createUserQuery(java.util.List queries,
java.lang.String operator)
|
java.util.List |
findGroupsAsList(com.atlassian.user.search.query.TermQuery tQuery)
Find all groups matching a particular query. |
java.util.List |
findGroupsAsList(com.atlassian.user.search.query.TermQuery tQuery,
boolean filterGroups)
Find the groups that match a particular query, optionally filtering out groups not visible to the current
user. |
java.util.List<com.atlassian.user.User> |
findUsersAsList(com.atlassian.user.search.query.Query userQuery)
Finds users according to the specified query. |
com.atlassian.user.search.query.TermQuery |
getGroupNameTermQuery(java.lang.String groupnameTerm)
|
com.atlassian.user.search.query.TermQuery |
getTermQuery(java.lang.String term,
java.lang.Class termQueryClass)
Returns an instance of TermQuery based on the passed Class. |
void |
setEntityQueryParser(com.atlassian.user.search.query.EntityQueryParser entityQueryParser)
|
void |
setUserAccessor(UserAccessor userAccessor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSearchEntitiesManager
public DefaultSearchEntitiesManager()
findGroupsAsList
public java.util.List findGroupsAsList(com.atlassian.user.search.query.TermQuery tQuery)
throws com.atlassian.user.EntityException
- Description copied from interface:
SearchEntitiesManager
- Find all groups matching a particular query.
- Specified by:
findGroupsAsList
in interface SearchEntitiesManager
- Parameters:
tQuery
- the query to search on
- Throws:
com.atlassian.user.EntityException
findGroupsAsList
public java.util.List findGroupsAsList(com.atlassian.user.search.query.TermQuery tQuery,
boolean filterGroups)
throws com.atlassian.user.EntityException
- Description copied from interface:
SearchEntitiesManager
- Find the groups that match a particular query, optionally filtering out groups not visible to the current
user. The filterGroups argument will only make a difference if the Confluence server is running in shared
mode.
- Specified by:
findGroupsAsList
in interface SearchEntitiesManager
- Parameters:
tQuery
- the query to search onfilterGroups
- true will filter out groups the current user is not permitted to see
- Throws:
com.atlassian.user.EntityException
findUsersAsList
public java.util.List<com.atlassian.user.User> findUsersAsList(com.atlassian.user.search.query.Query userQuery)
throws com.atlassian.user.EntityException
- Finds users according to the specified query.
- Specified by:
findUsersAsList
in interface SearchEntitiesManager
- Parameters:
userQuery
- the user query
- Returns:
- a list of users. No two users with the same name (that is,
Entity.getName()
will be returned.
- Throws:
com.atlassian.user.EntityException
getTermQuery
public com.atlassian.user.search.query.TermQuery getTermQuery(java.lang.String term,
java.lang.Class termQueryClass)
throws com.atlassian.user.search.query.EntityQueryException
- Returns an instance of TermQuery based on the passed Class.
For example to retrieve a UserNameTermQuery you can call: getTermQuery(usernameTerm, UserNameTermQuery.class)
- Specified by:
getTermQuery
in interface SearchEntitiesManager
- Parameters:
term
- The search termtermQueryClass
- The class of the object that should be returned
- Returns:
- An object which implements the TermQuery interface
- Throws:
com.atlassian.user.search.query.EntityQueryException
getGroupNameTermQuery
public com.atlassian.user.search.query.TermQuery getGroupNameTermQuery(java.lang.String groupnameTerm)
throws com.atlassian.user.search.query.EntityQueryException
- Specified by:
getGroupNameTermQuery
in interface SearchEntitiesManager
- Throws:
com.atlassian.user.search.query.EntityQueryException
createUserQuery
public com.atlassian.user.search.query.Query createUserQuery(java.util.List queries,
java.lang.String operator)
throws com.atlassian.user.search.query.EntityQueryException
- Specified by:
createUserQuery
in interface SearchEntitiesManager
- Throws:
com.atlassian.user.search.query.EntityQueryException
setEntityQueryParser
public void setEntityQueryParser(com.atlassian.user.search.query.EntityQueryParser entityQueryParser)
setUserAccessor
public void setUserAccessor(UserAccessor userAccessor)
Copyright © 2003-2014 Atlassian. All Rights Reserved.