Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.automation.server.jaxrs.io
Class JsonRequestReader

java.lang.Object
  extended by org.nuxeo.ecm.automation.server.jaxrs.io.JsonRequestReader
All Implemented Interfaces:
MessageBodyReader<ExecutionRequest>

@Provider
public class JsonRequestReader
extends Object
implements MessageBodyReader<ExecutionRequest>

Author:
Bogdan Stefanescu

Field Summary
static MediaType targetMediaType
           
 
Constructor Summary
JsonRequestReader()
           
 
Method Summary
static void addInputResolver(InputResolver<?> resolver)
           
 boolean isReadable(Class<?> arg0, Type arg1, Annotation[] arg2, MediaType arg3)
           
 ExecutionRequest readFrom(Class<ExecutionRequest> arg0, Type arg1, Annotation[] arg2, MediaType arg3, MultivaluedMap<String,String> headers, InputStream in)
           
static ExecutionRequest readRequest(InputStream in, MultivaluedMap<String,String> headers)
           
static ExecutionRequest readRequest(String content, MultivaluedMap<String,String> headers)
           
static ExecutionRequest readRequest0(String content, MultivaluedMap<String,String> headers)
           
static Object resolveInput(String input)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetMediaType

public static final MediaType targetMediaType
Constructor Detail

JsonRequestReader

public JsonRequestReader()
Method Detail

addInputResolver

public static void addInputResolver(InputResolver<?> resolver)

resolveInput

public static Object resolveInput(String input)
                           throws Exception
Throws:
Exception

isReadable

public boolean isReadable(Class<?> arg0,
                          Type arg1,
                          Annotation[] arg2,
                          MediaType arg3)
Specified by:
isReadable in interface MessageBodyReader<ExecutionRequest>

readFrom

public ExecutionRequest readFrom(Class<ExecutionRequest> arg0,
                                 Type arg1,
                                 Annotation[] arg2,
                                 MediaType arg3,
                                 MultivaluedMap<String,String> headers,
                                 InputStream in)
                          throws IOException,
                                 WebApplicationException
Specified by:
readFrom in interface MessageBodyReader<ExecutionRequest>
Throws:
IOException
WebApplicationException

readRequest

public static ExecutionRequest readRequest(InputStream in,
                                           MultivaluedMap<String,String> headers)
                                    throws IOException
Throws:
IOException

readRequest

public static ExecutionRequest readRequest(String content,
                                           MultivaluedMap<String,String> headers)
                                    throws WebApplicationException
Throws:
WebApplicationException

readRequest0

public static ExecutionRequest readRequest0(String content,
                                            MultivaluedMap<String,String> headers)
                                     throws Exception
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.