|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.flow.cdi.FlowScopeBeanHolder
@SessionScoped public class FlowScopeBeanHolder
This holder will store the flow scope active ids and it's beans for the current HTTP Session. We use standard SessionScoped bean to not need to treat async-supported and similar headache.
Field Summary | |
---|---|
static String |
CURRENT_FLOW_SCOPE_MAP
|
static String |
FLOW_SCOPE_PREFIX_KEY
|
Constructor Summary | |
---|---|
FlowScopeBeanHolder()
|
Method Summary | |
---|---|
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)
|
String |
getFlowMapKey(FacesContext facesContext,
FlowReference flowReference)
|
Map<Object,Object> |
getFlowScopeMap(javax.enterprise.inject.spi.BeanManager beanManager,
String flowClientWindowId,
boolean create)
|
Map<String,ContextualStorage> |
getStorageMap()
|
void |
init()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CURRENT_FLOW_SCOPE_MAP
public static final String FLOW_SCOPE_PREFIX_KEY
Constructor Detail |
---|
public FlowScopeBeanHolder()
Method Detail |
---|
@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 List<String> getActiveFlowMapKeys(FacesContext facesContext)
public String getFlowMapKey(FacesContext facesContext, FlowReference flowReference)
public void createCurrentFlowScope(FacesContext facesContext)
public void destroyCurrentFlowScope(FacesContext facesContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |