@SessionScoped public class FlowScopeBeanHolder extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
CURRENT_FLOW_SCOPE_MAP |
static String |
FLOW_SCOPE_PREFIX_KEY |
Constructor and Description |
---|
FlowScopeBeanHolder() |
Modifier and Type | Method and Description |
---|---|
void |
clearFlowMap(String clientWindowId) |
void |
createCurrentFlowScope(FacesContext facesContext) |
void |
destroyBeans()
This method properly destroys all current @WindowScoped beans
of the active session and also prepares the storage for new beans.
|
void |
destroyBeansOnPreDestroy()
See description on ViewScopeBeanHolder for details about how this works
|
void |
destroyCurrentFlowScope(FacesContext facesContext) |
Map<String,ContextualStorage> |
forceNewStorage()
This method will replace the storageMap and with
a new empty one.
|
List<String> |
getActiveFlowMapKeys(FacesContext facesContext) |
ContextualStorage |
getContextualStorage(javax.enterprise.inject.spi.BeanManager beanManager,
String flowClientWindowId)
This method will return the ContextualStorage or create a new one
if no one is yet assigned to the current flowClientWindowId.
|
ContextualStorage |
getContextualStorageNoCreate(javax.enterprise.inject.spi.BeanManager beanManager,
String flowClientWindowId) |
Map<Object,Object> |
getFlowScopeMap(javax.enterprise.inject.spi.BeanManager beanManager,
String flowClientWindowId,
boolean create) |
Map<String,ContextualStorage> |
getStorageMap() |
void |
init() |
void |
refreshClientWindow(FacesContext facesContext) |
public static final String CURRENT_FLOW_SCOPE_MAP
public static final String FLOW_SCOPE_PREFIX_KEY
@PostConstruct public void init()
public ContextualStorage getContextualStorage(javax.enterprise.inject.spi.BeanManager beanManager, String flowClientWindowId)
beanManager
- we need the CDI BeanManager
for serialisation.flowClientWindowId
- the flowClientWindowId for the current flow.public ContextualStorage getContextualStorageNoCreate(javax.enterprise.inject.spi.BeanManager beanManager, String flowClientWindowId)
public Map<String,ContextualStorage> getStorageMap()
public Map<Object,Object> getFlowScopeMap(javax.enterprise.inject.spi.BeanManager beanManager, String flowClientWindowId, boolean create)
public Map<String,ContextualStorage> forceNewStorage()
Contextual.destroy(Object, javax.enterprise.context.spi.CreationalContext)
should be performed on the returned old storage map.public void destroyBeans()
@PreDestroy public void destroyBeansOnPreDestroy()
public void refreshClientWindow(FacesContext facesContext)
public void clearFlowMap(String clientWindowId)
public List<String> getActiveFlowMapKeys(FacesContext facesContext)
public void createCurrentFlowScope(FacesContext facesContext)
public void destroyCurrentFlowScope(FacesContext facesContext)
Copyright © 2020 The Apache Software Foundation. All rights reserved.