public abstract class ExceptionMapper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.gcube.com.fasterxml.jackson.databind.ObjectMapper |
mapper |
| Constructor and Description |
|---|
ExceptionMapper() |
| Modifier and Type | Method and Description |
|---|---|
static org.gcube.com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
static <RRE extends ResourceRegistryException> |
marshal(RRE object)
Return the String serialization of a given resource
|
static <T extends OutputStream,RRE extends ResourceRegistryException> |
marshal(RRE object,
T stream)
Write the serialization of a given resource to a given
OutputStream . |
static <T extends Writer,RRE extends ResourceRegistryException> |
marshal(RRE object,
T writer)
Write the serialization of a given resource to a given
Writer . |
static <RRE extends ResourceRegistryException> |
unmarshal(Class<RRE> clz,
InputStream stream)
Creates a resource of given class from its serialization in a given
InputStream. |
static <RRE extends ResourceRegistryException> |
unmarshal(Class<RRE> clz,
Reader reader)
Creates a resource of given class from its serialization in a given
Reader. |
static <RRE extends ResourceRegistryException> |
unmarshal(Class<RRE> clz,
String string)
Creates a resource of given class from its serialization in a given String
|
protected static final org.gcube.com.fasterxml.jackson.databind.ObjectMapper mapper
public static org.gcube.com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public static <T extends OutputStream,RRE extends ResourceRegistryException> T marshal(RRE object, T stream) throws org.gcube.com.fasterxml.jackson.core.JsonGenerationException, org.gcube.com.fasterxml.jackson.databind.JsonMappingException, IOException
OutputStream .object - the resourcestream - the stream in inputIOExceptionorg.gcube.com.fasterxml.jackson.databind.JsonMappingExceptionorg.gcube.com.fasterxml.jackson.core.JsonGenerationExceptionpublic static <T extends Writer,RRE extends ResourceRegistryException> T marshal(RRE object, T writer) throws org.gcube.com.fasterxml.jackson.core.JsonGenerationException, org.gcube.com.fasterxml.jackson.databind.JsonMappingException, IOException
Writer .object - the resourcewriter - the writer in inputIOExceptionorg.gcube.com.fasterxml.jackson.databind.JsonMappingExceptionorg.gcube.com.fasterxml.jackson.core.JsonGenerationExceptionpublic static <RRE extends ResourceRegistryException> String marshal(RRE object) throws org.gcube.com.fasterxml.jackson.core.JsonProcessingException
object - the resourceorg.gcube.com.fasterxml.jackson.core.JsonProcessingExceptionpublic static <RRE extends ResourceRegistryException> RRE unmarshal(Class<RRE> clz, Reader reader) throws org.gcube.com.fasterxml.jackson.core.JsonParseException, org.gcube.com.fasterxml.jackson.databind.JsonMappingException, IOException
Reader.clz - the class of the resourcereader - the readerorg.gcube.com.fasterxml.jackson.core.JsonParseExceptionorg.gcube.com.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionpublic static <RRE extends ResourceRegistryException> RRE unmarshal(Class<RRE> clz, InputStream stream) throws org.gcube.com.fasterxml.jackson.core.JsonParseException, org.gcube.com.fasterxml.jackson.databind.JsonMappingException, IOException
InputStream.clz - the class of the resourcestream - the streamIOExceptionorg.gcube.com.fasterxml.jackson.databind.JsonMappingExceptionorg.gcube.com.fasterxml.jackson.core.JsonParseExceptionpublic static <RRE extends ResourceRegistryException> RRE unmarshal(Class<RRE> clz, String string) throws org.gcube.com.fasterxml.jackson.core.JsonParseException, org.gcube.com.fasterxml.jackson.databind.JsonMappingException, IOException
clz - the class of the resourcestring - org.gcube.com.fasterxml.jackson.core.JsonParseExceptionorg.gcube.com.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionCopyright © 2022. All Rights Reserved.