Class MapProvider
java.lang.Object
org.jboss.resteasy.plugins.providers.jaxb.MapProvider
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
@Provider
@Produces({"application/xml","application/*+xml","text/xml","text/*+xml"})
@Consumes({"application/xml","application/*+xml","text/xml","text/*+xml"})
public class MapProvider
extends Object
implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
- Version:
- $Revision: 1 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate booleanprotected javax.ws.rs.ext.Providers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCharset(javax.ws.rs.core.MediaType mediaType) protected JAXBContextFindergetFinder(javax.ws.rs.core.MediaType type) getJAXBObject(JAXBContextFinder finder, javax.ws.rs.core.MediaType mediaType, Class<?> clazz, Element element) longgetSize(Object entry, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanbooleanbooleanbooleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) protected booleanisWrapped(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) protected booleanreadFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidsetDisableDTDs(boolean disableDTDs) voidsetDisableExternalEntities(boolean disableExternalEntities) voidsetEnableSecureProcessingFeature(boolean enableSecureProcessingFeature) voidwriteTo(Object target, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Field Details
-
providers
@Context protected javax.ws.rs.ext.Providers providers -
disableExternalEntities
private boolean disableExternalEntities -
enableSecureProcessingFeature
private boolean enableSecureProcessingFeature -
disableDTDs
private boolean disableDTDs
-
-
Constructor Details
-
MapProvider
public MapProvider()
-
-
Method Details
-
getFinder
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isReadablein interfacejavax.ws.rs.ext.MessageBodyReader<Object>
-
isWrapped
protected boolean isWrapped(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) -
getJAXBObject
public Object getJAXBObject(JAXBContextFinder finder, javax.ws.rs.core.MediaType mediaType, Class<?> clazz, Element element) throws JAXBException - Throws:
JAXBException
-
readFrom
public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException- Specified by:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<Object>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
-
getSize
public long getSize(Object entry, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
-
writeTo
public void writeTo(Object target, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<Object>- Throws:
IOExceptionjavax.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
-
needsSecurity
protected boolean needsSecurity()
-