Class ObjectCodecService
java.lang.Object
org.nuxeo.ecm.automation.io.services.codec.ObjectCodecService
- Author:
- Bogdan Stefanescu
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<Class<?>, ObjectCodec<?>> protected Map<String, ObjectCodec<?>> protected Map<Class<?>, ObjectCodec<?>> protected Map<String, ObjectCodec<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCodec(ObjectCodec<?> codec) Map<Class<?>, ObjectCodec<?>> codecs()Map<String, ObjectCodec<?>> ObjectCodec<?> ObjectCodec<?> Get all codecs.protected voidinit()voidpostInit()read(com.fasterxml.jackson.core.JsonParser jp, ClassLoader cl, CoreSession session) read(InputStream in, ClassLoader cl, CoreSession session) read(InputStream in, CoreSession session) read(String json, ClassLoader cl, CoreSession session) read(String json, CoreSession session) protected final ObjectreadGenericObject(com.fasterxml.jackson.core.JsonParser jp, String name, ClassLoader cl) readNode(com.fasterxml.jackson.databind.JsonNode node, ClassLoader cl, CoreSession session) readNode(com.fasterxml.jackson.databind.JsonNode node, CoreSession session) voidremoveCodec(Class<?> objectType) voidremoveCodec(String name) voidvoidwrite(OutputStream out, Object object) voidwrite(OutputStream out, Object object, boolean prettyPint) protected final voidwriteGenericObject(com.fasterxml.jackson.core.JsonGenerator jg, Class<?> clazz, Object object)
-
Field Details
-
codecs
-
codecsByName
-
_codecs
-
_codecsByName
-
-
Constructor Details
-
ObjectCodecService
public ObjectCodecService(com.fasterxml.jackson.core.JsonFactory jsonFactory)
-
-
Method Details
-
init
protected void init() -
postInit
public void postInit() -
getCodecs
Get all codecs. -
addCodec
-
removeCodec
-
removeCodec
-
getCodec
-
getCodec
-
codecs
-
codecsByName
-
toString
- Throws:
IOException
-
toString
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
read
- Throws:
IOExceptionClassNotFoundException
-
read
public Object read(String json, ClassLoader cl, CoreSession session) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
read
- Throws:
IOExceptionClassNotFoundException
-
read
public Object read(InputStream in, ClassLoader cl, CoreSession session) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
read
public Object read(com.fasterxml.jackson.core.JsonParser jp, ClassLoader cl, CoreSession session) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
readNode
public Object readNode(com.fasterxml.jackson.databind.JsonNode node, ClassLoader cl, CoreSession session) throws IOException - Throws:
IOException
-
readNode
public Object readNode(com.fasterxml.jackson.databind.JsonNode node, CoreSession session) throws IOException - Throws:
IOException
-
writeGenericObject
protected final void writeGenericObject(com.fasterxml.jackson.core.JsonGenerator jg, Class<?> clazz, Object object) throws IOException - Throws:
IOException
-
readGenericObject
protected final Object readGenericObject(com.fasterxml.jackson.core.JsonParser jp, String name, ClassLoader cl) throws IOException - Throws:
IOException
-