java.lang.Object
com.broadleafcommerce.data.tracking.core.mapping.validation.rules.DefaultStringValueCodec
All Implemented Interfaces:
StringValueCodec, AutoCloseable

public class DefaultStringValueCodec extends Object implements StringValueCodec
Default implementation of StringValueCodec
Author:
Jeff Fischer
  • Constructor Details

    • DefaultStringValueCodec

      public DefaultStringValueCodec()
  • Method Details

    • encodeValues

      public String encodeValues(String decoded)
      Description copied from interface: StringValueCodec
      Replace all string literal values in the decoded SPEL expression with a group label.
      Specified by:
      encodeValues in interface StringValueCodec
      Parameters:
      decoded - The original expression
      Returns:
      The expression with string literals replaced with a group label
    • decodeValues

      public String decodeValues(String encoded)
      Description copied from interface: StringValueCodec
      Replace all group labels with the original string literal value.
      Specified by:
      decodeValues in interface StringValueCodec
      Parameters:
      encoded - The encoded SPEL expression previously returned by this instance of StringValueCodec.
      Returns:
      The expression with group labels replaced by the original string literals
    • close

      public void close()
      Description copied from interface: StringValueCodec
      Complete any resource allocated during codec usage. This is generally a good spot to assert that all original decoded values were accounted for during decoding.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface StringValueCodec