Class MapProvider

  • 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 MapProvider
    extends java.lang.Object
    implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
    Version:
    $Revision: 1 $
    • Constructor Summary

      Constructors 
      Constructor Description
      MapProvider()  
    • 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 target, 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • providers

        @Context
        protected javax.ws.rs.ext.Providers providers
      • disableExternalEntities

        private boolean disableExternalEntities
      • enableSecureProcessingFeature

        private boolean enableSecureProcessingFeature
      • disableDTDs

        private boolean disableDTDs
    • Constructor Detail

      • MapProvider

        public MapProvider()
    • 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 interface javax.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 interface javax.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 interface javax.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 interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
      • writeTo

        public void writeTo​(java.lang.Object target,
                            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 interface javax.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()