Apache CXF API

org.apache.cxf.jaxrs.provider
Class FormEncodingProvider

java.lang.Object
  extended by org.apache.cxf.jaxrs.provider.FormEncodingProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

@Provider
public class FormEncodingProvider
extends Object
implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>


Constructor Summary
FormEncodingProvider()
           
 
Method Summary
protected  javax.ws.rs.core.MultivaluedMap<String,String> createMap(Class<?> clazz)
           
 long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
           
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
           
protected  boolean keepEncoded(Annotation[] anns)
           
protected  void persistParamsOnMessage(javax.ws.rs.core.MultivaluedMap<String,String> params)
           
protected  void populateMap(javax.ws.rs.core.MultivaluedMap<String,String> params, Annotation[] anns, InputStream is, javax.ws.rs.core.MediaType mt, boolean decode)
          Retrieve map of parameters from the passed in message
 Object readFrom(Class<Object> clazz, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)
           
 void setAttachmentDirectory(String dir)
           
 void setAttachmentMaxSize(String maxSize)
           
 void setAttachmentThreshold(String threshold)
           
 void setExpectedEncoded(boolean expect)
           
 void setValidator(FormValidator formValidator)
           
protected  void validateMap(javax.ws.rs.core.MultivaluedMap<String,String> params)
           
 void writeTo(Object obj, Class<?> c, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormEncodingProvider

public FormEncodingProvider()
Method Detail

setExpectedEncoded

public void setExpectedEncoded(boolean expect)

setAttachmentDirectory

public void setAttachmentDirectory(String dir)

setAttachmentThreshold

public void setAttachmentThreshold(String threshold)

setAttachmentMaxSize

public void setAttachmentMaxSize(String maxSize)

setValidator

public void setValidator(FormValidator formValidator)

isReadable

public boolean isReadable(Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mt)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>

readFrom

public Object readFrom(Class<Object> clazz,
                       Type genericType,
                       Annotation[] annotations,
                       javax.ws.rs.core.MediaType mt,
                       javax.ws.rs.core.MultivaluedMap<String,String> headers,
                       InputStream is)
                throws IOException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<Object>
Throws:
IOException

keepEncoded

protected boolean keepEncoded(Annotation[] anns)

persistParamsOnMessage

protected void persistParamsOnMessage(javax.ws.rs.core.MultivaluedMap<String,String> params)

createMap

protected javax.ws.rs.core.MultivaluedMap<String,String> createMap(Class<?> clazz)
                                                            throws Exception
Throws:
Exception

populateMap

protected void populateMap(javax.ws.rs.core.MultivaluedMap<String,String> params,
                           Annotation[] anns,
                           InputStream is,
                           javax.ws.rs.core.MediaType mt,
                           boolean decode)
Retrieve map of parameters from the passed in message

Parameters:
message -

validateMap

protected void validateMap(javax.ws.rs.core.MultivaluedMap<String,String> params)

getSize

public long getSize(Object t,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<Object>

isWriteable

public boolean isWriteable(Class<?> type,
                           Type genericType,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mt)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>

writeTo

public void writeTo(Object obj,
                    Class<?> c,
                    Type t,
                    Annotation[] anns,
                    javax.ws.rs.core.MediaType mt,
                    javax.ws.rs.core.MultivaluedMap<String,Object> headers,
                    OutputStream os)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
Throws:
IOException
javax.ws.rs.WebApplicationException

Apache CXF API

Apache CXF