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.JavascriptManagerprotected static org.exoplatform.services.log.Logstatic final intstatic final intstatic final Stringstatic final Stringstatic 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) intorg.exoplatform.web.ControllerContextstatic PortalRequestContextDeprecated.notion of 'default' portal doesn't exist anymoreorg.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.UserNodeorg.exoplatform.services.resources.OrientationReturns the context path of the portal or null if it does not execute in the context of an aggregated portal request.final Stringjakarta.servlet.http.HttpServletRequestfinal StringgetRequestParameter(String name) String[]final jakarta.servlet.http.HttpServletResponseorg.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.booleanbooleanbooleanfinal 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) voidvoidvoidvoidvoidrequestAuthenticationLogin(Map<String, String> params) final voidsendError(int sc) final voidsendRedirect(String url) final voidsetFullRender(boolean forceFullUpdate) Deprecated.voidsetHeaders(Map<String, String> headers) voidvoidsetPageTitle(String title) final voidfinal booleanuseAjax()Methods inherited from class org.exoplatform.webui.application.WebuiRequestContext
addUIComponentToUpdateByAjax, generateUUID, getApplicationResourceBundle, getProcessRender, getResourceResolver, 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, getParentAppRequestContext, setAttribute, setAttribute, setCurrentInstance
-
Field Details
-
log
protected static org.exoplatform.services.log.Log log -
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
-
jsmanager_
protected org.exoplatform.web.application.JavascriptManager jsmanager_
-
-
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
-
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
-
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() -
refreshPortalConfig
public void refreshPortalConfig() -
getUIPage
public UIPage getUIPage(org.exoplatform.portal.mop.user.UserNode pageNode, UIPortal uiPortal) throws Exception - Throws:
Exception
-
getInitialURI
-
getControllerContext
public org.exoplatform.web.ControllerContext getControllerContext() -
refreshResourceBundle
- Throws:
Exception
-
requestAuthenticationLogin
- Throws:
Exception
-
requestAuthenticationLogin
- Throws:
Exception
-
setPageTitle
-
getDynamicPortalConfig
- Throws:
Exception
-
addOnRequestEnd
-
onRequestEnd
public void onRequestEnd() -
getTitle
- Throws:
Exception
-
getURLFactory
public org.exoplatform.web.url.URLFactory getURLFactory()- Specified by:
getURLFactoryin classorg.exoplatform.web.application.RequestContext
-
getOrientation
public org.exoplatform.services.resources.Orientation getOrientation()- Specified by:
getOrientationin classorg.exoplatform.web.application.RequestContext
-
getRequestLocale
-
setLocale
-
getLocale
- Overrides:
getLocalein 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() -
getPortalOwner
-
getMetaPortal
- Returns:
- meta portal name
-
getDefaultPortal
Deprecated.notion of 'default' portal doesn't exist anymore- Returns:
- default portal name
-
getNodePath
-
getRequestURI
-
getPortalURI
-
getURLBuilder
- Specified by:
getURLBuilderin classWebuiRequestContext
-
getAccessPath
public int getAccessPath() -
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
-
getRequest
public jakarta.servlet.http.HttpServletRequest getRequest()- Specified by:
getRequestin classWebuiRequestContext
-
getResponse
public final jakarta.servlet.http.HttpServletResponse getResponse()- Specified by:
getResponsein classWebuiRequestContext
-
getFullRender
public final boolean getFullRender()- Overrides:
getFullRenderin classorg.exoplatform.web.application.RequestContext- See Also:
-
setFullRender
Deprecated.Sets a boolean value to force whether portal will be fully rendered and it is only effective to an Ajax request.
if the value is set totrue, it means :
1) Only portal ui components are rendered
2) Portlets will be fully rendered if are inner of the portal ui components being updated- Parameters:
forceFullUpdate- This method is deprecated, ignoreAJAXUpdateOnPortlets should be used instead
-
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
- Throws:
Exception
-
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() -
getMaximizedPortletId
-
getCurrentInstance
-