Class SearchService

java.lang.Object
fr.paris.lutece.portal.service.search.SearchService

public final class SearchService extends Object
The Class SearchService.
  • Field Details

  • Method Details

    • getManageAdvancedParameters

      public static Map<String,Object> getManageAdvancedParameters(AdminUser user, jakarta.servlet.http.HttpServletRequest request)
      Build the advanced parameters management.
      Parameters:
      user - the current admin user
      request - the request
      Returns:
      the model for the advanced parameters
    • getSearchTypesAndLinks

      public static List<Map<String,Object>> getSearchTypesAndLinks()
      Find types managed by each registered indexer and the link to their specific search page
      Returns:
      the model for this list of types and links
    • getSearchTypesAndLinks

      public static List<Map<String,Object>> getSearchTypesAndLinks(Locale locale)
      Find types managed by each registered indexer, their label and the link to their specific search page
      Parameters:
      locale - the locale of the labels
      Returns:
      the model for this list of types, labels and links
    • getSearchTypeLabels

      public static Map<String,String> getSearchTypeLabels(Locale locale)
      Labels of the types of every registered indexer, to show the type of a search result
      Parameters:
      locale - the locale of the labels
      Returns:
      the labels by type, in the order of the indexers
    • getDefaultTypeLabel

      public static String getDefaultTypeLabel(String strType, Locale locale)
      Default label of a search type: the key portal.search.type.<type>, the type lower-cased and every character other than a letter or a digit replaced by an underscore (e.g. portal.search.type.page). When no bundle answers, the type itself with its first letter capitalized.
      Parameters:
      strType - the type
      locale - the locale of the label
      Returns:
      the label of the type, never null
    • resetTypeLabels

      public static void resetTypeLabels()
      Forget the labels of the types already resolved, e.g. after a change of the i18n bundles