Class PKIService

    • Constructor Summary

      Constructors 
      Constructor Description
      PKIService()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response createCreatedResponse​(java.lang.Object entity, java.net.URI link)  
      javax.ws.rs.core.Response createNoContentResponse()  
      javax.ws.rs.core.Response createOKResponse()  
      javax.ws.rs.core.Response createOKResponse​(java.lang.Object entity)  
      static java.lang.String getBanner()  
      static java.lang.String getInstanceDir()  
      java.util.Locale getLocale​(javax.ws.rs.core.HttpHeaders headers)  
      java.util.Map<java.lang.String,​java.lang.String> getParams​(java.lang.Object object)
      Get the values of the fields annotated with @FormParam.
      javax.ws.rs.core.MediaType getResponseFormat()  
      static javax.ws.rs.core.MediaType getResponseFormat​(javax.ws.rs.core.HttpHeaders headers)  
      static boolean isBannerEnabled()  
      java.lang.Object marshall​(java.lang.Object response)
      Marshall response object with custom mapping if available.
      static javax.ws.rs.core.MediaType resolveFormat​(java.util.List<javax.ws.rs.core.MediaType> formats)  
      static javax.ws.rs.core.MediaType resolveFormat​(javax.ws.rs.core.MediaType format)  
      javax.ws.rs.core.Response sendConditionalGetResponse​(int ctime, java.lang.Object entity, javax.ws.rs.core.Request request)  
      <T> T unmarshall​(java.lang.Object request, java.lang.Class<T> clazz)
      Unmarshall request object with custom mapping if available.
      • Methods inherited from class java.lang.Object

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

      • logger

        public static org.slf4j.Logger logger
      • DEFAULT_LONG_CACHE_LIFETIME

        public static final int DEFAULT_LONG_CACHE_LIFETIME
        See Also:
        Constant Field Values
      • MESSAGE_FORMATS

        public static java.util.List<javax.ws.rs.core.MediaType> MESSAGE_FORMATS
      • uriInfo

        @Context
        protected javax.ws.rs.core.UriInfo uriInfo
      • headers

        @Context
        protected javax.ws.rs.core.HttpHeaders headers
      • request

        @Context
        protected javax.ws.rs.core.Request request
      • servletRequest

        @Context
        protected javax.servlet.http.HttpServletRequest servletRequest
      • servletContext

        @Context
        protected javax.servlet.ServletContext servletContext
      • bannerFile

        public static java.nio.file.Path bannerFile
    • Constructor Detail

      • PKIService

        public PKIService()
    • Method Detail

      • getInstanceDir

        public static java.lang.String getInstanceDir()
      • isBannerEnabled

        public static boolean isBannerEnabled()
      • getBanner

        public static java.lang.String getBanner()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • resolveFormat

        public static javax.ws.rs.core.MediaType resolveFormat​(javax.ws.rs.core.MediaType format)
      • resolveFormat

        public static javax.ws.rs.core.MediaType resolveFormat​(java.util.List<javax.ws.rs.core.MediaType> formats)
      • getResponseFormat

        public static javax.ws.rs.core.MediaType getResponseFormat​(javax.ws.rs.core.HttpHeaders headers)
      • getResponseFormat

        public javax.ws.rs.core.MediaType getResponseFormat()
      • createOKResponse

        public javax.ws.rs.core.Response createOKResponse()
      • marshall

        public java.lang.Object marshall​(java.lang.Object response)
        Marshall response object with custom mapping if available. This method is called for by all services. It will use custom mapping if available.
      • unmarshall

        public <T> T unmarshall​(java.lang.Object request,
                                java.lang.Class<T> clazz)
        Unmarshall request object with custom mapping if available.
      • createOKResponse

        public javax.ws.rs.core.Response createOKResponse​(java.lang.Object entity)
      • createCreatedResponse

        public javax.ws.rs.core.Response createCreatedResponse​(java.lang.Object entity,
                                                               java.net.URI link)
      • createNoContentResponse

        public javax.ws.rs.core.Response createNoContentResponse()
      • sendConditionalGetResponse

        public javax.ws.rs.core.Response sendConditionalGetResponse​(int ctime,
                                                                    java.lang.Object entity,
                                                                    javax.ws.rs.core.Request request)
      • getLocale

        public java.util.Locale getLocale​(javax.ws.rs.core.HttpHeaders headers)
      • getParams

        public java.util.Map<java.lang.String,​java.lang.String> getParams​(java.lang.Object object)
        Get the values of the fields annotated with @FormParam.