Class PKIService

java.lang.Object
com.netscape.cms.servlet.base.PKIService
Direct Known Subclasses:
AccountService, FeatureService, InfoService, LoginService, SecurityDomainHostService, SecurityDomainService, SelfTestService, SubsystemService, SystemConfigService

public class PKIService extends Object
Base class for CMS RESTful resources
Author:
alee
  • Field Details

    • logger

      public static org.slf4j.Logger logger
    • DEFAULT_LONG_CACHE_LIFETIME

      public static final int DEFAULT_LONG_CACHE_LIFETIME
      See Also:
    • MESSAGE_FORMATS

      public static List<javax.ws.rs.core.MediaType> MESSAGE_FORMATS
    • MIN_FILTER_LENGTH

      public static final int MIN_FILTER_LENGTH
      See Also:
    • DEFAULT_SIZE

      public static final int DEFAULT_SIZE
      See Also:
    • 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 Path bannerFile
  • Constructor Details

    • PKIService

      public PKIService()
  • Method Details

    • getInstanceDir

      public static String getInstanceDir()
    • isBannerEnabled

      public static boolean isBannerEnabled()
    • getBanner

      public static String getBanner() throws IOException
      Throws:
      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(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 Object marshall(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(Object request, Class<T> clazz)
      Unmarshall request object with custom mapping if available.
    • createOKResponse

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

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

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

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

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

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