com.liferay.faces.bridge.scope
Class BridgeRequestScopeWrapper

java.lang.Object
  extended by com.liferay.faces.bridge.scope.BridgeRequestScopeWrapper
All Implemented Interfaces:
BridgeRequestScope, javax.faces.FacesWrapper<BridgeRequestScope>

public abstract class BridgeRequestScopeWrapper
extends Object
implements BridgeRequestScope, javax.faces.FacesWrapper<BridgeRequestScope>

Author:
Neil Griffin

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.liferay.faces.bridge.scope.BridgeRequestScope
BridgeRequestScope.Transport
 
Constructor Summary
BridgeRequestScopeWrapper()
           
 
Method Summary
 Bridge.PortletPhase getBeganInPhase()
          Determines the Bridge.PortletPhase in which the bridge request scope instance was created.
 long getDateCreated()
          Returns the date in which the scope was created, measured in UTC milliseconds from the epoch.
 String getId()
          Returns the unique identifier, which is prefixed with the value passed to BridgeRequestScope.setIdPrefix(String).
 javax.portlet.PortletMode getPortletMode()
           
 Map<String,String> getPreservedActionParameterMap()
           
 String getPreservedViewStateParam()
           
 Set<String> getRemovedAttributeNames()
          This method returns a mutable set of attribute names that correspond to those that were removed by the BridgeRequestScope.removeExcludedAttributes(RenderRequest) method.
abstract  BridgeRequestScope getWrapped()
           
 boolean isFacesLifecycleExecuted()
          Returns the flag indicating whether or not the Faces Lifecycle was executed.
 boolean isNavigationOccurred()
          Returns the flag indicating whether or not a navigation-rule fired.
 boolean isPortletModeChanged()
          Returns a flag indicating whether or not the PortletMode has changed.
 boolean isRedirectOccurred()
          Returns a flag indicating whether or not a was encountered in a navigation-rule.
 void removeExcludedAttributes(javax.portlet.RenderRequest renderRequest)
          This method removes the excluded request attributes.
 void restoreState(javax.faces.context.FacesContext facesContext)
          This method restores the scoped data that was preserved by the call to BridgeRequestScope.saveState(FacesContext) method as required by section 5.1.2 of the Bridge Spec.
 void saveState(javax.faces.context.FacesContext facesContext)
          This method preserves the scoped data (as defined in Section 5.1.2 of the Bridge Spec).
 void setFacesLifecycleExecuted(boolean facesLifecycleExecuted)
          Sets the flag indicating whether or not the Faces lifecycle was executed.
 void setIdPrefix(String idPrefix)
          Sets the prefix of the unique identifier returned by BridgeRequestScope.getId().
 void setNavigationOccurred(boolean navigationOccurred)
          Sets the flag indicating whether or not a navigation-rule fired.
 void setPortletMode(javax.portlet.PortletMode portletMode)
           
 void setPortletModeChanged(boolean portletModeChanged)
          Sets a flag indicating whether or not the PortletMode has changed.
 void setRedirectOccurred(boolean redirectOccurred)
          Sets a flag indicating whether or not a was encountered in a navigation-rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BridgeRequestScopeWrapper

public BridgeRequestScopeWrapper()
Method Detail

removeExcludedAttributes

public void removeExcludedAttributes(javax.portlet.RenderRequest renderRequest)
Description copied from interface: BridgeRequestScope
This method removes the excluded request attributes. It is designed to be called at the beginning of the RENDER_PHASE of the portlet lifecycle. However, it is only necessary to call this method if BridgePortalContext.POST_REDIRECT_GET_SUPPORT evaluates to false. This is because portlet containers that do indeed implement the POST-REDIRECT-GET design pattern would not have any excluded request attributes carry-over from the ActionRequest to the RenderRequest.

Specified by:
removeExcludedAttributes in interface BridgeRequestScope

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext)
Description copied from interface: BridgeRequestScope
This method restores the scoped data that was preserved by the call to BridgeRequestScope.saveState(FacesContext) method as required by section 5.1.2 of the Bridge Spec. This method is designed to be called during the EVENT_PHASE and RENDER_PHASE of the portlet lifecycle.

Specified by:
restoreState in interface BridgeRequestScope
Parameters:
facesContext - The current FacesContext.

saveState

public void saveState(javax.faces.context.FacesContext facesContext)
Description copied from interface: BridgeRequestScope
This method preserves the scoped data (as defined in Section 5.1.2 of the Bridge Spec). It should only be called during the PortletRequest.ACTION_PHASE and PortletRequest.EVENT_PHASE of the portlet lifecycle.

Specified by:
saveState in interface BridgeRequestScope
Parameters:
facesContext - The current FacesContext.

getBeganInPhase

public Bridge.PortletPhase getBeganInPhase()
Description copied from interface: BridgeRequestScope
Determines the Bridge.PortletPhase in which the bridge request scope instance was created.

