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
Common helper for user and group searches
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
Get the sortable name for the json objectsearchUsersAndGroup
(Set<String> availablePopulations, Set<String> availableDirectories, int limit, Map<String, Object> searchData, Map<String, Object> params, boolean sort) Mixed users and groups sorted search, with multiple offsetssearchUsersAndGroupByContext
(Set<String> contexts, int limit, Map<String, Object> searchData, Map<String, Object> params, boolean sort) Mixed users and groups sorted search, with multiple offsetsvoid
service
(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
The avalon role
-
-
Constructor Details
-
UserAndGroupSearchManager
public UserAndGroupSearchManager()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
searchUsersAndGroupByContext
public Map<String,Object> searchUsersAndGroupByContext(Set<String> contexts, int limit, Map<String, Object> searchData, Map<String, Object> params, boolean sort) 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 contentssort
- true to sort users- 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, boolean sort) 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 contentssort
- true to sort users- Returns:
- An object with the list of results, sorted, and the search data required to fetch the following batch
-
_getSortableName
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
-