org.portletfaces.liferay.faces.context
Interface PortletHelper

All Known Implementing Classes:
LiferayFacesContext, LiferayFacesContextImpl, PortletFacesContext, PortletHelperImpl

public interface PortletHelper


Method Summary
 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.
 java.lang.String getPortletContextName()
          Retrieves the name of the portlet associated with the current JSF FacesContext (usually, its the name of the portlet .war)
 java.lang.String getPortletName()
          Retrieves the name of the portlet associated with the current JSF FacesContext (as defined in portlet.xml's <portlet-name> tag).
 java.lang.Object getPortletPreference(java.lang.String preferenceName, java.lang.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(java.lang.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(java.lang.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(java.lang.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.
 java.lang.String getPortletPreferenceAsString(java.lang.String preferenceName, java.lang.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.
 java.lang.String getRemoteUser()
          Returns the user name/id of the user associated with the current JSF FacesContext
 java.lang.Object getSessionSharedAttribute(java.lang.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(java.lang.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(java.lang.String name, java.lang.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)
 

Method Detail

createActionURL

javax.portlet.PortletURL createActionURL()
Retrieves a render URL for the current facesContext.


createRenderURL

javax.portlet.PortletURL createRenderURL()
Retrieves a render URL for the current facesContext.


getActionResponse

javax.portlet.ActionResponse getActionResponse()
Retrieves the javax.portlet.ActionResponse object associated with the current JSF FacesContext.


isPortletEnvironment

boolean isPortletEnvironment()
Returns TRUE if the underlying request/response is from a portlet environment. Otherwise, must be running in a servlet environment.


isWindowMaximized

boolean isWindowMaximized()
Returns TRUE if the Window state of the current portlet is set to MAXIMIZED


isUserInRole

boolean isUserInRole(java.lang.String roleName)
Returns TRUE if the current user is associated with the specified role.


isWindowNormal

boolean isWindowNormal()
Returns TRUE if the Window state of the current portlet is set to MAXIMIZED


getPortalContext

javax.portlet.PortalContext getPortalContext()
Retrieves the javax.portlet.PortalContext object associated with the current JSF FacesContext.


getPortletConfig

javax.portlet.PortletConfig getPortletConfig()
Retrieves the javax.portlet.PortletConfig object associated with the current JSF FacesContext.


getPortletContext

javax.portlet.PortletContext getPortletContext()
Retrieves the javax.portlet.PortletContext object associated with the current JSF FacesContext.


getPortletContextName

java.lang.String getPortletContextName()
Retrieves the name of the portlet associated with the current JSF FacesContext (usually, its the name of the portlet .war)


setPortletMode

void setPortletMode(javax.portlet.PortletMode portletMode)
Sets the portlet mode of the portlet associated with the current JSF FacesContext to the specified portlet mode.


getPortletName

java.lang.String getPortletName()
Retrieves the name of the portlet associated with the current JSF FacesContext (as defined in portlet.xml's <portlet-name> tag).


getPortletPreference

java.lang.Object getPortletPreference(java.lang.String preferenceName,
                                      java.lang.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.


getPortletPreferenceAsBool

boolean getPortletPreferenceAsBool(java.lang.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.


getPortletPreferenceAsInt

int getPortletPreferenceAsInt(java.lang.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.


getPortletPreferenceAsShort

short getPortletPreferenceAsShort(java.lang.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.


getPortletPreferenceAsString

java.lang.String getPortletPreferenceAsString(java.lang.String preferenceName,
                                              java.lang.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.


getPortletPreferences

javax.portlet.PortletPreferences getPortletPreferences()
Retrieves the javax.portlet.PortletPreferences object associated with the current JSF FacesContext.


getPortletRenderRequest

javax.portlet.RenderRequest getPortletRenderRequest()
Retrieves the javax.portlet.RenderRequest object associated with the current JSF FacesContext.


getPortletRenderResponse

javax.portlet.RenderResponse getPortletRenderResponse()
Retrieves the javax.portlet.RenderResponse object associated with the current JSF FacesContext.


getPortletRequest

javax.portlet.PortletRequest getPortletRequest()
Retrieves the javax.portlet.PortletRequest object associated with the current JSF FacesContext.


getPortletResponse

javax.portlet.PortletResponse getPortletResponse()
Retrieves the javax.portlet.PortletResponse object associated with the current JSF FacesContext.


getPortletSession

javax.portlet.PortletSession getPortletSession()
Retrieves the javax.portlet.PortletSession object associated with the current JSF FacesContext.


getRemoteUser

java.lang.String getRemoteUser()
Returns the user name/id of the user associated with the current JSF FacesContext


getSessionSharedAttribute

java.lang.Object getSessionSharedAttribute(java.lang.String name)
Returns the value of the session attribute associated with the specified name from PortletSession.APPLICATION_SCOPE


setSessionSharedAttribute

void setSessionSharedAttribute(java.lang.String name,
                               java.lang.Object value)
Sets the value of the a session attribute using the specified name and value within PortletSession.APPLICATION_SCOPE


getWindowState

javax.portlet.WindowState getWindowState()
Returns the window state of the portlet associated with the current JSF FacesContext


setWindowState

void setWindowState(javax.portlet.WindowState windowState)
Sets the window state of the portlet associated with the current JSF FacesContext to the specified window state.


setWindowStateToMaximized

void setWindowStateToMaximized()
A short-cut method for calling setWindowState(WindowState.MAXIMIZED)


setWindowStateToNormal

void setWindowStateToNormal()
A short-cut method for calling setWindowState(WindowState.NORMAL)



Copyright © 2011 portletfaces.org. All Rights Reserved.