Package org.apache.myfaces.flow.cdi
Class FlowScopeContext
- java.lang.Object
-
- org.apache.myfaces.flow.cdi.FlowScopeContext
-
- All Implemented Interfaces:
jakarta.enterprise.context.spi.Context
@Typed public class FlowScopeContext extends Object implements jakarta.enterprise.context.spi.Context
Implementation of FlowScope.- Author:
- Leonardo Uribe
-
-
Constructor Summary
Constructors Constructor Description FlowScopeContext(jakarta.enterprise.inject.spi.BeanManager beanManager, Map<Class,FlowReference> flowBeanReferences)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkActive(FacesContext facesContext)
boolean
destroy(jakarta.enterprise.context.spi.Contextual bean)
Destroy the Contextual Instance of the given Bean.static void
destroyAll(FacesContext facesContext)
<T> T
get(jakarta.enterprise.context.spi.Contextual<T> bean)
<T> T
get(jakarta.enterprise.context.spi.Contextual<T> bean, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)
protected ContextualStorage
getContextualStorage(FacesContext context, boolean createIfNotExist, String clientWindowFlowId)
String
getCurrentClientWindowFlowId(FacesContext facesContext)
Class<? extends Annotation>
getScope()
protected FlowScopeContextualStorageHolder
getStorageHolder(FacesContext facesContext)
boolean
isActive()
boolean
isActive(FacesContext facesContext)
boolean
isPassivatingScope()
-
-
-
Constructor Detail
-
FlowScopeContext
public FlowScopeContext(jakarta.enterprise.inject.spi.BeanManager beanManager, Map<Class,FlowReference> flowBeanReferences)
-
-
Method Detail
-
getStorageHolder
protected FlowScopeContextualStorageHolder getStorageHolder(FacesContext facesContext)
-
getCurrentClientWindowFlowId
public String getCurrentClientWindowFlowId(FacesContext facesContext)
-
getScope
public Class<? extends Annotation> getScope()
- Specified by:
getScope
in interfacejakarta.enterprise.context.spi.Context
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfacejakarta.enterprise.context.spi.Context
-
isActive
public boolean isActive(FacesContext facesContext)
-
checkActive
protected void checkActive(FacesContext facesContext)
-
isPassivatingScope
public boolean isPassivatingScope()
-
get
public <T> T get(jakarta.enterprise.context.spi.Contextual<T> bean)
- Specified by:
get
in interfacejakarta.enterprise.context.spi.Context
-
get
public <T> T get(jakarta.enterprise.context.spi.Contextual<T> bean, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)
- Specified by:
get
in interfacejakarta.enterprise.context.spi.Context
-
getContextualStorage
protected ContextualStorage getContextualStorage(FacesContext context, boolean createIfNotExist, String clientWindowFlowId)
-
destroy
public boolean destroy(jakarta.enterprise.context.spi.Contextual bean)
Destroy the Contextual Instance of the given Bean.- Parameters:
bean
- dictates which bean shall get cleaned up- Returns:
true
if the bean was destroyed,false
if there was no such bean.
-
destroyAll
public static void destroyAll(FacesContext facesContext)
-
-