public class ObjectCodecService extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ObjectCodecService.BooleanCodec |
static class |
ObjectCodecService.CalendarCodec |
static class |
ObjectCodecService.DateCodec |
static class |
ObjectCodecService.DocumentAdapterCodec |
static class |
ObjectCodecService.NumberCodec |
static class |
ObjectCodecService.StringCodec |
Constructor and Description |
---|
ObjectCodecService(org.codehaus.jackson.JsonFactory jsonFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addCodec(ObjectCodec<?> codec) |
Map<Class<?>,ObjectCodec<?>> |
codecs() |
Map<String,ObjectCodec<?>> |
codecsByName() |
ObjectCodec<?> |
getCodec(Class<?> objectType) |
ObjectCodec<?> |
getCodec(String name) |
Collection<ObjectCodec<?>> |
getCodecs()
Get all codecs.
|
void |
postInit() |
Object |
read(InputStream in,
ClassLoader cl,
CoreSession session) |
Object |
read(InputStream in,
CoreSession session) |
Object |
read(org.codehaus.jackson.JsonParser jp,
ClassLoader cl,
CoreSession session) |
Object |
read(String json,
ClassLoader cl,
CoreSession session) |
Object |
read(String json,
CoreSession session) |
Object |
readNode(org.codehaus.jackson.JsonNode node,
ClassLoader cl,
CoreSession session) |
Object |
readNode(org.codehaus.jackson.JsonNode node,
CoreSession session) |
void |
removeCodec(Class<?> objectType) |
void |
removeCodec(String name) |
String |
toString(Object object) |
String |
toString(Object object,
boolean preetyPrint) |
void |
write(org.codehaus.jackson.JsonGenerator jg,
Object object) |
void |
write(OutputStream out,
Object object) |
void |
write(OutputStream out,
Object object,
boolean prettyPint) |
public ObjectCodecService(org.codehaus.jackson.JsonFactory jsonFactory)
public void postInit()
public Collection<ObjectCodec<?>> getCodecs()
public void addCodec(ObjectCodec<?> codec)
public void removeCodec(String name)
public void removeCodec(Class<?> objectType)
public ObjectCodec<?> getCodec(Class<?> objectType)
public ObjectCodec<?> getCodec(String name)
public Map<Class<?>,ObjectCodec<?>> codecs()
public Map<String,ObjectCodec<?>> codecsByName()
public String toString(Object object) throws IOException
IOException
public String toString(Object object, boolean preetyPrint) throws IOException
IOException
public void write(OutputStream out, Object object) throws IOException
IOException
public void write(OutputStream out, Object object, boolean prettyPint) throws IOException
IOException
public void write(org.codehaus.jackson.JsonGenerator jg, Object object) throws IOException
IOException
public Object read(String json, CoreSession session) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(String json, ClassLoader cl, CoreSession session) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(InputStream in, CoreSession session) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(InputStream in, ClassLoader cl, CoreSession session) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(org.codehaus.jackson.JsonParser jp, ClassLoader cl, CoreSession session) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object readNode(org.codehaus.jackson.JsonNode node, ClassLoader cl, CoreSession session) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object readNode(org.codehaus.jackson.JsonNode node, CoreSession session) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2013 Nuxeo SA. All Rights Reserved.