Specified by:
getBeganInPhase in interface BridgeRequestScope
Returns:
The Bridge.PortletPhase in which the bridge request scope instance was created.

isFacesLifecycleExecuted

public boolean isFacesLifecycleExecuted()
Description copied from interface: BridgeRequestScope
Returns the flag indicating whether or not the Faces Lifecycle was executed.

Specified by:
isFacesLifecycleExecuted in interface BridgeRequestScope
Returns:
true if the Faces Lifecycle was executed, otherwise false.

isNavigationOccurred

public boolean isNavigationOccurred()
Description copied from interface: BridgeRequestScope
Returns the flag indicating whether or not a navigation-rule fired.

Specified by:
isNavigationOccurred in interface BridgeRequestScope
Returns:
true indicates that a navigation-rule fired, otherwise false.

isPortletModeChanged

public boolean isPortletModeChanged()
Description copied from interface: BridgeRequestScope
Returns a flag indicating whether or not the PortletMode has changed.

Specified by:
isPortletModeChanged in interface BridgeRequestScope
Returns:
true if the portlet mode has changed, otherwise false

isRedirectOccurred

public boolean isRedirectOccurred()
Description copied from interface: BridgeRequestScope
Returns a flag indicating whether or not a was encountered in a navigation-rule.

Specified by:
isRedirectOccurred in interface BridgeRequestScope
Returns:
true indicates that was encountered in a navigation-rule, otherwise false.

getDateCreated

public long getDateCreated()
Description copied from interface: BridgeRequestScope
Returns the date in which the scope was created, measured in UTC milliseconds from the epoch.

Specified by:
getDateCreated in interface BridgeRequestScope

setFacesLifecycleExecuted

public void setFacesLifecycleExecuted(boolean facesLifecycleExecuted)
Description copied from interface: BridgeRequestScope
Sets the flag indicating whether or not the Faces lifecycle was executed.

Specified by:
setFacesLifecycleExecuted in interface BridgeRequestScope
Parameters:
facesLifecycleExecuted - true indicates that the Faces lifecycle was executed, otherwise false.

getId

public String getId()
Description copied from interface: BridgeRequestScope
Returns the unique identifier, which is prefixed with the value passed to BridgeRequestScope.setIdPrefix(String).

Specified by:
getId in interface BridgeRequestScope

setIdPrefix

public void setIdPrefix(String idPrefix)
Description copied from interface: BridgeRequestScope
Sets the prefix of the unique identifier returned by BridgeRequestScope.getId().

Specified by:
setIdPrefix in interface BridgeRequestScope

setNavigationOccurred

public void setNavigationOccurred(boolean navigationOccurred)
Description copied from interface: BridgeRequestScope
Sets the flag indicating whether or not a navigation-rule fired.

Specified by:
setNavigationOccurred in interface BridgeRequestScope
Parameters:
navigationOccurred - true indicates that a navigation-rule fired, otherwise false.

getPortletMode

public javax.portlet.PortletMode getPortletMode()
Specified by:
getPortletMode in interface BridgeRequestScope

setPortletMode

public void setPortletMode(javax.portlet.PortletMode portletMode)
Specified by:
setPortletMode in interface BridgeRequestScope

setPortletModeChanged

public void setPortletModeChanged(boolean portletModeChanged)
Description copied from interface: BridgeRequestScope
Sets a flag indicating whether or not the PortletMode has changed. If true then request attributes will not be preserved when the BridgeRequestScope.saveState(FacesContext) method is called.

Specified by:
setPortletModeChanged in interface BridgeRequestScope

getPreservedActionParameterMap

public Map<String,String> getPreservedActionParameterMap()
Specified by:
getPreservedActionParameterMap in interface BridgeRequestScope

getPreservedViewStateParam

public String getPreservedViewStateParam()
Specified by:
getPreservedViewStateParam in interface BridgeRequestScope

setRedirectOccurred

public void setRedirectOccurred(boolean redirectOccurred)
Description copied from interface: BridgeRequestScope
Sets a flag indicating whether or not a was encountered in a navigation-rule.

Specified by:
setRedirectOccurred in interface BridgeRequestScope
Parameters:
redirectOccurred - true indicates that a was encountered in a navigation-rule, otherwise false.

getRemovedAttributeNames

public Set<String> getRemovedAttributeNames()
Description copied from interface: BridgeRequestScope
This method returns a mutable set of attribute names that correspond to those that were removed by the BridgeRequestScope.removeExcludedAttributes(RenderRequest) method. Since the return value is mutable, callers of this method have an opportunity to add names to the set when necessary.

Specified by:
getRemovedAttributeNames in interface BridgeRequestScope
Returns:
The set of removed attribute names.

getWrapped

public abstract BridgeRequestScope getWrapped()
Specified by:
getWrapped in interface javax.faces.FacesWrapper<BridgeRequestScope>


Copyright © 2015 Liferay, Inc.. All rights reserved.