Class CustomValueConverter


  • public final class CustomValueConverter
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.fasterxml.jackson.databind.JsonNode convertCustomValueObjDataToJsonNode​(java.lang.Object data)
      Takes a value of type Object and converts to JSONNode.
      static boolean isValidTextNode​(com.fasterxml.jackson.databind.JsonNode node)
      Takes a value of type JsonNode and checks if it's a valid string value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomValueConverter

        public CustomValueConverter()
    • Method Detail

      • convertCustomValueObjDataToJsonNode

        @Nullable
        public static com.fasterxml.jackson.databind.JsonNode convertCustomValueObjDataToJsonNode​(@Nullable
                                                                                                  java.lang.Object data)
        Takes a value of type Object and converts to JSONNode.

        This can be helpful to compare values of CustomFields and CustomFieldsDraft, or to check equality of CustomObject's values and CustomObjectDraft's values.

        Parameters:
        data - a value of any Object-type
        Returns:
        the given value converted to JsonNode or null
      • isValidTextNode

        public static boolean isValidTextNode​(@Nullable
                                              com.fasterxml.jackson.databind.JsonNode node)
        Takes a value of type JsonNode and checks if it's a valid string value.
        Parameters:
        node - - a jsonNode which might contain text
        Returns:
        true if the given node is not null, not blank and does not contain a "null" value.