com.atlassian.confluence.user
Class DefaultSearchEntitiesManager

java.lang.Object
  extended by com.atlassian.confluence.user.DefaultSearchEntitiesManager
All Implemented Interfaces:
SearchEntitiesManager

public class DefaultSearchEntitiesManager
extends Object
implements SearchEntitiesManager


Field Summary
 
Fields inherited from interface com.atlassian.confluence.user.SearchEntitiesManager
MATCH_ALL, MATCH_ANY
 
Constructor Summary
DefaultSearchEntitiesManager()
           
 
Method Summary
 com.atlassian.user.search.query.Query createUserQuery(List queries, String operator)
           
 List findGroupsAsList(com.atlassian.user.search.query.TermQuery tQuery)
          Find all groups matching a particular query.
 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.
 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(String groupnameTerm)
           
 com.atlassian.user.search.query.TermQuery getTermQuery(String term, 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
 

Constructor Detail

DefaultSearchEntitiesManager

public DefaultSearchEntitiesManager()
Method Detail

findGroupsAsList

public 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 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 on
filterGroups - true will filter out groups the current user is not permitted to see
Throws:
com.atlassian.user.EntityException

findUsersAsList

public 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(String term,
                                                              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 term
termQueryClass - 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(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(List queries,
                                                             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-2013 Atlassian. All Rights Reserved.