Package org.codelibs.fess.helper
Class LabelTypeHelper
java.lang.Object
org.codelibs.fess.helper.AbstractConfigHelper
org.codelibs.fess.helper.LabelTypeHelper
Helper class for label types.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAn item of a label type.static classA pattern of a label type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<LabelTypeHelper.LabelTypeItem> A list of label type items.protected List<LabelTypeHelper.LabelTypePattern> A list of label type patterns.Fields inherited from class org.codelibs.fess.helper.AbstractConfigHelper
reloadInterval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildLabelTypeItems(List<org.codelibs.fess.opensearch.config.exentity.LabelType> labelTypeList) Builds a list of label type items.protected voidbuildLabelTypePatternList(List<org.codelibs.fess.opensearch.config.exentity.LabelType> labelTypeList) Builds a list of label type patterns.getLabelTypeItemList(SearchRequestParams.SearchRequestType searchRequestType) Returns a list of label type items.getLabelTypeItemList(SearchRequestParams.SearchRequestType searchRequestType, Locale requestLocale) Returns a list of label type items.Returns a set of matched label values.voidinit()Initializes the helper.intload()Load the configuration.protected booleanmatchLocale(Locale requestLocale, Locale targetLocale) Matches the request locale with the target locale.voidRefreshes the label type items and patterns.Methods inherited from class org.codelibs.fess.helper.AbstractConfigHelper
setReloadInterval, update, waitForNext
-
Field Details
-
labelTypeItemList
A list of label type items. -
labelTypePatternList
A list of label type patterns.
-
-
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:AbstractConfigHelperLoad the configuration.- Specified by:
loadin classAbstractConfigHelper- Returns:
- The number of loaded configurations.
-
refresh
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
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
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.
-