Class BaseProvider<T>

    • Field Detail

      • uriInfo

        @Context
        protected jakarta.inject.Provider<jakarta.ws.rs.core.UriInfo> uriInfo
      • requestHeaders

        @Context
        protected jakarta.inject.Provider<jakarta.ws.rs.core.HttpHeaders> requestHeaders
      • habitat

        @Context
        protected org.glassfish.hk2.api.ServiceLocator habitat
      • desiredType

        protected Class desiredType
      • supportedMediaTypes

        protected jakarta.ws.rs.core.MediaType[] supportedMediaTypes
    • Constructor Detail

      • BaseProvider

        public BaseProvider​(Class desiredType,
                            jakarta.ws.rs.core.MediaType... mediaType)
    • Method Detail

      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] antns,
                                   jakarta.ws.rs.core.MediaType mt)
        Specified by:
        isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
      • isGivenTypeWritable

        protected boolean isGivenTypeWritable​(Class<?> type,
                                              Type genericType)
        Overwrite this if you need different test of type compatibility. Used from isWritable method.
      • getSize

        public long getSize​(T t,
                            Class<?> type,
                            Type type1,
                            Annotation[] antns,
                            jakarta.ws.rs.core.MediaType mt)
        Specified by:
        getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
      • writeTo

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

        public abstract String getContent​(T proxy)
      • canShowHiddenCommands

        protected boolean canShowHiddenCommands()
        returns true if the HTML viewer displays the hidden CLI command links
      • canShowDeprecatedItems

        protected boolean canShowDeprecatedItems()
        returns true if the HTML viewer displays the deprecated elements or attributes of a config bean
      • isDebug

        protected boolean isDebug()
        check for the __debug request header
      • getCallBackJSONP

        protected String getCallBackJSONP()
        if a query param of name "jsoncallback" is there, returns its value or returns null otherwise.
      • getXmlCommandLinks

        protected String getXmlCommandLinks​(String[][] commandResourcesPaths,
                                            String indent)