Class CustomValueConverter
- java.lang.Object
-
- com.commercetools.sync.commons.utils.CustomValueConverter
-
public final class CustomValueConverter extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CustomValueConverter()
-
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.
-
-
-
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
andCustomFieldsDraft
, or to check equality ofCustomObject
's values andCustomObjectDraft
'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.
-
-