public class DefaultRuleParameterValueConverter extends Object implements RuleParameterValueConverter
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
ENUM_PATTERN |
protected static Pattern |
LIST_PATTERN |
protected static Pattern |
MAP_PATTERN |
| Constructor and Description |
|---|
DefaultRuleParameterValueConverter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
configureAttributes(Map<Object,Object> attributes) |
protected void |
configureObjectMapper(ObjectMapper objectMapper) |
Object |
fromString(String value,
String type)
Converts from String to the required type.
|
protected Class<?> |
getClassForType(String type) |
protected ObjectReader |
getObjectReader() |
protected ObjectWriter |
getObjectWriter() |
RuleParameterTypeFormatter |
getRuleParameterTypeFormatter() |
Set<String> |
getSupportedTypes() |
boolean |
isDebugMode() |
protected JavaType |
resolveJavaType(TypeFactory typeFactory,
String type) |
void |
setDebugMode(boolean debugMode) |
void |
setRuleParameterTypeFormatter(RuleParameterTypeFormatter ruleParameterTypeFormatter) |
void |
setSupportedTypes(Set<String> supportedTypes) |
String |
toString(Object value)
Converts from the required type to String.
|
protected static final Pattern ENUM_PATTERN
protected static final Pattern LIST_PATTERN
protected static final Pattern MAP_PATTERN
public RuleParameterTypeFormatter getRuleParameterTypeFormatter()
public void setRuleParameterTypeFormatter(RuleParameterTypeFormatter ruleParameterTypeFormatter)
public boolean isDebugMode()
public void setDebugMode(boolean debugMode)
protected ObjectReader getObjectReader()
protected ObjectWriter getObjectWriter()
public void afterPropertiesSet()
protected void configureObjectMapper(ObjectMapper objectMapper)
public String toString(Object value) throws RuleConverterException
RuleParameterValueConvertertoString in interface RuleParameterValueConvertervalue - - the value to be converted to stringRuleConverterExceptionpublic Object fromString(String value, String type) throws RuleConverterException
RuleParameterValueConverterfromString in interface RuleParameterValueConvertervalue - - the string value to be convertedRuleConverterExceptionprotected JavaType resolveJavaType(TypeFactory typeFactory,
String type)
throws ClassNotFoundException,
RuleConverterException
protected Class<?> getClassForType(String type) throws RuleConverterException, ClassNotFoundException
Copyright © 2017 SAP SE. All Rights Reserved.