Class UrlParamSerializer

java.lang.Object
io.jmix.flowui.view.navigation.UrlParamSerializer

@Component("flowui_UrlParamSerializer") public class UrlParamSerializer extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • serialize

      public String serialize(Object value)
      Serializes the given value to string representation.

      String, Integer, Long and UUID values are only supported.

      Parameters:
      value - value to serialize
      Returns:
      serialized string representation of given value
      Throws:
      IllegalArgumentException - if null value is passed or it has an unsupported type
    • serializePrimitive

      protected String serializePrimitive(Object value)
    • serializeUuid

      protected String serializeUuid(UUID value)
    • deserialize

      public <T> T deserialize(Class<T> type, String serializedValue)
      Deserializes the given serializedValue as a value with given type.

      String, Integer, Long and UUID ids are only supported.

      Parameters:
      type - value type
      serializedValue - serialized value
      Returns:
      deserialized value
      Throws:
      IllegalArgumentException - if null value and/or type are passed or the given value type is not supported
    • parseString

      protected String parseString(String decoded)
    • parseInteger

      protected Integer parseInteger(String decoded)
    • parseLong

      protected Long parseLong(String decoded)
    • parseUuid

      protected UUID parseUuid(String serializedValue)