Class AbstractJAXBProvider<T>

    • Field Detail

      • providers

        @Context
        protected javax.ws.rs.ext.Providers providers
    • Constructor Detail

      • AbstractJAXBProvider

        public AbstractJAXBProvider()
    • Method Detail

      • readFrom

        public T readFrom​(Class<T> type,
                          Type genericType,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType,
                          javax.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                          InputStream entityStream)
                   throws IOException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>
        Throws:
        IOException
      • writeTo

        public void writeTo​(T t,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream outputStream)
                     throws IOException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<T>
        Throws:
        IOException
      • getMarshaller

        protected Marshaller getMarshaller​(Class<?> type,
                                           Annotation[] annotations,
                                           javax.ws.rs.core.MediaType mediaType)
        Retrieve JAXB marshaller.
        Parameters:
        type - type
        annotations - annotations
        mediaType - media type
        Returns:
        jaxb marshaller
      • isReadWritable

        protected abstract boolean isReadWritable​(Class<?> type,
                                                  Type genericType,
                                                  Annotation[] annotations,
                                                  javax.ws.rs.core.MediaType mediaType)
      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<T>
      • getCharset

        public static String getCharset​(javax.ws.rs.core.MediaType mediaType)
        Gets the character set from media type.
        Parameters:
        mediaType - media type
        Returns:
        charset
      • 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()