com.atlassian.crowd.integration.atlassianuser
Class CrowdEntityQueryParser

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

public class CrowdEntityQueryParser
extends java.lang.Object
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  java.util.List<com.atlassian.user.search.query.TermQuery> ensureAllTermQueries(java.util.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  java.util.List<SOAPPrincipal> performAndUserSearch(java.util.List<com.atlassian.user.search.query.TermQuery> queries)
           
protected  java.util.List<SOAPPrincipal> performOrUserSearch(java.util.List<com.atlassian.user.search.query.TermQuery> queries)
           
protected  java.util.List<SOAPPrincipal> performUserSearch(com.atlassian.user.search.query.TermQuery query)
           
protected  SearchRestriction queryAsSearchRestriction(com.atlassian.user.search.query.TermQuery query)
           
protected  java.util.List<com.atlassian.user.Group> searchGroups(com.atlassian.user.search.query.GroupNameTermQuery query)
           
protected  java.util.List<com.atlassian.user.User> searchUsers(com.atlassian.user.search.query.Query query)
           
 
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 java.util.List<com.atlassian.user.Group> searchGroups(com.atlassian.user.search.query.GroupNameTermQuery query)
                                                         throws InvalidAuthorizationTokenException,
                                                                java.rmi.RemoteException
Throws:
InvalidAuthorizationTokenException
java.rmi.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 java.util.List<SOAPPrincipal> performUserSearch(com.atlassian.user.search.query.TermQuery query)
                                                   throws com.atlassian.user.search.query.EntityQueryException,
                                                          InvalidAuthorizationTokenException,
                                                          java.rmi.RemoteException
Throws:
com.atlassian.user.search.query.EntityQueryException
InvalidAuthorizationTokenException
java.rmi.RemoteException

performAndUserSearch

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

performOrUserSearch

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

ensureAllTermQueries

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

searchUsers

protected java.util.List<com.atlassian.user.User> searchUsers(com.atlassian.user.search.query.Query query)
                                                       throws com.atlassian.user.search.query.EntityQueryException,
                                                              InvalidAuthorizationTokenException,
                                                              java.rmi.RemoteException
Throws:
com.atlassian.user.search.query.EntityQueryException
InvalidAuthorizationTokenException
java.rmi.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. All Rights Reserved.