Class AbstractJAXBProvider<T>
- java.lang.Object
-
- org.jboss.resteasy.plugins.providers.AbstractEntityProvider<T>
-
- org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<T>
,javax.ws.rs.ext.MessageBodyWriter<T>
- Direct Known Subclasses:
JAXBElementProvider
,JAXBXmlRootElementProvider
,JAXBXmlSeeAlsoProvider
,JAXBXmlTypeProvider
public abstract class AbstractJAXBProvider<T> extends AbstractEntityProvider<T>
A AbstractJAXBProvider.- Version:
- $Revision:$
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
disableDTDs
private boolean
disableExternalEntities
private boolean
enableSecureProcessingFeature
protected javax.ws.rs.ext.Providers
providers
-
Constructor Summary
Constructors Constructor Description AbstractJAXBProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static javax.xml.bind.Marshaller
decorateMarshaller(java.lang.Class type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.xml.bind.Marshaller marshaller)
static javax.xml.bind.Unmarshaller
decorateUnmarshaller(java.lang.Class type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.xml.bind.Unmarshaller marshaller)
javax.xml.bind.JAXBContext
findJAXBContext(java.lang.Class<?> type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, boolean reader)
static java.lang.String
getCharset(javax.ws.rs.core.MediaType mediaType)
FIXME Comment thisprotected javax.xml.bind.Marshaller
getMarshaller(java.lang.Class<?> type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
FIXME Comment thisboolean
isDisableDTDs()
boolean
isDisableExternalEntities()
boolean
isEnableSecureProcessingFeature()
boolean
isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
protected abstract boolean
isReadWritable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
FIXME Comment thisboolean
isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
protected boolean
needsSecurity()
protected T
processWithSecureProcessing(javax.xml.bind.Unmarshaller unmarshaller, java.io.InputStream entityStream, java.lang.String charset)
T
readFrom(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)
static void
setCharset(javax.ws.rs.core.MediaType mediaType, javax.xml.bind.Marshaller marshaller)
void
setDisableDTDs(boolean disableDTDs)
void
setDisableExternalEntities(boolean disableExternalEntities)
void
setEnableSecureProcessingFeature(boolean enableSecureProcessingFeature)
void
writeTo(T t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream outputStream)
-
Methods inherited from class org.jboss.resteasy.plugins.providers.AbstractEntityProvider
getSize
-
-
-
-
Method Detail
-
findJAXBContext
public javax.xml.bind.JAXBContext findJAXBContext(java.lang.Class<?> type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, boolean reader) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
decorateMarshaller
public static javax.xml.bind.Marshaller decorateMarshaller(java.lang.Class type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.xml.bind.Marshaller marshaller) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
decorateUnmarshaller
public static javax.xml.bind.Unmarshaller decorateUnmarshaller(java.lang.Class type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.xml.bind.Unmarshaller marshaller) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
readFrom
public T readFrom(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTo
public void writeTo(T t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream outputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
getMarshaller
protected javax.xml.bind.Marshaller getMarshaller(java.lang.Class<?> type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
FIXME Comment this- Parameters:
type
-mediaType
-httpHeaders
-- Returns:
-
setCharset
public static void setCharset(javax.ws.rs.core.MediaType mediaType, javax.xml.bind.Marshaller marshaller) throws javax.xml.bind.PropertyException
- Throws:
javax.xml.bind.PropertyException
-
isReadWritable
protected abstract boolean isReadWritable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
FIXME Comment this- Parameters:
type
-genericType
-annotations
-- Returns:
-
isReadable
public boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
-
isWriteable
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
-
getCharset
public static java.lang.String getCharset(javax.ws.rs.core.MediaType mediaType)
FIXME Comment this- Parameters:
mediaType
-- Returns:
-
isDisableExternalEntities
public boolean isDisableExternalEntities()
-
setDisableExternalEntities
public void setDisableExternalEntities(boolean disableExternalEntities)
-
isEnableSecureProcessingFeature
public boolean isEnableSecureProcessingFeature()
-
setEnableSecureProcessingFeature
public void setEnableSecureProcessingFeature(boolean enableSecureProcessingFeature)
-
isDisableDTDs
public boolean isDisableDTDs()
-
setDisableDTDs
public void setDisableDTDs(boolean disableDTDs)
-
needsSecurity
protected boolean needsSecurity()
-
processWithSecureProcessing
protected T processWithSecureProcessing(javax.xml.bind.Unmarshaller unmarshaller, java.io.InputStream entityStream, java.lang.String charset) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
-