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