Class DefaultRuleParameterValueConverter
java.lang.Object
de.hybris.platform.ruleengineservices.rule.strategies.impl.DefaultRuleParameterValueConverter
- All Implemented Interfaces:
RuleParameterValueConverter,org.springframework.beans.factory.InitializingBean
public class DefaultRuleParameterValueConverter
extends Object
implements RuleParameterValueConverter, org.springframework.beans.factory.InitializingBean
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidconfigureAttributes(Map<Object, Object> attributes) protected voidconfigureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) fromString(String value, String type) Converts from String to the required type.protected Class<?>getClassForType(String type) protected com.fasterxml.jackson.databind.ObjectReaderprotected com.fasterxml.jackson.databind.ObjectWriterbooleanprotected com.fasterxml.jackson.databind.JavaTyperesolveJavaType(com.fasterxml.jackson.databind.type.TypeFactory typeFactory, String type) voidsetDebugMode(boolean debugMode) voidsetRuleParameterTypeFormatter(RuleParameterTypeFormatter ruleParameterTypeFormatter) voidsetSupportedTypes(Set<String> supportedTypes) Converts from the required type to String.
-
Field Details
-
ENUM_PATTERN
-
LIST_PATTERN
-
MAP_PATTERN
-
-
Constructor Details
-
DefaultRuleParameterValueConverter
public DefaultRuleParameterValueConverter()
-
-
Method Details
-
getSupportedTypes
-
setSupportedTypes
-
getRuleParameterTypeFormatter
-
setRuleParameterTypeFormatter
-
isDebugMode
public boolean isDebugMode() -
setDebugMode
public void setDebugMode(boolean debugMode) -
getObjectReader
protected com.fasterxml.jackson.databind.ObjectReader getObjectReader() -
getObjectWriter
protected com.fasterxml.jackson.databind.ObjectWriter getObjectWriter() -
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
configureObjectMapper
protected void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
configureAttributes
-
toString
Description copied from interface:RuleParameterValueConverterConverts from the required type to String.- Specified by:
toStringin interfaceRuleParameterValueConverter- Parameters:
value- - the value to be converted to string- Returns:
- the required type converted to String
-
fromString
Description copied from interface:RuleParameterValueConverterConverts from String to the required type.- Specified by:
fromStringin interfaceRuleParameterValueConverter- Parameters:
value- - the string value to be converted- Returns:
- the converted value from string to the required type
-
resolveJavaType
protected com.fasterxml.jackson.databind.JavaType resolveJavaType(com.fasterxml.jackson.databind.type.TypeFactory typeFactory, String type) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
getClassForType
- Throws:
ClassNotFoundException
-