Class JSONMarshaller
- java.lang.Object
-
- org.kie.server.api.marshalling.json.JSONMarshaller
-
- All Implemented Interfaces:
Marshaller
public class JSONMarshaller extends Object implements Marshaller
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJSONMarshaller.CNFEBehaviorstatic classJSONMarshaller.JSONContextstatic classJSONMarshaller.PassThruMapStringObjectDeserializerstatic classJSONMarshaller.PassThruSerializerSimple utility Serializer which can be used to override replacement of JaxbUnknownAdapter with WrappingObjectSerializer
-
Field Summary
Fields Modifier and Type Field Description protected Set<Class<?>>classesSetprotected ClassLoaderclassLoaderprotected DateFormatdateFormatprotected com.fasterxml.jackson.databind.ObjectMapperdeserializeObjectMapperprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapper-
Fields inherited from interface org.kie.server.api.marshalling.Marshaller
MARSHALLER_PARAMETER_STRICT
-
-
Constructor Summary
Constructors Constructor Description JSONMarshaller(boolean formatDate)JSONMarshaller(Set<Class<?>> classes, ClassLoader classLoader)JSONMarshaller(Set<Class<?>> classes, ClassLoader classLoader, boolean formatDate)JSONMarshaller(Set<Class<?>> classes, ClassLoader classLoader, boolean formatDate, boolean useStrictJavaBeans)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildMarshaller(Set<Class<?>> classes, ClassLoader classLoader)protected voidconfigureMarshaller(Set<Class<?>> classes, ClassLoader classLoader)voiddispose()ClassLoadergetClassLoader()MarshallingFormatgetFormat()Stringmarshall(Object objectInput)Stringmarshall(Object input, Map<String,Object> parameters)byte[]marshallAsBytes(Object objectInput)protected List<com.fasterxml.jackson.databind.jsontype.NamedType>prepareCustomClasses(Set<Class<?>> classes)voidsetClassLoader(ClassLoader classLoader)<T> Tunmarshall(byte[] serializedInput, Class<T> type)<T> Tunmarshall(String serializedInput, Class<T> type)protected Objectunwrap(Object data)protected Objectwrap(Object data)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kie.server.api.marshalling.Marshaller
unmarshall
-
-
-
-
Field Detail
-
classLoader
protected ClassLoader classLoader
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
deserializeObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper deserializeObjectMapper
-
dateFormat
protected DateFormat dateFormat
-
-
Constructor Detail
-
JSONMarshaller
public JSONMarshaller(boolean formatDate)
-
JSONMarshaller
public JSONMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
-
JSONMarshaller
public JSONMarshaller(Set<Class<?>> classes, ClassLoader classLoader, boolean formatDate)
-
JSONMarshaller
public JSONMarshaller(Set<Class<?>> classes, ClassLoader classLoader, boolean formatDate, boolean useStrictJavaBeans)
-
-
Method Detail
-
buildMarshaller
protected void buildMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
-
configureMarshaller
protected void configureMarshaller(Set<Class<?>> classes, ClassLoader classLoader)
-
prepareCustomClasses
protected List<com.fasterxml.jackson.databind.jsontype.NamedType> prepareCustomClasses(Set<Class<?>> classes)
-
marshall
public String marshall(Object input, Map<String,Object> parameters)
- Specified by:
marshallin interfaceMarshaller
-
marshall
public String marshall(Object objectInput)
- Specified by:
marshallin interfaceMarshaller
-
marshallAsBytes
public byte[] marshallAsBytes(Object objectInput)
- Specified by:
marshallAsBytesin interfaceMarshaller
-
unmarshall
public <T> T unmarshall(String serializedInput, Class<T> type)
- Specified by:
unmarshallin interfaceMarshaller
-
unmarshall
public <T> T unmarshall(byte[] serializedInput, Class<T> type)- Specified by:
unmarshallin interfaceMarshaller
-
dispose
public void dispose()
- Specified by:
disposein interfaceMarshaller
-
getFormat
public MarshallingFormat getFormat()
- Specified by:
getFormatin interfaceMarshaller
-
setClassLoader
public void setClassLoader(ClassLoader classLoader)
- Specified by:
setClassLoaderin interfaceMarshaller
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceMarshaller
-
-