Package lumis.portal.controller
Class ControllerHtml
- java.lang.Object
-
- lumis.portal.controller.ControllerHtml
-
- Direct Known Subclasses:
ContentHyperLinkControllerHtml
,ContentWizardControllerHtml
,FCKSelectArticleControllerHtml
,FCKSelectContentControllerHtml
,FCKSelectDocumentControllerHtml
,FCKSelectImagesControllerHtml
,FCKSelectMediaControllerHtml
,FileDownloadControllerHtml
,FileDownloadControllerHtml
,HyperLinkControllerHtml
,ImportExportControllerHtml
,LocalizationControllerHtml
,LoginControllerHtml
,MediaControllerJson
,MetaDataInfoController
,MultiFileUploadCheckControllerHtml
,MultiFileUploadControllerHtml
,PageCacheControllerHtml
,PagePersonalizationControllerHtml
,PortalRequestParametersControllerHtml
,PresentationControllerHtml
,PrincipalControllerHtml
,ProgressControllerHtml
,SendToFriendControllerHtml
,ServiceInterfaceInstanceControllerHtml
,StructureSyncControllerJson
,UpgradeControllerHtml
,URLAccessibilityEvaluationControllerHtml
,WebsiteControllerHtml
@StableMinor(version="15.0", sinceVersion="4.0") public class ControllerHtml extends java.lang.Object
This is the base class for all the controllers. Basic information like request, response and sessionConfig information is stored within local members. All controllers that return HTML should extend this class.- Since:
- 4.0.0
- Version:
- $Revision: 25479 $ $Date: 2023-02-28 00:13:03 -0300 (Tue, 28 Feb 2023) $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.Writer
out
protected HttpServletRequest
request
protected HttpServletResponse
response
protected SessionConfig
sessionConfig
protected UserConfig
userConfig
-
Constructor Summary
Constructors Constructor Description ControllerHtml(HttpServletRequest request, HttpServletResponse response)
ControllerHtml(HttpServletRequest request, HttpServletResponse response, boolean initialize)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
checkRequestIsPost()
Checks if the current request method is POST.void
deleteCookie(java.lang.String name)
Deprecated.Since 4.0.7, useCookieUtil.deleteCookie(HttpServletRequest, HttpServletResponse, String)
instead.java.lang.String
getCookie(java.lang.String name)
Deprecated.Since 4.0.7, useCookieUtil.getCookie(HttpServletRequest, String)
instead.protected int
getRequestMode()
Returns the mode for the current request.SessionConfig
getSessionConfig()
void
loadUserInfo(ITransaction transaction)
Loads the user information from ther user session Id taken from the request cookie.void
setCookie(java.lang.String name, java.lang.String value)
Deprecated.Since 4.0.7, useCookieUtil.setCookie(HttpServletRequest, HttpServletResponse, String, String)
instead.
-
-
-
Field Detail
-
sessionConfig
protected SessionConfig sessionConfig
-
userConfig
protected UserConfig userConfig
-
request
protected HttpServletRequest request
-
response
protected HttpServletResponse response
-
out
protected java.io.Writer out
-
-
Constructor Detail
-
ControllerHtml
public ControllerHtml(HttpServletRequest request, HttpServletResponse response) throws ControllerException, PortalException
- Throws:
ControllerException
PortalException
-
ControllerHtml
public ControllerHtml(HttpServletRequest request, HttpServletResponse response, boolean initialize) throws ControllerException, PortalException
- Throws:
ControllerException
PortalException
-
-
Method Detail
-
getSessionConfig
public SessionConfig getSessionConfig()
- Returns:
- Returns the sessionConfig.
-
loadUserInfo
public void loadUserInfo(ITransaction transaction) throws ControllerException, PortalException
Loads the user information from ther user session Id taken from the request cookie.- Parameters:
transaction
-- Throws:
ControllerException
PortalException
-
getRequestMode
protected int getRequestMode() throws PortalException
Returns the mode for the current request. The mode is obtained analyzing the request.- Returns:
- the current request mode. The value may be either
PortalContext.MODE_ADMIN
, orPortalContext.MODE_USER
. - Throws:
PortalException
-
getCookie
public java.lang.String getCookie(java.lang.String name) throws ControllerException, PortalException
Deprecated.Since 4.0.7, useCookieUtil.getCookie(HttpServletRequest, String)
instead.Given a cookie name, the cookie value if exists in the request object is returned. If the cookie is not found, a null value is returned- Parameters:
name
-- Returns:
- cookie value
- Throws:
ControllerException
PortalException
-
setCookie
public void setCookie(java.lang.String name, java.lang.String value) throws ControllerException, PortalException
Deprecated.Since 4.0.7, useCookieUtil.setCookie(HttpServletRequest, HttpServletResponse, String, String)
instead.- Parameters:
name
-value
-- Throws:
ControllerException
PortalException
-
deleteCookie
public void deleteCookie(java.lang.String name) throws ControllerException, PortalException
Deprecated.Since 4.0.7, useCookieUtil.deleteCookie(HttpServletRequest, HttpServletResponse, String)
instead.Deletes the cookie if it exists in the request cookie collection.- Parameters:
name
-- Throws:
ControllerException
PortalException
-
checkRequestIsPost
protected void checkRequestIsPost()
Checks if the current request method is POST.- Throws:
java.lang.IllegalArgumentException
- if the request method is not POST.- Since:
- 15.0.1
-
-