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 |
Modifier and Type | Field and Description |
---|---|
protected Map<Class<?>,ObjectCodec<?>> |
_codecs |
protected Map<String,ObjectCodec<?>> |
_codecsByName |
protected Map<Class<?>,ObjectCodec<?>> |
codecs |
protected Map<String,ObjectCodec<?>> |
codecsByName |
protected static org.apache.commons.logging.Log |
log |
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.
|
protected void |
init() |
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) |
protected Object |
readGenericObject(org.codehaus.jackson.JsonParser jp,
String name,
ClassLoader cl) |
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) |
protected void |
writeGenericObject(org.codehaus.jackson.JsonGenerator jg,
Class<?> clazz,
Object object) |
protected static final org.apache.commons.logging.Log log
protected Map<Class<?>,ObjectCodec<?>> codecs
protected Map<String,ObjectCodec<?>> codecsByName
protected Map<Class<?>,ObjectCodec<?>> _codecs
protected Map<String,ObjectCodec<?>> _codecsByName
public ObjectCodecService(org.codehaus.jackson.JsonFactory jsonFactory)
protected void init()
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
IOException
public Object readNode(org.codehaus.jackson.JsonNode node, CoreSession session) throws IOException
IOException
protected final void writeGenericObject(org.codehaus.jackson.JsonGenerator jg, Class<?> clazz, Object object) throws IOException
IOException
protected final Object readGenericObject(org.codehaus.jackson.JsonParser jp, String name, ClassLoader cl) throws IOException
IOException
Copyright © 2015 Nuxeo SA. All rights reserved.