Package org.apache.myfaces.flow.cdi
Class FlowScopeContextualStorageHolder
- java.lang.Object
-
- org.apache.myfaces.cdi.util.AbstractContextualStorageHolder<ContextualStorage>
-
- org.apache.myfaces.flow.cdi.FlowScopeContextualStorageHolder
-
- All Implemented Interfaces:
Serializable
@Typed(FlowScopeContextualStorageHolder.class) @SessionScoped public class FlowScopeContextualStorageHolder extends AbstractContextualStorageHolder<ContextualStorage> implements Serializable
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.- Author:
- lu4242
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CURRENT_FLOW_SCOPE_MAP
-
Fields inherited from class org.apache.myfaces.cdi.util.AbstractContextualStorageHolder
applicationContextBean, beanManager, storageMap
-
-
Constructor Summary
Constructors Constructor Description FlowScopeContextualStorageHolder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearFlowMap(FacesContext facesContext, String clientWindowId)
void
createCurrentFlowScope(FacesContext facesContext)
void
destroyCurrentFlowScope(FacesContext facesContext)
List<String>
getActiveFlowMapKeys(FacesContext facesContext)
Map<Object,Object>
getFlowScopeMap(jakarta.enterprise.inject.spi.BeanManager beanManager, String flowClientWindowId, boolean create)
static FlowScopeContextualStorageHolder
getInstance(FacesContext facesContext)
static FlowScopeContextualStorageHolder
getInstance(FacesContext facesContext, boolean create)
void
init()
protected boolean
isSkipDestroy(Map.Entry<Object,ContextualInstanceInfo<?>> entry)
protected ContextualStorage
newContextualStorage(String slotId)
void
refreshClientWindow(FacesContext facesContext)
-
Methods inherited from class org.apache.myfaces.cdi.util.AbstractContextualStorageHolder
destroyAll, destroyAll, destroyAll, forceNewStorage, getContextualStorage, getContextualStorage, getInstance, getInstance, getStorageMap, preDestroy
-
-
-
-
Field Detail
-
CURRENT_FLOW_SCOPE_MAP
public static final String CURRENT_FLOW_SCOPE_MAP
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
@PostConstruct public void init()
- Overrides:
init
in classAbstractContextualStorageHolder<ContextualStorage>
-
getFlowScopeMap
public Map<Object,Object> getFlowScopeMap(jakarta.enterprise.inject.spi.BeanManager beanManager, String flowClientWindowId, boolean create)
-
refreshClientWindow
public void refreshClientWindow(FacesContext facesContext)
-
clearFlowMap
public void clearFlowMap(FacesContext facesContext, String clientWindowId)
-
getActiveFlowMapKeys
public List<String> getActiveFlowMapKeys(FacesContext facesContext)
-
createCurrentFlowScope
public void createCurrentFlowScope(FacesContext facesContext)
-
destroyCurrentFlowScope
public void destroyCurrentFlowScope(FacesContext facesContext)
-
isSkipDestroy
protected boolean isSkipDestroy(Map.Entry<Object,ContextualInstanceInfo<?>> entry)
- Overrides:
isSkipDestroy
in classAbstractContextualStorageHolder<ContextualStorage>
-
newContextualStorage
protected ContextualStorage newContextualStorage(String slotId)
- Specified by:
newContextualStorage
in classAbstractContextualStorageHolder<ContextualStorage>
-
getInstance
public static FlowScopeContextualStorageHolder getInstance(FacesContext facesContext)
-
getInstance
public static FlowScopeContextualStorageHolder getInstance(FacesContext facesContext, boolean create)
-
-