com.liferay.faces.bridge.scope.internal
Class BridgeRequestScopeImpl
java.lang.Object
com.liferay.faces.bridge.scope.internal.BridgeRequestScopeBaseImpl
com.liferay.faces.bridge.scope.internal.BridgeRequestScopeCompatImpl
com.liferay.faces.bridge.scope.internal.BridgeRequestScopeCompat_2_2_Impl
com.liferay.faces.bridge.scope.internal.BridgeRequestScopeImpl
- All Implemented Interfaces:
- BridgeRequestScope, Serializable
- Direct Known Subclasses:
- BridgeRequestScopeLiferayImpl
public class BridgeRequestScopeImpl
- extends BridgeRequestScopeCompat_2_2_Impl
- implements Serializable
- Author:
- Neil Griffin
- See Also:
- Serialized Form
BRIDGE_REQ_SCOPE_NON_EXCLUDED_ATTR_NAMES
protected static final String BRIDGE_REQ_SCOPE_NON_EXCLUDED_ATTR_NAMES
- See Also:
- Constant Field Values
EXCLUDED_NAMESPACE_JAVAX_FACES
protected static final String EXCLUDED_NAMESPACE_JAVAX_FACES
- See Also:
- Constant Field Values
EXCLUDED_NAMESPACE_JAVAX_PORTLET
protected static final String EXCLUDED_NAMESPACE_JAVAX_PORTLET
- See Also:
- Constant Field Values
EXCLUDED_NAMESPACE_JAVAX_PORTLET_FACES
protected static final String EXCLUDED_NAMESPACE_JAVAX_PORTLET_FACES
- See Also:
- Constant Field Values
EXCLUCED_NAMESPACE_JAVAX_SERVLET
protected static final String EXCLUCED_NAMESPACE_JAVAX_SERVLET
- See Also:
- Constant Field Values
EXCLUCED_NAMESPACE_JAVAX_SERVLET_INCLUDE
protected static final String EXCLUCED_NAMESPACE_JAVAX_SERVLET_INCLUDE
- See Also:
- Constant Field Values
BridgeRequestScopeImpl
public BridgeRequestScopeImpl(javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletConfig portletConfig,
BridgeConfig bridgeConfig)
hashCode
public int hashCode()
- The overrides for
toString() and hashCode() are necessary because the ConcurrentHashMap
parent class overrides them and causes debug logs to be difficult to interpret.
- Overrides:
hashCode in class Object
removeExcludedAttributes
public void removeExcludedAttributes(javax.portlet.RenderRequest renderRequest)
- Unlike Pluto, Liferay will preserve/copy request attributes that were originally set on an
ActionRequest
into the RenderRequest. However, the Bridge Spec assumes that they will not be preserved. Therefore is
necessary to remove these request attributes when running under Liferay.
- Specified by:
removeExcludedAttributes in interface BridgeRequestScope
restoreState
public void restoreState(javax.faces.context.FacesContext facesContext)
- Specified by:
restoreState in interface BridgeRequestScope
saveState
public void saveState(javax.faces.context.FacesContext facesContext)
- Saves the state of the FacesContext as required by section 5.1.2 of the JSR 329 spec. This method is designed to
be called during the ACTION_PHASE of the portlet lifecycle.
- Specified by:
saveState in interface BridgeRequestScope
- Parameters:
facesContext - The current faces context.
toString
public String toString()
- The overrides for
toString() and hashCode() are necessary because the ConcurrentHashMap
parent class overrides them and causes debug logs to be difficult to interpret.
- Overrides:
toString in class Object
getBeganInPhase
public Bridge.PortletPhase getBeganInPhase()
- Specified by:
getBeganInPhase in interface BridgeRequestScope
isFacesLifecycleExecuted
public boolean isFacesLifecycleExecuted()
- Specified by:
isFacesLifecycleExecuted in interface BridgeRequestScope
isNavigationOccurred
public boolean isNavigationOccurred()
- Specified by:
isNavigationOccurred in interface BridgeRequestScope
isPortletModeChanged
public boolean isPortletModeChanged()
- Specified by:
isPortletModeChanged in interface BridgeRequestScope
isRedirectOccurred
public boolean isRedirectOccurred()
- Specified by:
isRedirectOccurred in interface BridgeRequestScope
getDateCreated
public long getDateCreated()
- Specified by:
getDateCreated in interface BridgeRequestScope
isExcludedRequestAttributeByInstance
protected boolean isExcludedRequestAttributeByInstance(String attributeName,
Object attributeValue)
isExcludedRequestAttributeByNamespace
protected boolean isExcludedRequestAttributeByNamespace(String attributeName)
setFacesLifecycleExecuted
public void setFacesLifecycleExecuted(boolean facesLifecycleExecuted)
- Specified by:
setFacesLifecycleExecuted in interface BridgeRequestScope
isExcludedRequestAttributeByConfig
protected boolean isExcludedRequestAttributeByConfig(String attributeName,
Object attributeValue)
isExcludedRequestAttributeByPreExisting
protected boolean isExcludedRequestAttributeByPreExisting(String attributeName)
isNamespaceMatch
protected boolean isNamespaceMatch(String attributeName,
String namespace)
getId
public String getId()
- Specified by:
getId in interface BridgeRequestScope
setIdPrefix
public void setIdPrefix(String idPrefix)
- Specified by:
setIdPrefix in interface BridgeRequestScope
getManagedBeanMap
public Map<String,Object> getManagedBeanMap()
isExcludedRequestAttributeByAnnotation
protected boolean isExcludedRequestAttributeByAnnotation(Object attributeValue)
setNavigationOccurred
public void setNavigationOccurred(boolean navigationOccurred)
- Specified by:
setNavigationOccurred in interface BridgeRequestScope
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)
- Specified by:
setPortletModeChanged in interface BridgeRequestScope
getPreExistingRequestAttributeNames
protected Set<String> getPreExistingRequestAttributeNames(javax.portlet.PortletRequest portletRequest)
- According to section 5.1.2 of the JSR 329 spec, the request attributes that exist before the bridge acquires the
FacesContext must not be part of the bridge request scope. Having noted that, we have to save-off a list of names
of these pre-existing request attributes, so that we know to NOT restore them.
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 redirect)
- Specified by:
setRedirectOccurred in interface BridgeRequestScope
getRemovedAttributeNames
public Set<String> getRemovedAttributeNames()
- Specified by:
getRemovedAttributeNames in interface BridgeRequestScope
Copyright © 2015 Liferay, Inc.. All rights reserved.