Package org.apache.myfaces.cdi.view
Class ViewScopeContext
- java.lang.Object
-
- org.apache.myfaces.cdi.view.ViewScopeContext
-
- All Implemented Interfaces:
jakarta.enterprise.context.spi.Context
@Typed public class ViewScopeContext extends Object implements jakarta.enterprise.context.spi.Context
CDI Context to handle @ViewScopedbeans.- Author:
- Leonardo Uribe
-
-
Constructor Summary
Constructors Constructor Description ViewScopeContext(jakarta.enterprise.inject.spi.BeanManager beanManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckActive(FacesContext facesContext)booleandestroy(jakarta.enterprise.context.spi.Contextual bean)static voiddestroyAll(FacesContext facesContext)static voiddestroyAll(FacesContext facesContext, String viewScopeId)<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 ViewScopeContextualStoragegetContextualStorage(FacesContext facesContext, boolean createIfNotExist)StringgetCurrentViewScopeId(boolean create)Class<? extends Annotation>getScope()protected ViewScopeContextualStorageHoldergetStorageHolder(FacesContext facesContext)booleanisActive()booleanisActive(FacesContext facesContext)
-
-
-
Method Detail
-
getStorageHolder
protected ViewScopeContextualStorageHolder getStorageHolder(FacesContext facesContext)
-
getCurrentViewScopeId
public String getCurrentViewScopeId(boolean create)
-
getContextualStorage
protected ViewScopeContextualStorage getContextualStorage(FacesContext facesContext, boolean createIfNotExist)
-
getScope
public Class<? extends Annotation> getScope()
- Specified by:
getScopein interfacejakarta.enterprise.context.spi.Context
-
isActive
public boolean isActive()
- Specified by:
isActivein interfacejakarta.enterprise.context.spi.Context
-
isActive
public boolean isActive(FacesContext facesContext)
-
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
-
checkActive
protected void checkActive(FacesContext facesContext)
-
destroy
public boolean destroy(jakarta.enterprise.context.spi.Contextual bean)
-
destroyAll
public static void destroyAll(FacesContext facesContext)
-
destroyAll
public static void destroyAll(FacesContext facesContext, String viewScopeId)
-
-