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
Fields Modifier and Type Field Description protected static HashMap<String,InputResolver<?>>
inputResolvers
static javax.ws.rs.core.MediaType
targetMediaTypeNXReq
Deprecated.since 10.3.
-
Constructor Summary
Constructors Constructor Description JsonRequestReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addInputResolver(InputResolver<?> resolver)
CoreSession
getCoreSession()
boolean
isReadable(Class<?> arg0, Type arg1, Annotation[] arg2, javax.ws.rs.core.MediaType arg3)
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)
static ExecutionRequest
readRequest(com.fasterxml.jackson.core.JsonParser jp, javax.ws.rs.core.MultivaluedMap<String,String> headers, CoreSession session)
ExecutionRequest
readRequest(InputStream in, javax.ws.rs.core.MultivaluedMap<String,String> headers, CoreSession session)
ExecutionRequest
readRequest(String content, javax.ws.rs.core.MultivaluedMap<String,String> headers, CoreSession session)
ExecutionRequest
readRequest0(String content, javax.ws.rs.core.MultivaluedMap<String,String> headers, CoreSession session)
static Object
resolveInput(String input)
-
-
-
Field Detail
-
targetMediaTypeNXReq
@Deprecated public static final javax.ws.rs.core.MediaType targetMediaTypeNXReq
Deprecated.since 10.3. only 'application/json' media type should be used.
-
inputResolvers
protected static final HashMap<String,InputResolver<?>> inputResolvers
-
-
Method Detail
-
getCoreSession
public CoreSession getCoreSession()
-
addInputResolver
public static void addInputResolver(InputResolver<?> resolver)
-
resolveInput
public static Object resolveInput(String input) throws IOException
- 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
-
-