Class DefaultRuleParameterValueConverter

  • All Implemented Interfaces:
    RuleParameterValueConverter, org.springframework.beans.factory.InitializingBean

    public class DefaultRuleParameterValueConverter
    extends java.lang.Object
    implements RuleParameterValueConverter, org.springframework.beans.factory.InitializingBean
    • Field Detail

      • ENUM_PATTERN

        protected static final java.util.regex.Pattern ENUM_PATTERN
      • LIST_PATTERN

        protected static final java.util.regex.Pattern LIST_PATTERN
      • MAP_PATTERN

        protected static final java.util.regex.Pattern MAP_PATTERN
    • Constructor Detail

      • DefaultRuleParameterValueConverter

        public DefaultRuleParameterValueConverter()
    • Method Detail

      • getSupportedTypes

        public java.util.Set<java.lang.String> getSupportedTypes()
      • setSupportedTypes

        public void setSupportedTypes​(java.util.Set<java.lang.String> supportedTypes)
      • setRuleParameterTypeFormatter

        public void setRuleParameterTypeFormatter​(RuleParameterTypeFormatter ruleParameterTypeFormatter)
      • 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:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • configureObjectMapper

        protected void configureObjectMapper​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      • configureAttributes

        protected void configureAttributes​(java.util.Map<java.lang.Object,​java.lang.Object> attributes)
      • toString

        public java.lang.String toString​(java.lang.Object value)
        Description copied from interface: RuleParameterValueConverter
        Converts from the required type to String.
        Specified by:
        toString in interface RuleParameterValueConverter
        Parameters:
        value - - the value to be converted to string
        Returns:
        the required type converted to String
      • fromString

        public java.lang.Object fromString​(java.lang.String value,
                                           java.lang.String type)
        Description copied from interface: RuleParameterValueConverter
        Converts from String to the required type.
        Specified by:
        fromString in interface RuleParameterValueConverter
        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,
                                                                          java.lang.String type)
                                                                   throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • getClassForType

        protected java.lang.Class<?> getClassForType​(java.lang.String type)
                                              throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException