Class PortalState
java.lang.Object
com.appiancorp.suiteapi.web.portal.PortalState
-
Constructor Summary
ConstructorDescriptionPortalState
(javax.servlet.http.HttpServletRequest q_) Construct from aHttpServletRequest
. -
Method Summary
Modifier and TypeMethodDescriptionGet the id of the current page.Get the id of the current portlet.Get thePortletSession
for the current portlet.getPortletSession
(Long portletId_) Get thePortletSession
for a given portlet.getUser()
Get the object of classUser
representing the current user.boolean
Determine if the current portlet is controlled.boolean
Determine whether the current user is a Portal administrator.
-
Constructor Details
-
PortalState
public PortalState(javax.servlet.http.HttpServletRequest q_) Construct from aHttpServletRequest
. Is is assumed that theHttpServletRequest
contains the parameters and attributes necessary for populating a newPortalState
object.- Parameters:
q_
- the Request Object
-
-
Method Details
-
getUser
Get the object of classUser
representing the current user.- Returns:
- The user name.
-
isUserPortalAdmin
public boolean isUserPortalAdmin()Determine whether the current user is a Portal administrator.- Returns:
true
if the current user is a Portal administrator;false
if not.
-
getCurrentPortletId
Get the id of the current portlet. The current portlet is the one that is currently being rendered.- Returns:
- The id of the current portlet.
-
getPortletSession
Get thePortletSession
for a given portlet.- Parameters:
portletId_
- The id of the portlet whosePortletSession
is desired.- Returns:
- the
PortletSession
-
getCurrentPortletSession
Get thePortletSession
for the current portlet.- Returns:
- the
PortletSession
for the current portlet
-
isCurrentPortletControlled
public boolean isCurrentPortletControlled()Determine if the current portlet is controlled. The controlled portlet is the portlet, if any, from which the current request originated.- Returns:
true
if the current portlet is controlled;false
if not.
-
getCurrentPageId
Get the id of the current page. The current page is the one being rendered. Only pages that contain portlets have ids. If this method is called on a non-portlet-containing page, it will return null.- Returns:
- The page id.
-