public interface PortletHelper
Modifier and Type | Method and Description |
---|---|
javax.portlet.PortletURL |
createActionURL()
Retrieves a render URL for the current facesContext.
|
javax.portlet.PortletURL |
createRenderURL()
Retrieves a render URL for the current facesContext.
|
javax.portlet.ActionResponse |
getActionResponse()
Retrieves the
javax.portlet.ActionResponse object associated with the current JSF FacesContext. |
javax.portlet.PortalContext |
getPortalContext()
Retrieves the
javax.portlet.PortalContext object associated with the current JSF FacesContext. |
javax.portlet.PortletConfig |
getPortletConfig()
Retrieves the
javax.portlet.PortletConfig object associated with the current JSF FacesContext. |
javax.portlet.PortletContext |
getPortletContext()
Retrieves the
javax.portlet.PortletContext object associated with the current JSF FacesContext. |
String |
getPortletContextName()
Retrieves the name of the portlet associated with the current JSF FacesContext (usually, its the name of the
portlet .war)
|
String |
getPortletName()
Retrieves the name of the portlet associated with the current JSF FacesContext (as defined in portlet.xml's
<portlet-name> tag).
|
Object |
getPortletPreference(String preferenceName,
Object defaultValue)
Returns String representation of the value of the portlet preference associated with the specified name in from
the
javax.portlet.PortletPreferences object associated with the current JSF FacesContext. |
boolean |
getPortletPreferenceAsBool(String preferenceName,
boolean defaultValue)
Returns boolean representation of the value of the portlet preference associated with the specified name in from
the PortletPreferenceMap object associated with the current JSF FacesContext.
|
int |
getPortletPreferenceAsInt(String preferenceName,
int defaultValue)
Returns integer representation of the value of the portlet preference associated with the specified name in from
the PortletPreferenceMap object associated with the current JSF FacesContext.
|
short |
getPortletPreferenceAsShort(String preferenceName,
short defaultValue)
Returns short representation of the value of the portlet preference associated with the specified name in from
the PortletPreferenceMap object associated with the current JSF FacesContext.
|
String |
getPortletPreferenceAsString(String preferenceName,
String defaultValue)
Returns short representation of the value of the portlet preference associated with the specified name in from
the PortletPreferenceMap object associated with the current JSF FacesContext.
|
javax.portlet.PortletPreferences |
getPortletPreferences()
Retrieves the
javax.portlet.PortletPreferences object associated with the current JSF FacesContext. |
javax.portlet.RenderRequest |
getPortletRenderRequest()
Retrieves the
javax.portlet.RenderRequest object associated with the current JSF FacesContext. |
javax.portlet.RenderResponse |
getPortletRenderResponse()
Retrieves the
javax.portlet.RenderResponse object associated with the current JSF FacesContext. |
javax.portlet.PortletRequest |
getPortletRequest()
Retrieves the
javax.portlet.PortletRequest object associated with the current JSF FacesContext. |
javax.portlet.PortletResponse |
getPortletResponse()
Retrieves the
javax.portlet.PortletResponse object associated with the current JSF FacesContext. |
javax.portlet.PortletSession |
getPortletSession()
Retrieves the
javax.portlet.PortletSession object associated with the current JSF FacesContext. |
String |
getRemoteUser()
Returns the user name/id of the user associated with the current JSF FacesContext
|
Object |
getSessionSharedAttribute(String name)
Returns the value of the session attribute associated with the specified name from
PortletSession.APPLICATION_SCOPE
|
javax.portlet.WindowState |
getWindowState()
Returns the window state of the portlet associated with the current JSF FacesContext
|
boolean |
isPortletEnvironment()
Returns TRUE if the underlying request/response is from a portlet environment.
|
boolean |
isUserInRole(String roleName)
Returns TRUE if the current user is associated with the specified role.
|
boolean |
isWindowMaximized()
Returns TRUE if the Window state of the current portlet is set to MAXIMIZED
|
boolean |
isWindowNormal()
Returns TRUE if the Window state of the current portlet is set to MAXIMIZED
|
void |
setPortletMode(javax.portlet.PortletMode portletMode)
Sets the portlet mode of the portlet associated with the current JSF FacesContext to the specified portlet mode.
|
void |
setSessionSharedAttribute(String name,
Object value)
Sets the value of the a session attribute using the specified name and value within
PortletSession.APPLICATION_SCOPE
|
void |
setWindowState(javax.portlet.WindowState windowState)
Sets the window state of the portlet associated with the current JSF FacesContext to the specified window state.
|
void |
setWindowStateToMaximized()
A short-cut method for calling setWindowState(WindowState.MAXIMIZED)
|
void |
setWindowStateToNormal()
A short-cut method for calling setWindowState(WindowState.NORMAL)
|
javax.portlet.PortletURL createActionURL()
javax.portlet.PortletURL createRenderURL()
javax.portlet.ActionResponse getActionResponse()
javax.portlet.ActionResponse
object associated with the current JSF FacesContext.javax.portlet.PortalContext getPortalContext()
javax.portlet.PortalContext
object associated with the current JSF FacesContext.javax.portlet.PortletConfig getPortletConfig()
javax.portlet.PortletConfig
object associated with the current JSF FacesContext.javax.portlet.PortletContext getPortletContext()
javax.portlet.PortletContext
object associated with the current JSF FacesContext.String getPortletContextName()
String getPortletName()
Object getPortletPreference(String preferenceName, Object defaultValue)
javax.portlet.PortletPreferences
object associated with the current JSF FacesContext.boolean getPortletPreferenceAsBool(String preferenceName, boolean defaultValue)
int getPortletPreferenceAsInt(String preferenceName, int defaultValue)
short getPortletPreferenceAsShort(String preferenceName, short defaultValue)
String getPortletPreferenceAsString(String preferenceName, String defaultValue)
javax.portlet.PortletPreferences getPortletPreferences()
javax.portlet.PortletPreferences
object associated with the current JSF FacesContext.javax.portlet.RenderRequest getPortletRenderRequest()
javax.portlet.RenderRequest
object associated with the current JSF FacesContext.javax.portlet.RenderResponse getPortletRenderResponse()
javax.portlet.RenderResponse
object associated with the current JSF FacesContext.javax.portlet.PortletRequest getPortletRequest()
javax.portlet.PortletRequest
object associated with the current JSF FacesContext.javax.portlet.PortletResponse getPortletResponse()
javax.portlet.PortletResponse
object associated with the current JSF FacesContext.javax.portlet.PortletSession getPortletSession()
javax.portlet.PortletSession
object associated with the current JSF FacesContext.String getRemoteUser()
Object getSessionSharedAttribute(String name)
javax.portlet.WindowState getWindowState()
boolean isPortletEnvironment()
boolean isUserInRole(String roleName)
boolean isWindowMaximized()
boolean isWindowNormal()
void setPortletMode(javax.portlet.PortletMode portletMode)
void setSessionSharedAttribute(String name, Object value)
void setWindowState(javax.portlet.WindowState windowState)
void setWindowStateToMaximized()
void setWindowStateToNormal()
Copyright © 2019 Liferay, Inc.. All rights reserved.