Package com.netscape.cms.servlet.base
Class PKIService
- java.lang.Object
-
- com.netscape.cms.servlet.base.PKIService
-
- Direct Known Subclasses:
AccountService
,CAInfoService
,FeatureService
,InfoService
,KRAInfoService
,LoginService
,SecurityDomainService
,SelfTestService
,SubsystemService
,SystemCertService
,SystemConfigService
public class PKIService extends java.lang.Object
Base class for CMS RESTful resources- Author:
- alee
-
-
Field Summary
Fields Modifier and Type Field Description static java.nio.file.Path
bannerFile
static int
DEFAULT_LONG_CACHE_LIFETIME
static int
DEFAULT_SIZE
protected javax.ws.rs.core.HttpHeaders
headers
static java.util.List<javax.ws.rs.core.MediaType>
MESSAGE_FORMATS
static int
MIN_FILTER_LENGTH
protected javax.ws.rs.core.Request
request
protected javax.servlet.ServletContext
servletContext
protected javax.servlet.http.HttpServletRequest
servletRequest
protected javax.ws.rs.core.UriInfo
uriInfo
-
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 java.lang.String
getVersion()
static boolean
isBannerEnabled()
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 object, javax.ws.rs.core.Request request)
-
-
-
Field Detail
-
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
-
MIN_FILTER_LENGTH
public static final int MIN_FILTER_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
getInstanceDir
public static java.lang.String getInstanceDir()
-
getVersion
public static java.lang.String getVersion()
-
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()
-
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 object, 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.
-
-