@Produces(value={"application/xml","application/*+xml","text/xml"}) @Consumes(value={"application/xml","application/*+xml","text/xml"}) @Provider public class JAXBElementProvider<T> extends AbstractJAXBProvider<T>
AbstractJAXBProvider.CollectionWrapper, AbstractJAXBProvider.JAXBCollectionWrapperReader
classContexts, collectionContextClasses, inAppendMap, inDropElements, inElementsMap, jaxbElementClassMap, marshalAsJaxbElement, NS_MAPPER_PROPERTY_RI, NS_MAPPER_PROPERTY_RI_INT, outAppendMap, outDropElements, outElementsMap, packageContexts, unmarshalAsJaxbElement, xmlTypeAsJaxbElementOnly
BUNDLE, LOG
Constructor and Description |
---|
JAXBElementProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttachmentMarshaller(Marshaller ms) |
protected void |
addAttachmentUnmarshaller(Unmarshaller um) |
protected boolean |
canBeReadAsJaxbElement(Class<?> type) |
protected Object |
doUnmarshal(Unmarshaller unmarshaller,
Class<?> type,
InputStream is,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
protected XMLStreamReader |
getStreamReader(InputStream is,
Class<?> type,
javax.ws.rs.core.MediaType mt) |
protected XMLStreamWriter |
getStreamWriter(Object obj,
OutputStream os,
javax.ws.rs.core.MediaType mt) |
protected void |
marshal(Object obj,
Class<?> cls,
Type genericType,
String enc,
OutputStream os,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
Marshaller ms) |
protected void |
marshal(Object obj,
Class<?> cls,
Type genericType,
String enc,
OutputStream os,
javax.ws.rs.core.MediaType mt) |
protected void |
marshal(Object obj,
Class<?> cls,
Type genericType,
String enc,
OutputStream os,
javax.ws.rs.core.MediaType mt,
Annotation[] anns) |
protected void |
marshalCollection(Class<?> originalCls,
Object collection,
Type genericType,
String enc,
OutputStream os,
javax.ws.rs.core.MediaType m,
Annotation[] anns) |
protected void |
marshalCollectionMember(Object obj,
Class<?> cls,
Type genericType,
String enc,
OutputStream os,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
String ns) |
protected void |
marshalToOutputStream(Marshaller ms,
Object obj,
OutputStream os,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
protected void |
marshalToWriter(Marshaller ms,
Object obj,
XMLStreamWriter writer,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
protected boolean |
objectFactoryOrIndexAvailable(Class<?> type) |
T |
readFrom(Class<T> type,
Type genericType,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
protected String |
resolveXMLResourceURI(String path) |
void |
setMarshallerProperties(Map<String,Object> marshallProperties) |
void |
setMessageContext(MessageContext mc) |
void |
setNamespacePrefixes(Map<String,String> prefixes) |
void |
setSchemaLocation(String schemaLocation) |
protected void |
setXmlPiProperty(Marshaller ms,
String value) |
void |
setXmlPiPropertyName(String xmlPiPropertyName) |
void |
setXmlResourceOffset(String value) |
protected Object |
unmarshalFromInputStream(Unmarshaller unmarshaller,
InputStream is,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
protected Object |
unmarshalFromReader(Unmarshaller unmarshaller,
XMLStreamReader reader,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
void |
writeTo(T obj,
Class<?> cls,
Type genericType,
Annotation[] anns,
javax.ws.rs.core.MediaType m,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
checkAdapter, clearContexts, configureReaderRestrictions, convertToJaxbElementIfNeeded, createDepthReaderIfNeeded, createMarshaller, createTransformReaderIfNeeded, createTransformWriterIfNeeded, createUnmarshaller, createUnmarshaller, getActualType, getClassContext, getClassContext, getCollectionContext, getCollectionWrapperQName, getContext, getDepthProperties, getJAXBContext, getJaxbElementClass, getJaxbQName, getPackageContext, getPackageContext, getSchema, getSchema, getSize, getStreamHandlerFromCurrentMessage, handleExceptionEnd, handleExceptionStart, handleJAXBException, handleXMLStreamException, init, isReadable, isSkipJaxbChecks, isSupported, isWriteable, isXmlRoot, isXmlType, setAttributesToElements, setCatalogLocation, setCollectionWrapperMap, setCollectionWrapperName, setContext, setContextProperties, setDepthProperties, setExtraClass, setInAppendElements, setInDropElements, setInTransformElements, setJaxbElementClassMap, setJaxbElementClassNames, setMarshallAsJaxbElement, setMarshallerListener, setMarshallerProp, setNamespaceMapper, setNamespaceMapperPropertyName, setOutAppendElements, setOutDropElements, setOutTransformElements, setSchema, setSchemaHandler, setSchemaHandlers, setSchemaLocations, setSingleJaxbContext, setSkipJaxbChecks, setUnmarshallAsJaxbElement, setUnmarshallerListener, setUnmarshallerProperties, setUseSingleContextForPackages, setValidateBeforeWrite, setValidateInput, setValidateOutput, setValidationHandler, setXmlRootAsJaxbElement, setXmlTypeAsJaxbElementOnly, validateObjectIfNeeded, writeTo
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
protected boolean objectFactoryOrIndexAvailable(Class<?> type)
objectFactoryOrIndexAvailable
in class AbstractJAXBProvider<T>
public void setXmlResourceOffset(String value)
protected void setXmlPiProperty(Marshaller ms, String value) throws Exception
Exception
protected boolean canBeReadAsJaxbElement(Class<?> type)
canBeReadAsJaxbElement
in class AbstractJAXBProvider<T>
@Context public void setMessageContext(MessageContext mc)
public void setSchemaLocation(String schemaLocation)
public T readFrom(Class<T> type, Type genericType, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException
IOException
protected Object doUnmarshal(Unmarshaller unmarshaller, Class<?> type, InputStream is, Annotation[] anns, javax.ws.rs.core.MediaType mt) throws JAXBException
JAXBException
protected XMLStreamReader getStreamReader(InputStream is, Class<?> type, javax.ws.rs.core.MediaType mt)
protected Object unmarshalFromInputStream(Unmarshaller unmarshaller, InputStream is, Annotation[] anns, javax.ws.rs.core.MediaType mt) throws JAXBException
JAXBException
protected Object unmarshalFromReader(Unmarshaller unmarshaller, XMLStreamReader reader, Annotation[] anns, javax.ws.rs.core.MediaType mt) throws JAXBException
JAXBException
public void writeTo(T obj, Class<?> cls, Type genericType, Annotation[] anns, javax.ws.rs.core.MediaType m, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException
IOException
protected void marshalCollection(Class<?> originalCls, Object collection, Type genericType, String enc, OutputStream os, javax.ws.rs.core.MediaType m, Annotation[] anns) throws Exception
Exception
protected void marshalCollectionMember(Object obj, Class<?> cls, Type genericType, String enc, OutputStream os, Annotation[] anns, javax.ws.rs.core.MediaType mt, String ns) throws Exception
Exception
protected void marshal(Object obj, Class<?> cls, Type genericType, String enc, OutputStream os, javax.ws.rs.core.MediaType mt) throws Exception
Exception
protected void marshal(Object obj, Class<?> cls, Type genericType, String enc, OutputStream os, javax.ws.rs.core.MediaType mt, Annotation[] anns) throws Exception
Exception
protected void addAttachmentMarshaller(Marshaller ms)
protected void addAttachmentUnmarshaller(Unmarshaller um)
protected final void marshal(Object obj, Class<?> cls, Type genericType, String enc, OutputStream os, Annotation[] anns, javax.ws.rs.core.MediaType mt, Marshaller ms) throws Exception
Exception
protected XMLStreamWriter getStreamWriter(Object obj, OutputStream os, javax.ws.rs.core.MediaType mt)
protected void marshalToOutputStream(Marshaller ms, Object obj, OutputStream os, Annotation[] anns, javax.ws.rs.core.MediaType mt) throws Exception
Exception
protected void marshalToWriter(Marshaller ms, Object obj, XMLStreamWriter writer, Annotation[] anns, javax.ws.rs.core.MediaType mt) throws Exception
Exception
public void setXmlPiPropertyName(String xmlPiPropertyName)
Apache CXF