public class ViewScopeManager
extends java.lang.Object
implements javax.servlet.http.HttpSessionListener, javax.faces.event.ViewMapListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTIVE_VIEW_MAPS
Stores the constants to keep track of the active view maps.
|
static java.lang.String |
ACTIVE_VIEW_MAPS_SIZE
Stores the constant for the maximum active view map size.
|
private ViewScopeContextManager |
contextManager
Stores the CDI context manager.
|
private boolean |
distributable |
private static java.util.logging.Logger |
LOGGER
Stores the logger.
|
static java.lang.String |
VIEW_MAP
Stores the view map.
|
static java.lang.String |
VIEW_MAP_ID
Stores the view map id.
|
static java.lang.String |
VIEW_SCOPE_MANAGER
Stores the constant to keep track of the ViewScopeManager.
|
Constructor and Description |
---|
ViewScopeManager()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear(javax.faces.context.FacesContext facesContext)
Clear the current view map using the Faces context.
|
void |
clear(javax.faces.context.FacesContext facesContext,
java.util.Map<java.lang.String,java.lang.Object> viewMap)
Clear the given view map.
|
private void |
destroyBeans(ApplicationAssociate applicationAssociate,
java.util.Map<java.lang.String,java.lang.Object> viewMap)
Destroy the managed beans from the given view map.
|
void |
destroyBeans(javax.faces.context.FacesContext facesContext,
java.util.Map<java.lang.String,java.lang.Object> viewMap)
Destroy the managed beans from the given view map.
|
(package private) ViewScopeContextManager |
getContextManager()
Get the CDI context manager.
|
static ViewScopeManager |
getInstance(javax.faces.context.FacesContext facesContext)
Get our instance.
|
boolean |
isListenerForSource(java.lang.Object source)
Is a listener for the given source.
|
void |
processEvent(javax.faces.event.SystemEvent se)
Process the system event.
|
private void |
processPostConstructViewMap(javax.faces.event.SystemEvent se)
Process the PostConstructViewMap system event.
|
private void |
processPreDestroyViewMap(javax.faces.event.SystemEvent se)
Process the PreDestroyViewMap system event.
|
private void |
removeEldestViewMap(javax.faces.context.FacesContext facesContext,
java.util.Map<java.lang.String,java.lang.Object> eldestViewMap)
Remove the eldest view map from the active view maps.
|
void |
sessionCreated(javax.servlet.http.HttpSessionEvent se)
Create the associated data in the session (if any).
|
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent hse)
Destroy the associated data in the session.
|
private static final java.util.logging.Logger LOGGER
public static final java.lang.String ACTIVE_VIEW_MAPS
public static final java.lang.String ACTIVE_VIEW_MAPS_SIZE
public static final java.lang.String VIEW_MAP
public static final java.lang.String VIEW_MAP_ID
public static final java.lang.String VIEW_SCOPE_MANAGER
private ViewScopeContextManager contextManager
private boolean distributable
public void clear(javax.faces.context.FacesContext facesContext)
facesContext
- the Faces context.public void clear(javax.faces.context.FacesContext facesContext, java.util.Map<java.lang.String,java.lang.Object> viewMap)
facesContext
- the Faces context.viewMap
- the view map.private void destroyBeans(ApplicationAssociate applicationAssociate, java.util.Map<java.lang.String,java.lang.Object> viewMap)
applicationAssociate
- the application associate.viewMap
- the view map.public void destroyBeans(javax.faces.context.FacesContext facesContext, java.util.Map<java.lang.String,java.lang.Object> viewMap)
facesContext
- the Faces Context.viewMap
- the view map.ViewScopeContextManager getContextManager()
public static ViewScopeManager getInstance(javax.faces.context.FacesContext facesContext)
facesContext
- the FacesContext.public boolean isListenerForSource(java.lang.Object source)
isListenerForSource
in interface javax.faces.event.SystemEventListener
source
- the source.public void processEvent(javax.faces.event.SystemEvent se) throws javax.faces.event.AbortProcessingException
processEvent
in interface javax.faces.event.SystemEventListener
se
- the system event.javax.faces.event.AbortProcessingException
- when processing needs to be aborter.private void processPostConstructViewMap(javax.faces.event.SystemEvent se)
se
- the system event.private void processPreDestroyViewMap(javax.faces.event.SystemEvent se)
se
- the system event.public void sessionCreated(javax.servlet.http.HttpSessionEvent se)
sessionCreated
in interface javax.servlet.http.HttpSessionListener
se
- the HTTP session event.public void sessionDestroyed(javax.servlet.http.HttpSessionEvent hse)
sessionDestroyed
in interface javax.servlet.http.HttpSessionListener
hse
- the HTTP session event.private void removeEldestViewMap(javax.faces.context.FacesContext facesContext, java.util.Map<java.lang.String,java.lang.Object> eldestViewMap)
eldestViewMap
- the eldest view map.Copyright © 2002-2013 Oracle America, Inc. All Rights Reserved.