Class LabelTypeHelper

java.lang.Object
org.codelibs.fess.helper.AbstractConfigHelper
org.codelibs.fess.helper.LabelTypeHelper

public class LabelTypeHelper extends AbstractConfigHelper
Helper class for label types.
  • Field Details

  • Constructor Details

    • LabelTypeHelper

      public LabelTypeHelper()
      Default constructor.
  • Method Details

    • init

      @PostConstruct public void init()
      Initializes the helper.
    • load

      public int load()
      Description copied from class: AbstractConfigHelper
      Load the configuration.
      Specified by:
      load in class AbstractConfigHelper
      Returns:
      The number of loaded configurations.
    • refresh

      public void refresh(List<org.codelibs.fess.opensearch.config.exentity.LabelType> labelTypeList)
      Refreshes the label type items and patterns.
      Parameters:
      labelTypeList - The list of label types.
    • buildLabelTypeItems

      protected void buildLabelTypeItems(List<org.codelibs.fess.opensearch.config.exentity.LabelType> labelTypeList)
      Builds a list of label type items.
      Parameters:
      labelTypeList - The list of label types.
    • getLabelTypeItemList

      public List<Map<String,String>> getLabelTypeItemList(SearchRequestParams.SearchRequestType searchRequestType)
      Returns a list of label type items.
      Parameters:
      searchRequestType - The search request type.
      Returns:
      A list of label type items.
    • getLabelTypeItemList

      public List<Map<String,String>> getLabelTypeItemList(SearchRequestParams.SearchRequestType searchRequestType, Locale requestLocale)
      Returns a list of label type items.
      Parameters:
      searchRequestType - The search request type.
      requestLocale - The request locale.
      Returns:
      A list of label type items.
    • matchLocale

      protected boolean matchLocale(Locale requestLocale, Locale targetLocale)
      Matches the request locale with the target locale.
      Parameters:
      requestLocale - The request locale.
      targetLocale - The target locale.
      Returns:
      True if the locales match, otherwise false.
    • getMatchedLabelValueSet

      public Set<String> getMatchedLabelValueSet(String path)
      Returns a set of matched label values.
      Parameters:
      path - The path to match.
      Returns:
      A set of matched label values.
    • buildLabelTypePatternList

      protected void buildLabelTypePatternList(List<org.codelibs.fess.opensearch.config.exentity.LabelType> labelTypeList)
      Builds a list of label type patterns.
      Parameters:
      labelTypeList - The list of label types.