javax.portlet.faces
Class BridgeUtil

java.lang.Object
  extended by javax.portlet.faces.BridgeUtil

public final class BridgeUtil
extends Object

Utility class designed to make it easy for Faces subsystems including the bridge itself to determine whether this request is running in a portlet container and/or which portlet request phase it is executing in.

Author:
Michael Freedman, Neil Griffin

Method Summary
static Bridge.PortletPhase getPortletRequestPhase()
          Indicates the portlet lifecycle phase currently being executed within the execution of the Faces lifecycle.
static Bridge.PortletPhase getPortletRequestPhase(javax.faces.context.FacesContext facesContext)
          Indicates the portlet lifecycle phase currently being executed within the execution of the Faces lifecycle.
static boolean isPortletRequest()
          Indicates whether the current request is executing in the portlet container.
static boolean isPortletRequest(javax.faces.context.FacesContext facesContext)
          Indicates whether the current request is executing in the portlet container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPortletRequestPhase

public static Bridge.PortletPhase getPortletRequestPhase()
Indicates the portlet lifecycle phase currently being executed within the execution of the Faces lifecycle.

Returns:
The portlet lifecycle phase if the current request is executing within a portlet environment. Otherwise null.

getPortletRequestPhase

public static Bridge.PortletPhase getPortletRequestPhase(javax.faces.context.FacesContext facesContext)
Indicates the portlet lifecycle phase currently being executed within the execution of the Faces lifecycle.

Parameters:
facesContext - The current Faces context.
Returns:
The portlet lifecycle phase if the current request is executing within a portlet environment. Otherwise null.

isPortletRequest

public static boolean isPortletRequest()
Indicates whether the current request is executing in the portlet container.

Returns:
true if the request is a portlet request, otherwise false.

isPortletRequest

public static boolean isPortletRequest(javax.faces.context.FacesContext facesContext)
Indicates whether the current request is executing in the portlet container.

Parameters:
facesContext - The current Faces context.
Returns:
true if the request is a portlet request, otherwise false.


Copyright © 2017 Liferay, Inc. All Rights Reserved.