Class MessageSerializationHelper
java.lang.Object
com.broadleafcommerce.common.messaging.notification.MessageSerializationHelper
Helper class for managing serialized state of message information. Primarily used for working
with
NotificationState.getMessageValue() (and related fields).- Author:
- Jeff Fischer
-
Constructor Summary
ConstructorsConstructorDescriptionMessageSerializationHelper(com.fasterxml.jackson.databind.ObjectMapper fieldChangeMapper) -
Method Summary
Modifier and TypeMethodDescription<T> TgetObjectRepresentation(String json, Class<T> javaType) Get an object version of some JSON.<T> TgetObjectRepresentation(String json, String type) Get an object version of some JSON using a string-based class name.The message information to convert to JSON string.
-
Constructor Details
-
MessageSerializationHelper
public MessageSerializationHelper(com.fasterxml.jackson.databind.ObjectMapper fieldChangeMapper)
-
-
Method Details
-
getObjectRepresentation
Get an object version of some JSON using a string-based class name. If the givenjavaTypeis a String, the originaljsonis return unmodified.- Parameters:
json- JSON to deserializetype- object type used during deserialization- Returns:
- the deserialized object or null if
jsonwas null - See Also:
-
getObjectRepresentation
Get an object version of some JSON. If the givenjavaTypeis a String, the originaljsonis return unmodified.- Parameters:
json- JSON to deserializejavaType- the type to deserialize into- Returns:
- the deserialized object or null if
jsonwas null - See Also:
-
getSerializedRepresentation
The message information to convert to JSON string.- Parameters:
item- The message information- Returns:
- the JSON representation or null if
itemwas null
-