|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BridgeRequestScope
Section 5.1.2 of the JSR 329 Spec describes a concept called the "bridge request scope," the purpose of which is to
bridge the gap between the portlet lifecycle's ACTION_PHASE, EVENT_PHASE, and RENDER_PHASE. When the user invokes an
HTTP POST operation by clicking on a Submit button, the portlet lifecycle's ACTION_PHASE will be invoked, and the
bridge will execute all the phases of the JSF lifecycle except for RENDER_RESPONSE -- which is to be done later in
the portlet lifecycle's RENDER_PHASE. The problem is that there might be things stored as request attributes like
FacesMessage(s), and JSF Managed-Bean(s) during in the ACTION_PHASE, but also need to be referenced in the
RENDER_PHASE. Technically, the ActionRequest created for the ACTION_PHASE and the RenderRequest
created for the RENDER_PHASE are two different objects, and so the BridgeRequestScope exists to maintain request
attribute values between the two phases.
| Nested Class Summary | |
|---|---|
static class |
BridgeRequestScope.Transport
|
| 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 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 removeExcludedAttributes(RenderRequest) method. |
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 |
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 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 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 |
| Method Detail |
|---|
void removeExcludedAttributes(javax.portlet.RenderRequest renderRequest)
PortletContainer.isPostRedirectGetSupported() returns 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.
void restoreState(javax.faces.context.FacesContext facesContext)
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.
facesContext - The current FacesContext.void saveState(javax.faces.context.FacesContext facesContext)
PortletRequest.ACTION_PHASE and PortletRequest.EVENT_PHASE
of the portlet lifecycle.
facesContext - The current FacesContext.Bridge.PortletPhase getBeganInPhase()
Bridge#PortletPhase in which the bridge request scope instance was created.
Bridge#PortletPhase in which the bridge request scope instance was created.boolean isFacesLifecycleExecuted()
true if the Faces Lifecycle was executed, otherwise false.boolean isNavigationOccurred()
true indicates that a navigation-rule fired, otherwise false.boolean isPortletModeChanged()
true if the portlet mode has changed, otherwise falseboolean isRedirectOccurred()
true indicates that
false.long getDateCreated()
void setFacesLifecycleExecuted(boolean facesLifecycleExecuted)
facesLifecycleExecuted - true indicates that the Faces lifecycle was executed, otherwise
false.String getId()
setIdPrefix(String).
void setIdPrefix(String idPrefix)
getId().
void setNavigationOccurred(boolean navigationOccurred)
navigationOccurred - true indicates that a navigation-rule fired, otherwise
false.javax.portlet.PortletMode getPortletMode()
void setPortletMode(javax.portlet.PortletMode portletMode)
void setPortletModeChanged(boolean portletModeChanged)
true then request attributes
will not be preserved when the saveState(FacesContext) method is called.
Map<String,String> getPreservedActionParameterMap()
String getPreservedViewStateParam()
void setRedirectOccurred(boolean redirectOccurred)
redirectOccurred - true indicates that a false.Set<String> getRemovedAttributeNames()
removeExcludedAttributes(RenderRequest) method. Since the return value is mutable, callers of this method have
an opportunity to add names to the set when necessary.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||