public class UserAndGroupSearchManager extends AbstractLogEnabled implements Component, Serviceable
Modifier and Type | Class and Description |
---|---|
private static class |
UserAndGroupSearchManager.DirectorySearchDataResult |
private static class |
UserAndGroupSearchManager.PopulationSearchDataResult |
private static interface |
UserAndGroupSearchManager.SearchDataResult |
Modifier and Type | Field and Description |
---|---|
private static int |
_DEFAULT_COUNT_VALUE |
private static int |
_DEFAULT_OFFSET_VALUE |
private GroupDirectoryContextHelper |
_directoryContextHelper |
private GroupDirectoryDAO |
_groupDirectoryDAO |
private GroupHelper |
_groupHelper |
private PopulationContextHelper |
_populationContextHelper |
private UserHelper |
_userHelper |
private UserManager |
_userManager |
private UserPopulationDAO |
_userPopulationDAO |
static String |
ROLE
The avalon role
|
Constructor and Description |
---|
UserAndGroupSearchManager() |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private static final int _DEFAULT_OFFSET_VALUE
private static final int _DEFAULT_COUNT_VALUE
private UserManager _userManager
private UserHelper _userHelper
private GroupDirectoryDAO _groupDirectoryDAO
private GroupDirectoryContextHelper _directoryContextHelper
private PopulationContextHelper _populationContextHelper
private UserPopulationDAO _userPopulationDAO
private GroupHelper _groupHelper
public UserAndGroupSearchManager()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<String,Object> searchUsersAndGroupByContext(Set<String> contexts, int limit, Map<String,Object> searchData, Map<String,Object> params)
contexts
- The context of the searchlimit
- The maximum number of results per group directory and populationsearchData
- The search data to fetch the next batch of the search. Must be null on the first search.params
- The parameters to pass to the group directories and user populations when retrieving their contentspublic Map<String,Object> searchUsersAndGroup(Set<String> availablePopulations, Set<String> availableDirectories, int limit, Map<String,Object> searchData, Map<String,Object> params)
availablePopulations
- The populations of users available for search. On first search, all populations will be usedavailableDirectories
- The directories of groups available for search. On first search, all directories will be usedlimit
- The maximum number of results per group directory and populationsearchData
- The search data to fetch the next batch of the search. Must be null on the first search.params
- The parameters to pass to the group directories and user populations when retrieving their contentsprivate Map<String,Integer> _getFromSearchData(String property, Map<String,Object> searchData)
private UserAndGroupSearchManager.SearchDataResult _searchUsers(UserPopulation population, int limit, int offset, Map<String,Object> params)
private UserAndGroupSearchManager.SearchDataResult _searchGroups(GroupDirectory directory, int limit, int offset, Map<String,Object> params)
private Map<String,Object> _formatSearchResults(List<Map<String,Object>> results, List<UserAndGroupSearchManager.SearchDataResult> searchDataResults)
private List<Map<String,Object>> _mergeSearchResults(List<UserAndGroupSearchManager.SearchDataResult> searchDataResults)
protected static String _getSortableName(Map<String,Object> o)
o
- The object