Package org.ametys.plugins.core.search
Class UserAndGroupSearchManager
- java.lang.Object
 - 
- org.apache.avalon.framework.logger.AbstractLogEnabled
 - 
- org.ametys.plugins.core.search.UserAndGroupSearchManager
 
 
 
- 
- All Implemented Interfaces:
 Component,LogEnabled,Serviceable
public class UserAndGroupSearchManager extends AbstractLogEnabled implements Component, Serviceable
Common helper for user and group searches 
- 
- 
Constructor Summary
Constructors Constructor Description UserAndGroupSearchManager() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String_getSortableName(Map<String,Object> o)Get the sortable name for the json objectMap<String,Object>searchUsersAndGroup(Set<String> availablePopulations, Set<String> availableDirectories, int limit, Map<String,Object> searchData, Map<String,Object> params)Mixed users and groups sorted search, with multiple offsetsMap<String,Object>searchUsersAndGroupByContext(Set<String> contexts, int limit, Map<String,Object> searchData, Map<String,Object> params)Mixed users and groups sorted search, with multiple offsetsvoidservice(ServiceManager manager)- 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
UserAndGroupSearchManager
public UserAndGroupSearchManager()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 
- 
searchUsersAndGroupByContext
public Map<String,Object> searchUsersAndGroupByContext(Set<String> contexts, int limit, Map<String,Object> searchData, Map<String,Object> params)
Mixed users and groups sorted search, with multiple offsets- Parameters:
 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 contents- Returns:
 - An object with the list of results, sorted, and the search data required to fetch the following batch
 
 
- 
searchUsersAndGroup
public Map<String,Object> searchUsersAndGroup(Set<String> availablePopulations, Set<String> availableDirectories, int limit, Map<String,Object> searchData, Map<String,Object> params)
Mixed users and groups sorted search, with multiple offsets- Parameters:
 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 contents- Returns:
 - An object with the list of results, sorted, and the search data required to fetch the following batch
 
 
- 
_getSortableName
protected static String _getSortableName(Map<String,Object> o)
Get the sortable name for the json object- Parameters:
 o- The object- Returns:
 - The sortable name, or an empty string if no name was found
 
 
 - 
 
 -