Class DefaultRuleMessageFormatStrategy
java.lang.Object
de.hybris.platform.ruleengineservices.rule.strategies.impl.DefaultRuleMessageFormatStrategy
- All Implemented Interfaces:
RuleMessageFormatStrategy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NumberFormatcreateChoiceFormat(String arguments) protected DateFormatcreateDateFormat(String arguments, Locale locale) protected NumberFormatcreateNumberFormat(String arguments, Locale locale) protected DateFormatcreateTimeFormat(String arguments, Locale locale) protected intdecodeDateFormatStyle(String formatStyle) Formats a message with the given parameters and locale.format(String message, Map<String, RuleParameterData> parameters, Locale locale, RuleMessageParameterDecorator parameterDecorator) Formats a message with the given parameters and locale.protected RuleParameterValueNormalizerStrategyprotected FormatresolveFormat(String name, String arguments, Locale locale) protected ObjectresolveValue(RuleParameterData parameter, Locale locale) protected ObjectsanitizeValue(RuleParameterData parameter) voidsetEnumerationService(EnumerationService enumerationService) voidsetL10NService(L10NService l10NService) voidsetRuleParameterValueNormalizerStrategy(RuleParameterValueNormalizerStrategy ruleParameterValueNormalizerStrategy)
-
Field Details
-
UNKNOWN_PARAMETER
- See Also:
-
DEFAULT_FORMAT_STYLE
- See Also:
-
PARAMETER_PATTERN
-
LIST_PATTERN
-
MAP_PATTERN
-
-
Constructor Details
-
DefaultRuleMessageFormatStrategy
public DefaultRuleMessageFormatStrategy()
-
-
Method Details
-
format
Description copied from interface:RuleMessageFormatStrategyFormats a message with the given parameters and locale.- Specified by:
formatin interfaceRuleMessageFormatStrategy- Parameters:
message- - the messageparameters- - the parameterslocale- - the locale- Returns:
- the formatted message
-
format
public String format(String message, Map<String, RuleParameterData> parameters, Locale locale, RuleMessageParameterDecorator parameterDecorator) Description copied from interface:RuleMessageFormatStrategyFormats a message with the given parameters and locale. A parameter decorator can be used to change the message parameters after they were formatted.- Specified by:
formatin interfaceRuleMessageFormatStrategy- Parameters:
message- - the messageparameters- - the parameterslocale- - the localeparameterDecorator- - the parameter decorator- Returns:
- the formatted message
-
resolveValue
-
sanitizeValue
-
resolveFormat
-
createNumberFormat
-
createDateFormat
-
createTimeFormat
-
decodeDateFormatStyle
-
createChoiceFormat
-
getL10NService
-
setL10NService
-
getEnumerationService
-
setEnumerationService
-
getRuleParameterValueNormalizerStrategy
-
setRuleParameterValueNormalizerStrategy
public void setRuleParameterValueNormalizerStrategy(RuleParameterValueNormalizerStrategy ruleParameterValueNormalizerStrategy)
-