Class JsonRequestReader
java.lang.Object
org.nuxeo.ecm.automation.jaxrs.io.operations.JsonRequestReader
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<ExecutionRequest>
@Provider
public class JsonRequestReader
extends Object
implements javax.ws.rs.ext.MessageBodyReader<ExecutionRequest>
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final HashMap<String,
InputResolver<?>> static final javax.ws.rs.core.MediaType
Deprecated.since 10.3. only 'application/json' media type should be used. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addInputResolver
(InputResolver<?> resolver) boolean
isReadable
(Class<?> arg0, Type arg1, Annotation[] arg2, javax.ws.rs.core.MediaType arg3) readFrom
(Class<ExecutionRequest> arg0, Type arg1, Annotation[] arg2, javax.ws.rs.core.MediaType arg3, javax.ws.rs.core.MultivaluedMap<String, String> headers, InputStream in) static ExecutionRequest
readRequest
(com.fasterxml.jackson.core.JsonParser jp, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) readRequest
(InputStream in, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) readRequest
(String content, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) readRequest0
(String content, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) static Object
resolveInput
(String input)
-
Field Details
-
targetMediaTypeNXReq
Deprecated.since 10.3. only 'application/json' media type should be used. -
inputResolvers
-
-
Constructor Details
-
JsonRequestReader
public JsonRequestReader()
-
-
Method Details
-
getCoreSession
-
addInputResolver
-
resolveInput
- Throws:
IOException
-
isReadable
public boolean isReadable(Class<?> arg0, Type arg1, Annotation[] arg2, javax.ws.rs.core.MediaType arg3) - Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<ExecutionRequest>
-
readFrom
public ExecutionRequest readFrom(Class<ExecutionRequest> arg0, Type arg1, Annotation[] arg2, javax.ws.rs.core.MediaType arg3, javax.ws.rs.core.MultivaluedMap<String, String> headers, InputStream in) throws IOException, javax.ws.rs.WebApplicationException- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<ExecutionRequest>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
readRequest
public ExecutionRequest readRequest(InputStream in, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) throws IOException, javax.ws.rs.WebApplicationException- Throws:
IOException
javax.ws.rs.WebApplicationException
-
readRequest
public ExecutionRequest readRequest(String content, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) throws javax.ws.rs.WebApplicationException- Throws:
javax.ws.rs.WebApplicationException
-
readRequest0
public ExecutionRequest readRequest0(String content, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) throws IOException- Throws:
IOException
-
readRequest
public static ExecutionRequest readRequest(com.fasterxml.jackson.core.JsonParser jp, javax.ws.rs.core.MultivaluedMap<String, String> headers, CoreSession session) throws IOException- Throws:
IOException
-