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 Details

    • ROLE

      public static final String ROLE
      The avalon role
  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      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 search
      limit - The maximum number of results per group directory and population
      searchData - 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 used
      availableDirectories - The directories of groups available for search. On first search, all directories will be used
      limit - The maximum number of results per group directory and population
      searchData - 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