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
ConstructorsConstructorDescriptionFlowScopeContext(jakarta.enterprise.inject.spi.BeanManager beanManager, Map<Class, FlowReference> flowBeanReferences) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckActive(FacesContext facesContext) booleandestroy(jakarta.enterprise.context.spi.Contextual bean) Destroy the Contextual Instance of the given Bean.static voiddestroyAll(FacesContext facesContext) <T> Tget(jakarta.enterprise.context.spi.Contextual<T> bean) <T> Tget(jakarta.enterprise.context.spi.Contextual<T> bean, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext) protected ContextualStoragegetContextualStorage(FacesContext context, boolean createIfNotExist, String clientWindowFlowId) getCurrentClientWindowFlowId(FacesContext facesContext) Class<? extends Annotation>getScope()protected FlowScopeContextualStorageHoldergetStorageHolder(FacesContext facesContext) booleanisActive()booleanisActive(FacesContext facesContext) boolean
-
Constructor Details
-
FlowScopeContext
public FlowScopeContext(jakarta.enterprise.inject.spi.BeanManager beanManager, Map<Class, FlowReference> flowBeanReferences)
-
-
Method Details
-
getStorageHolder
-
getCurrentClientWindowFlowId
-
getScope
- Specified by:
getScopein interfacejakarta.enterprise.context.spi.Context
-
isActive
public boolean isActive()- Specified by:
isActivein interfacejakarta.enterprise.context.spi.Context
-
isActive
-
checkActive
-
isPassivatingScope
public boolean isPassivatingScope() -
get
public <T> T get(jakarta.enterprise.context.spi.Contextual<T> bean) - Specified by:
getin 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:
getin 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:
trueif the bean was destroyed,falseif there was no such bean.
-
destroyAll
-