Package com.sun.faces.application.view
Class ViewScopeManager
java.lang.Object
com.sun.faces.application.view.ViewScopeManager
- All Implemented Interfaces:
FacesListener,SystemEventListener,ViewMapListener,jakarta.servlet.http.HttpSessionListener,EventListener
public class ViewScopeManager extends Object implements jakarta.servlet.http.HttpSessionListener, ViewMapListener
The manager that deals with non-CDI and CDI ViewScoped beans.
-
Field Summary
Fields Modifier and Type Field Description static StringACTIVE_VIEW_MAPSStores the constants to keep track of the active view maps.static StringACTIVE_VIEW_MAPS_SIZEStores the constant for the maximum active view map size.static StringVIEW_MAPStores the view map.static StringVIEW_MAP_IDStores the view map id.static StringVIEW_SCOPE_MANAGERStores the constant to keep track of the ViewScopeManager. -
Constructor Summary
Constructors Constructor Description ViewScopeManager()Constructor. -
Method Summary
Modifier and Type Method Description voidclear(FacesContext facesContext)Clear the current view map using the Faces context.voidclear(FacesContext facesContext, Map<String,Object> viewMap)Clear the given view map.voiddestroyBeans(FacesContext facesContext, Map<String,Object> viewMap)Destroy the managed beans from the given view map.static ViewScopeManagergetInstance(FacesContext facesContext)Get our instance.booleanisListenerForSource(Object source)Is a listener for the given source.voidprocessEvent(SystemEvent se)Process the system event.voidsessionCreated(jakarta.servlet.http.HttpSessionEvent se)Create the associated data in the session (if any).voidsessionDestroyed(jakarta.servlet.http.HttpSessionEvent hse)Destroy the associated data in the session.
-
Field Details
-
ACTIVE_VIEW_MAPS
Stores the constants to keep track of the active view maps.- See Also:
- Constant Field Values
-
ACTIVE_VIEW_MAPS_SIZE
Stores the constant for the maximum active view map size.- See Also:
- Constant Field Values
-
VIEW_MAP
Stores the view map.- See Also:
- Constant Field Values
-
VIEW_MAP_ID
Stores the view map id.- See Also:
- Constant Field Values
-
VIEW_SCOPE_MANAGER
Stores the constant to keep track of the ViewScopeManager.- See Also:
- Constant Field Values
-
-
Constructor Details
-
ViewScopeManager
public ViewScopeManager()Constructor.
-
-
Method Details
-
clear
Clear the current view map using the Faces context.- Parameters:
facesContext- the Faces context.
-
clear
Clear the given view map.- Parameters:
facesContext- the Faces context.viewMap- the view map.
-
destroyBeans
Destroy the managed beans from the given view map.- Parameters:
facesContext- the Faces Context.viewMap- the view map.
-
getInstance
Get our instance.- Parameters:
facesContext- the FacesContext.
-
isListenerForSource
Is a listener for the given source.- Specified by:
isListenerForSourcein interfaceSystemEventListener- Parameters:
source- the source.- Returns:
- true if UIViewRoot, false otherwise.
-
processEvent
Process the system event.- Specified by:
processEventin interfaceSystemEventListener- Parameters:
se- the system event.- Throws:
AbortProcessingException- when processing needs to be aborter.
-
sessionCreated
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent se)Create the associated data in the session (if any).- Specified by:
sessionCreatedin interfacejakarta.servlet.http.HttpSessionListener- Parameters:
se- the HTTP session event.
-
sessionDestroyed
public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent hse)Destroy the associated data in the session.- Specified by:
sessionDestroyedin interfacejakarta.servlet.http.HttpSessionListener- Parameters:
hse- the HTTP session event.
-