Class PortalRequestContext
java.lang.Object
org.exoplatform.web.application.RequestContext
org.exoplatform.webui.application.WebuiRequestContext
org.exoplatform.portal.application.PortalRequestContext
This class extends the abstract WebuiRequestContext which itself extends the
RequestContext one
It mainly implements the abstract methods and overide some.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected org.exoplatform.web.application.JavascriptManagerstatic org.exoplatform.portal.mop.service.LayoutServicestatic org.exoplatform.portal.config.UserPortalConfigServicestatic org.exoplatform.portal.config.DynamicPortalLayoutServicestatic final intstatic final intstatic final Stringstatic final Stringstatic org.exoplatform.web.security.sso.SSOHelperstatic final Stringstatic final Stringstatic final StringFields inherited from class org.exoplatform.webui.application.WebuiRequestContext
appRes_, NAME_DELIMITER, sessionId_, uiApplication_Fields inherited from class org.exoplatform.web.application.RequestContext
ACTION, parentAppRequestContext_ -
Constructor Summary
ConstructorsConstructorDescriptionPortalRequestContext(WebuiApplication app, org.exoplatform.web.ControllerContext controllerContext, String requestSiteType, String requestSiteName, String requestPath, Locale requestLocale) Analyze a request and split this request's URI to get useful information then keep it in following properties of PortalRequestContext :
1. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtraMarkupHeader(Element element, String portletWindowId) Add an extra markup to the head of the html page.voidaddOnRequestEnd(Runnable runnable) voidvoidendServerTime(String name) intorg.exoplatform.web.ControllerContextstatic PortalRequestContextorg.exoplatform.portal.config.model.PortalConfigGet the extra markup headers to add to the head of the html.final booleanorg.exoplatform.web.application.JavascriptManagerorg.exoplatform.portal.mop.user.UserNodeReturns the context path of the portal or null if it does not execute in the context of an aggregated portal request.final Stringfinal StringgetRequestParameter(String name) String[]org.exoplatform.portal.mop.SiteKeyorg.exoplatform.portal.mop.SiteTypegetSkin()getTitle()org.exoplatform.web.application.URLBuilder<UIComponent> org.exoplatform.web.url.URLFactoryorg.exoplatform.portal.mop.user.UserPortalorg.exoplatform.portal.config.UserPortalConfigfinal Writerfinal voidignoreAJAXUpdateOnPortlets(boolean ignoreAJAXUpdateOnPortlets) Call to this method makes sense only in the scope of an AJAX request.booleanbooleanbooleanbooleanbooleanfinal booleanisUserInRole(String roleUser) <R,U extends org.exoplatform.web.url.PortalURL<R, U>>
UnewURL(org.exoplatform.web.url.ResourceType<R, U> resourceType, org.exoplatform.web.url.URLFactory urlFactory) voidvoidvoidvoidrequestAuthenticationLogin(Map<String, String> params) final voidsendError(int sc) final voidsendRedirect(String url) voidsetHeaders(Map<String, String> headers) voidsetPageTitle(String title) voidfinal voidbooleanstartServerTime(String name) final booleanuseAjax()Methods inherited from class org.exoplatform.webui.application.WebuiRequestContext
addUIComponentToUpdateByAjax, generateUUID, getApplicationResourceBundle, getProcessRender, getRequest, getResourceResolver, getResponse, getSessionId, getStateManager, getUIApplication, getUIComponentToUpdateByAjax, isResponseComplete, setProcessRender, setResponseComplete, setSessionId, setStateManager, setUIApplication, stripUUIDSuffixMethods inherited from class org.exoplatform.web.application.RequestContext
createURL, createURL, getApplication, getApplicationSession, getAttribute, getAttribute, getLocale, getOrientation, getParentAppRequestContext, setAttribute, setAttribute, setCurrentInstance
-
Field Details
-
PUBLIC_ACCESS
public static final int PUBLIC_ACCESS- See Also:
-
PRIVATE_ACCESS
public static final int PRIVATE_ACCESS- See Also:
-
UI_COMPONENT_ACTION
- See Also:
-
UI_COMPONENT_ID
- See Also:
-
TARGET_NODE
- See Also:
-
CACHE_LEVEL
- See Also:
-
REQUEST_TITLE
-
REQUEST_METADATA
-
portalLayoutService
public static org.exoplatform.portal.config.DynamicPortalLayoutService portalLayoutService -
portalConfigService
public static org.exoplatform.portal.config.UserPortalConfigService portalConfigService -
layoutService
public static org.exoplatform.portal.mop.service.LayoutService layoutService -
ssoHelper
public static org.exoplatform.web.security.sso.SSOHelper ssoHelper -
javascriptManager
protected org.exoplatform.web.application.JavascriptManager javascriptManager
-
-
Constructor Details
-
PortalRequestContext
public PortalRequestContext(WebuiApplication app, org.exoplatform.web.ControllerContext controllerContext, String requestSiteType, String requestSiteName, String requestPath, Locale requestLocale) Analyze a request and split this request's URI to get useful information then keep it in following properties of PortalRequestContext :
1.requestURI: The decoded URI of this request
2.portalOwner: The portal name ( "classic" for instance )
3.portalURI: The URI to current portal ( "/portal/public/classic/ for instance )
4.nodePath: The path that is used to reflect to a navigation node
-
-
Method Details
-
setUiPage
-
newURL
public <R,U extends org.exoplatform.web.url.PortalURL<R, U newURLU>> (org.exoplatform.web.url.ResourceType<R, U> resourceType, org.exoplatform.web.url.URLFactory urlFactory) - Specified by:
newURLin classorg.exoplatform.web.application.RequestContext
-
getJavascriptManager
public org.exoplatform.web.application.JavascriptManager getJavascriptManager()- Overrides:
getJavascriptManagerin classWebuiRequestContext
-
getRemoteUser
- Overrides:
getRemoteUserin classorg.exoplatform.web.application.RequestContext
-
isUserInRole
- Overrides:
isUserInRolein classorg.exoplatform.web.application.RequestContext
-
getWriter
- Overrides:
getWriterin classorg.exoplatform.web.application.RequestContext- Throws:
IOException
-
setWriter
- Overrides:
setWriterin classorg.exoplatform.web.application.RequestContext
-
useAjax
public final boolean useAjax()- Specified by:
useAjaxin classorg.exoplatform.web.application.RequestContext
-
getFullRender
public final boolean getFullRender()- Overrides:
getFullRenderin classorg.exoplatform.web.application.RequestContext- See Also:
-
getSkin
-
getUserPortal
public org.exoplatform.portal.mop.user.UserPortal getUserPortal()- Specified by:
getUserPortalin classorg.exoplatform.web.application.RequestContext
-
isNoCache
public boolean isNoCache() -
isDraftPage
public boolean isDraftPage() -
getUserPortalConfig
public org.exoplatform.portal.config.UserPortalConfig getUserPortalConfig() -
getUiPortal
-
getUiPage
-
getInitialURI
-
getControllerContext
public org.exoplatform.web.ControllerContext getControllerContext() -
refreshResourceBundle
public void refreshResourceBundle() -
requestAuthenticationLogin
public void requestAuthenticationLogin() -
requestAuthenticationLogin
-
setPageTitle
-
getDynamicPortalConfig
- Throws:
Exception
-
addOnRequestEnd
-
onRequestEnd
public void onRequestEnd() -
getTitle
-
getURLFactory
public org.exoplatform.web.url.URLFactory getURLFactory()- Specified by:
getURLFactoryin classorg.exoplatform.web.application.RequestContext
-
getMetaInformation
-
getCacheLevel
-
getRequestParameter
- Specified by:
getRequestParameterin classorg.exoplatform.web.application.RequestContext
-
getRequestParameterValues
- Specified by:
getRequestParameterValuesin classorg.exoplatform.web.application.RequestContext
-
getPortletParameters
-
getRequestContextPath
- Specified by:
getRequestContextPathin classWebuiRequestContext
-
getPortalContextPath
Description copied from class:WebuiRequestContextReturns the context path of the portal or null if it does not execute in the context of an aggregated portal request.- Specified by:
getPortalContextPathin classWebuiRequestContext- Returns:
- the portal context path
-
getActionParameterName
- Overrides:
getActionParameterNamein classWebuiRequestContext
-
getUIComponentIdParameterName
- Overrides:
getUIComponentIdParameterNamein classWebuiRequestContext
-
getSiteType
public org.exoplatform.portal.mop.SiteType getSiteType() -
getSiteName
-
getSiteKey
public org.exoplatform.portal.mop.SiteKey getSiteKey() -
getSiteLabel
-
getPortalOwner
-
getMetaPortal
- Returns:
- meta portal name
-
getNodePath
-
getRequestURI
-
getPortalURI
-
getURLBuilder
- Specified by:
getURLBuilderin classWebuiRequestContext
-
getAccessPath
public int getAccessPath() -
ignoreAJAXUpdateOnPortlets
public final void ignoreAJAXUpdateOnPortlets(boolean ignoreAJAXUpdateOnPortlets) Call to this method makes sense only in the scope of an AJAX request. Invoking ignoreAJAXUpdateOnPortlets(true) as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX. In the request response, all the blocks PortletRespond are empty. The content displayed in portlet windows are retrieved by non-AJAX render request to associated portlet object.- Parameters:
ignoreAJAXUpdateOnPortlets-
-
sendError
- Throws:
IOException
-
sendRedirect
- Specified by:
sendRedirectin classWebuiRequestContext- Throws:
IOException
-
setHeaders
-
getExtraMarkupHeadersAsStrings
-
getExtraMarkupHeaders
Get the extra markup headers to add to the head of the html.- Returns:
- The markup to be added.
-
addExtraMarkupHeader
Add an extra markup to the head of the html page.- Parameters:
element- The element to addportletWindowId- The ID of portlet window contributing markup header
-
isMaximizePortlet
public boolean isMaximizePortlet() -
isShowMaxWindow
public boolean isShowMaxWindow() -
getMaximizedPortletId
-
startServerTime
-
endServerTime
-
commitResponse
public void commitResponse() -
getCurrentInstance
-