com.atlassian.crowd.integration.atlassianuser
Class CrowdEntityQueryParser

java.lang.Object
  extended by com.atlassian.user.search.query.AbstractEntityQueryParser
      extended by com.atlassian.crowd.integration.atlassianuser.CrowdEntityQueryParser
All Implemented Interfaces:
com.atlassian.user.search.query.EntityQueryParser

public class CrowdEntityQueryParser
extends com.atlassian.user.search.query.AbstractEntityQueryParser
implements com.atlassian.user.search.query.EntityQueryParser

Performs searching verses the Crowd security server.


Constructor Summary
CrowdEntityQueryParser(com.atlassian.user.UserManager userManager, com.atlassian.user.GroupManager groupManager, com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier)
           
CrowdEntityQueryParser(com.atlassian.user.UserManager userManager, com.atlassian.user.GroupManager groupManager, com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier, UserManager crowdUserManager, GroupManager crowdGroupManager)
           
 
Method Summary
protected  void ensureAllTermQueries(List<com.atlassian.user.search.query.Query> queries)
           
 com.atlassian.user.search.SearchResult findGroups(com.atlassian.user.search.query.Query query)
          Searches the Crowd directory server for a set of groups.
 com.atlassian.user.search.SearchResult findGroups(com.atlassian.user.search.query.Query query, com.atlassian.user.search.query.QueryContext context)
          Searches the Crowd directory server for a set of groups.
 com.atlassian.user.search.SearchResult findUsers(com.atlassian.user.search.query.Query query)
          Searches the Crowd directory server for a set of principals.
 com.atlassian.user.search.SearchResult findUsers(com.atlassian.user.search.query.Query query, com.atlassian.user.search.query.QueryContext context)
          Searches the Crowd directory server for a set of principals.
protected  List<SOAPPrincipal> performAndUserSearch(List<com.atlassian.user.search.query.TermQuery> queries)
           
protected  List<SOAPPrincipal> performOrUserSearch(List<com.atlassian.user.search.query.TermQuery> queries)
           
protected  List<SOAPPrincipal> performUserSearch(com.atlassian.user.search.query.TermQuery query)
           
protected  SearchRestriction queryAsSearchRestriction(com.atlassian.user.search.query.TermQuery query)
           
protected  List<com.atlassian.user.Group> searchGroups(com.atlassian.user.search.query.GroupNameTermQuery query)
           
protected  List<com.atlassian.user.User> searchUsers(com.atlassian.user.search.query.Query query)
           
 
Methods inherited from class com.atlassian.user.search.query.AbstractEntityQueryParser
identifyDefiningQuery, matchQueryToQueryType, validateBooleanToQueryType, validateQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrowdEntityQueryParser

public CrowdEntityQueryParser(com.atlassian.user.UserManager userManager,
                              com.atlassian.user.GroupManager groupManager,
                              com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier)

CrowdEntityQueryParser

public CrowdEntityQueryParser(com.atlassian.user.UserManager userManager,
                              com.atlassian.user.GroupManager groupManager,
                              com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier,
                              UserManager crowdUserManager,
                              GroupManager crowdGroupManager)
Method Detail

findGroups

public com.atlassian.user.search.SearchResult findGroups(com.atlassian.user.search.query.Query query)
                                                  throws com.atlassian.user.EntityException
Searches the Crowd directory server for a set of groups. Supports GroupNameTermQuery only.

Specified by:
findGroups in interface com.atlassian.user.search.query.EntityQueryParser
Parameters:
query - Query restrictions.
Returns:
The search results.
Throws:
com.atlassian.user.EntityException

searchGroups

protected List<com.atlassian.user.Group> searchGroups(com.atlassian.user.search.query.GroupNameTermQuery query)
                                               throws InvalidAuthorizationTokenException,
                                                      RemoteException
Throws:
InvalidAuthorizationTokenException
RemoteException

findUsers

public com.atlassian.user.search.SearchResult findUsers(com.atlassian.user.search.query.Query query,
                                                        com.atlassian.user.search.query.QueryContext context)
                                                 throws com.atlassian.user.EntityException
Searches the Crowd directory server for a set of principals.

Specified by:
findUsers in interface com.atlassian.user.search.query.EntityQueryParser
Parameters:
query - Query restrictions.
context - This attribute is ignored.
Returns:
The search results.
Throws:
com.atlassian.user.EntityException

findGroups

public com.atlassian.user.search.SearchResult findGroups(com.atlassian.user.search.query.Query query,
                                                         com.atlassian.user.search.query.QueryContext context)
                                                  throws com.atlassian.user.EntityException
Searches the Crowd directory server for a set of groups. Supports UserNameTermQuery, EmailTermQuery, FullNameTermQuery and also BooleanQueries that do not comprise of other BooleanQueries.

Specified by:
findGroups in interface com.atlassian.user.search.query.EntityQueryParser
Parameters:
query - Query restrictions.
context - This attribute is ignored.
Returns:
The search results.
Throws:
com.atlassian.user.EntityException

queryAsSearchRestriction

protected SearchRestriction queryAsSearchRestriction(com.atlassian.user.search.query.TermQuery query)
                                              throws com.atlassian.user.search.query.EntityQueryException
Throws:
com.atlassian.user.search.query.EntityQueryException

performUserSearch

protected List<SOAPPrincipal> performUserSearch(com.atlassian.user.search.query.TermQuery query)
                                         throws com.atlassian.user.search.query.EntityQueryException,
                                                InvalidAuthorizationTokenException,
                                                RemoteException
Throws:
com.atlassian.user.search.query.EntityQueryException
InvalidAuthorizationTokenException
RemoteException

performAndUserSearch

protected List<SOAPPrincipal> performAndUserSearch(List<com.atlassian.user.search.query.TermQuery> queries)
                                            throws com.atlassian.user.search.query.EntityQueryException,
                                                   InvalidAuthorizationTokenException,
                                                   RemoteException
Throws:
com.atlassian.user.search.query.EntityQueryException
InvalidAuthorizationTokenException
RemoteException

performOrUserSearch

protected List<SOAPPrincipal> performOrUserSearch(List<com.atlassian.user.search.query.TermQuery> queries)
                                           throws com.atlassian.user.search.query.EntityQueryException,
                                                  InvalidAuthorizationTokenException,
                                                  RemoteException
Throws:
com.atlassian.user.search.query.EntityQueryException
InvalidAuthorizationTokenException
RemoteException

ensureAllTermQueries

protected void ensureAllTermQueries(List<com.atlassian.user.search.query.Query> queries)
                             throws com.atlassian.user.search.query.EntityQueryException
Throws:
com.atlassian.user.search.query.EntityQueryException

searchUsers

protected List<com.atlassian.user.User> searchUsers(com.atlassian.user.search.query.Query query)
                                             throws com.atlassian.user.search.query.EntityQueryException,
                                                    InvalidAuthorizationTokenException,
                                                    RemoteException
Throws:
com.atlassian.user.search.query.EntityQueryException
InvalidAuthorizationTokenException
RemoteException

findUsers

public com.atlassian.user.search.SearchResult findUsers(com.atlassian.user.search.query.Query query)
                                                 throws com.atlassian.user.EntityException
Searches the Crowd directory server for a set of principals.

Specified by:
findUsers in interface com.atlassian.user.search.query.EntityQueryParser
Parameters:
query - Query restrictions.
Returns:
The search results.
Throws:
com.atlassian.user.EntityException


Copyright © 2010 Atlassian Pty Ltd. All Rights Reserved.