Class CMSGateway
java.lang.Object
com.netscape.cms.servlet.common.CMSGateway
This class is to hold some general method for servlets.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringstatic final Stringprotected CMSEnginestatic org.slf4j.Loggerprotected ConfigStoreprotected booleanprotected booleanprotected CMSFileLoaderstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckAuthManager(jakarta.servlet.http.HttpServletRequest httpReq, ArgBlock httpParams, X509Certificate cert, String authMgrName) voidgetAuthCreds(AuthManager authMgr, ArgBlock argBlock, X509Certificate clientCert) construct a authentication credentials to pass into authentication manager.booleangetLangFile(jakarta.servlet.http.HttpServletRequest req, File realpathFile, Locale[] locale) protected CMSTemplategetTemplate(String templateName, jakarta.servlet.http.HttpServletRequest httpReq, jakarta.servlet.ServletConfig servletConfig, CMSFileLoader fileLoader, Locale[] locale) get a templatevoidinit()booleanmodifiedSince(jakarta.servlet.http.HttpServletRequest req, long lastModified) Get the If-Modified-Since header and compare it to the millisecond epoch value passed in.voidrenderTemplate(String templateName, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, jakarta.servlet.ServletConfig servletConfig, CMSFileLoader fileLoader) voidsetCMSEngine(CMSEngine engine) voidsetEnableAdminEnroll(boolean enableAdminEnroll) toHashtable(jakarta.servlet.http.HttpServletRequest req)
-
Field Details
-
logger
public static org.slf4j.Logger logger -
PROP_CMSGATEWAY
- See Also:
-
CERT_ATTR
- See Also:
-
engine
-
mFileLoader
-
mEnableFileServing
protected boolean mEnableFileServing -
mEnableAdminEnroll
protected boolean mEnableAdminEnroll -
mConfig
-
AUTHMGR_PARAM
- See Also:
-
-
Constructor Details
-
CMSGateway
public CMSGateway()
-
-
Method Details
-
getCMSEngine
-
setCMSEngine
-
init
-
toHashtable
-
getEnableAdminEnroll
public boolean getEnableAdminEnroll() -
setEnableAdminEnroll
- Throws:
EBaseException
-
disableAdminEnroll
- Throws:
EBaseException
-
getAuthCreds
public AuthCredentials getAuthCreds(AuthManager authMgr, ArgBlock argBlock, X509Certificate clientCert) throws EBaseException construct a authentication credentials to pass into authentication manager.- Throws:
EBaseException
-
checkAuthManager
public AuthToken checkAuthManager(jakarta.servlet.http.HttpServletRequest httpReq, ArgBlock httpParams, X509Certificate cert, String authMgrName) throws EBaseException - Throws:
EBaseException
-
renderTemplate
public void renderTemplate(String templateName, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, jakarta.servlet.ServletConfig servletConfig, CMSFileLoader fileLoader) throws EBaseException, IOException - Throws:
EBaseExceptionIOException
-
getLocale
-
getLangFile
public File getLangFile(jakarta.servlet.http.HttpServletRequest req, File realpathFile, Locale[] locale) throws IOException - Parameters:
req- http servlet requestrealpathFile- the file to get.locale- array of at least one to be filled with locale found.- Throws:
IOException
-
getTemplate
protected CMSTemplate getTemplate(String templateName, jakarta.servlet.http.HttpServletRequest httpReq, jakarta.servlet.ServletConfig servletConfig, CMSFileLoader fileLoader, Locale[] locale) throws EBaseException, IOException get a template- Throws:
EBaseExceptionIOException
-
modifiedSince
public boolean modifiedSince(jakarta.servlet.http.HttpServletRequest req, long lastModified) Get the If-Modified-Since header and compare it to the millisecond epoch value passed in. If there is no header, or there is a problem parsing the value, or if the file has been modified this will return true, indicating the file has changed.- Parameters:
lastModified- The time value in milliseconds past the epoch to compare the If-Modified-Since header to.
-