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="14.2", sinceVersion="4.0") public class ControllerHtml extends 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: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description protected 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 void
deleteCookie(String name)
Deprecated.Since 4.0.7, useCookieUtil.deleteCookie(HttpServletRequest, HttpServletResponse, String)
instead.String
getCookie(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(String name, 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 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 String getCookie(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(String name, 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(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
-
-