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<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>>

@Provider
public class FormEncodingProvider
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>>


Constructor Summary
FormEncodingProvider()
           
 
Method Summary
protected  javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> createMap(java.lang.Class<?> clazz)
           
 long getSize(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> t)
           
 boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
           
protected  void populateMap(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> params, java.io.InputStream is, javax.ws.rs.core.MediaType mt, boolean decode)
          Retrieve map of parameters from the passed in message
 java.lang.Object readFrom(java.lang.Class<java.lang.Object> clazz, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers, java.io.InputStream is)
           
 void setAttachmentDirectory(java.lang.String dir)
           
 void setAttachmentThreshold(java.lang.String threshold)
           
 void setValidator(FormValidator formValidator)
           
protected  void validateMap(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> params)
           
 void writeTo(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> map, java.lang.Class<?> c, java.lang.reflect.Type t, java.lang.annotation.Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> headers, java.io.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

setAttachmentDirectory

public void setAttachmentDirectory(java.lang.String dir)

setAttachmentThreshold

public void setAttachmentThreshold(java.lang.String threshold)

setValidator

public void setValidator(FormValidator formValidator)

isReadable

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

readFrom

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

createMap

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

populateMap

protected void populateMap(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> params,
                           java.io.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<java.lang.String,java.lang.String> params)

getSize

public long getSize(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> t)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>>

isWriteable

public boolean isWriteable(java.lang.Class<?> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>>

writeTo

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

Apache CXF API

Apache CXF