|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider org.apache.cxf.jaxrs.provider.XMLBeansElementProvider
@Provider public class XMLBeansElementProvider
Provider for XMLBeans data objects.
Constructor Summary | |
---|---|
XMLBeansElementProvider()
|
Method Summary | |
---|---|
long |
getSize(org.apache.xmlbeans.XmlObject t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt)
|
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 |
isXmlBean(Class type)
Check if a Class is a valid XMLBeans data object. |
protected org.apache.xmlbeans.XmlObject |
parseXmlBean(Class type,
InputStream inStream)
Create an XMLBean data object from an InputStream |
protected org.apache.xmlbeans.XmlObject |
parseXmlBean(Class type,
Reader reader)
Create an XMLBean data object using a stream Reader |
protected org.apache.xmlbeans.XmlObject |
parseXmlBean(Class type,
javax.xml.stream.XMLStreamReader reader)
Create an XMLBean object from an XML stream. |
org.apache.xmlbeans.XmlObject |
readFrom(Class<org.apache.xmlbeans.XmlObject> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType m,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is)
|
void |
writeTo(org.apache.xmlbeans.XmlObject t,
Class<?> cls,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType m,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream entityStream)
|
Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider |
---|
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, 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 |
---|
public XMLBeansElementProvider()
Method Detail |
---|
public org.apache.xmlbeans.XmlObject readFrom(Class<org.apache.xmlbeans.XmlObject> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType m, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<org.apache.xmlbeans.XmlObject>
IOException
public void writeTo(org.apache.xmlbeans.XmlObject t, Class<?> cls, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType m, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream entityStream) throws IOException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<org.apache.xmlbeans.XmlObject>
IOException
public long getSize(org.apache.xmlbeans.XmlObject t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<org.apache.xmlbeans.XmlObject>
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<org.apache.xmlbeans.XmlObject>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<org.apache.xmlbeans.XmlObject>
protected org.apache.xmlbeans.XmlObject parseXmlBean(Class type, javax.xml.stream.XMLStreamReader reader)
type
- declared type of the target objectreader
- stream reader for the XML stream
protected org.apache.xmlbeans.XmlObject parseXmlBean(Class type, InputStream inStream)
InputStream
type
- declared type of the required objectinStream
-
protected org.apache.xmlbeans.XmlObject parseXmlBean(Class type, Reader reader)
Reader
type
- declared type of the desired XMLBean data objectreader
-
protected boolean isXmlBean(Class type)
Class
is a valid XMLBeans data object. The check procedure involves looking
for the Interface XmlObject
in the target type's declaration. Assumed to be sufficient
to identify the type as an XMLBean. From the javadoc (2.3.0) for XmlObject: "Corresponds to the XML
Schema xs:anyType, the base type for all XML Beans."
type
-
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |