Class AbstractJAXBProvider<T>

    • 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 this
      protected javax.xml.bind.Marshaller getMarshaller​(java.lang.Class<?> type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      FIXME Comment this
      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 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
      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()  
      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 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

      • AbstractJAXBProvider

        public AbstractJAXBProvider()
    • 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