Apache CXF API

org.apache.cxf.jaxrs.provider.dom4j
Class DOM4JProvider

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

@Produces(value={"application/xml","application/*+xml","text/xml","application/json","application/*+json"})
@Consumes(value={"application/xml","application/*+xml","text/xml","application/json","application/*+json"})
public class DOM4JProvider
extends AbstractConfigurableProvider
implements javax.ws.rs.ext.MessageBodyReader<org.dom4j.Document>, javax.ws.rs.ext.MessageBodyWriter<org.dom4j.Document>


Constructor Summary
DOM4JProvider()
           
 
Method Summary
 long getSize(org.dom4j.Document doc, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
           
 boolean isReadable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
           
 boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
           
 org.dom4j.Document readFrom(Class<org.dom4j.Document> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)
           
 void setProviders(javax.ws.rs.ext.Providers providers)
           
 void writeTo(org.dom4j.Document doc, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os)
           
 
Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOM4JProvider

public DOM4JProvider()
Method Detail

setProviders

@Context
public void setProviders(javax.ws.rs.ext.Providers providers)

isReadable

public boolean isReadable(Class<?> cls,
                          Type type,
                          Annotation[] anns,
                          javax.ws.rs.core.MediaType mt)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<org.dom4j.Document>

readFrom

public org.dom4j.Document readFrom(Class<org.dom4j.Document> cls,
                                   Type type,
                                   Annotation[] anns,
                                   javax.ws.rs.core.MediaType mt,
                                   javax.ws.rs.core.MultivaluedMap<String,String> headers,
                                   InputStream is)
                            throws IOException,
                                   javax.ws.rs.WebApplicationException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<org.dom4j.Document>
Throws:
IOException
javax.ws.rs.WebApplicationException

getSize

public long getSize(org.dom4j.Document doc,
                    Class<?> cls,
                    Type type,
                    Annotation[] anns,
                    javax.ws.rs.core.MediaType mt)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<org.dom4j.Document>

isWriteable

public boolean isWriteable(Class<?> cls,
                           Type type,
                           Annotation[] anns,
                           javax.ws.rs.core.MediaType mt)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<org.dom4j.Document>

writeTo

public void writeTo(org.dom4j.Document doc,
                    Class<?> cls,
                    Type type,
                    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<org.dom4j.Document>
Throws:
IOException
javax.ws.rs.WebApplicationException

Apache CXF API

Apache CXF