Package com.webmethods.caf.faces.portlet
Class PageFlowScopeStorage
java.lang.Object
com.webmethods.caf.faces.portlet.PageFlowScopeStorage
- All Implemented Interfaces:
EventListener
,HttpSessionBindingListener
This class implements storage for Page Flow to preserve portlet state.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPageFlowScopeStorage
(FacesContext facesContext) Creates and touches a new storage container. -
Method Summary
Modifier and TypeMethodDescriptionboolean
expire
(FacesContext context) Checks if this has expired, and if so, releases this' beans.Returns theObject
stored with the given bean name.boolean
isExpired
(FacesContext facesContext) Determines if this storage container is expired, e.g.void
release()
Releases all beans managed by this storage object.protected void
release
(HttpSessionBindingEvent event) void
Stores theObject
with the given bean name.void
touch
(FacesContext facesContext) Touches this storage container.void
void
-
Field Details
-
SESSION_ATTR
-
REQUEST_ID_ATTR
- See Also:
-
REQUEST_KEEP_STATE
- See Also:
-
REQUEST_RESET_STATE
- See Also:
-
CHECKED_FLAG
- See Also:
-
m_beans
-
m_lastRequestID
-
-
Constructor Details
-
PageFlowScopeStorage
Creates and touches a new storage container.- Parameters:
facesContext
-
-
-
Method Details
-
getBean
Returns theObject
stored with the given bean name.- Parameters:
beanName
- name of the bean- Returns:
- the bean
-
setBean
Stores theObject
with the given bean name. Replaces if already set.- Parameters:
beanName
- name of the beanbean
- name of the bean
-
isExpired
Determines if this storage container is expired, e.g. it has not been used in the last request- Parameters:
facesContext
-- Returns:
- true if the storage container is expired
-
touch
Touches this storage container.- Parameters:
facesContext
- Current context
-
release
public void release()Releases all beans managed by this storage object. -
release
-
expire
Checks if this has expired, and if so, releases this' beans. Ensures that the beans are released only once per request.- Parameters:
context
- Current context.- Returns:
true
if this method released the beans, false if it didn't.
-
valueBound
- Specified by:
valueBound
in interfaceHttpSessionBindingListener
-
valueUnbound
- Specified by:
valueUnbound
in interfaceHttpSessionBindingListener
-