Class CollectionProvider
- java.lang.Object
-
- org.jboss.resteasy.plugins.providers.jaxb.CollectionProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<java.lang.Object>
,javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
@Provider @Produces({"application/xml","application/*+xml","text/xml","text/*+xml"}) @Consumes({"application/xml","application/*+xml","text/xml","text/*+xml"}) public class CollectionProvider extends java.lang.Object implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
- Version:
- $Revision: 1 $
-
-
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 CollectionProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getCharset(javax.ws.rs.core.MediaType mediaType)
protected JAXBContextFinder
getFinder(javax.ws.rs.core.MediaType type)
java.lang.Object
getJAXBObject(JAXBContextFinder finder, javax.ws.rs.core.MediaType mediaType, java.lang.Class<?> clazz, org.w3c.dom.Element element)
long
getSize(java.lang.Object entry, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
boolean
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 boolean
isWrapped(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
boolean
isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
protected boolean
needsSecurity()
java.lang.Object
readFrom(java.lang.Class<java.lang.Object> 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)
void
setDisableDTDs(boolean disableDTDs)
void
setDisableExternalEntities(boolean disableExternalEntities)
void
setEnableSecureProcessingFeature(boolean enableSecureProcessingFeature)
void
writeTo(java.lang.Object entry, 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 entityStream)
-
-
-
Method Detail
-
getFinder
protected JAXBContextFinder getFinder(javax.ws.rs.core.MediaType type)
-
isReadable
public boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<java.lang.Object>
-
isWrapped
protected boolean isWrapped(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
-
getJAXBObject
public java.lang.Object getJAXBObject(JAXBContextFinder finder, javax.ws.rs.core.MediaType mediaType, java.lang.Class<?> clazz, org.w3c.dom.Element element) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
readFrom
public java.lang.Object readFrom(java.lang.Class<java.lang.Object> 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, javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<java.lang.Object>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
-
getSize
public long getSize(java.lang.Object entry, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
-
writeTo
public void writeTo(java.lang.Object entry, 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 entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
-
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)
-
getCharset
public static java.lang.String getCharset(javax.ws.rs.core.MediaType mediaType)
-
needsSecurity
protected boolean needsSecurity()
-
-