Package org.apache.myfaces.cdi.view
Class ViewTransientScopeContext
- java.lang.Object
-
- org.apache.myfaces.cdi.view.ViewTransientScopeContext
-
- All Implemented Interfaces:
jakarta.enterprise.context.spi.Context
@Typed public class ViewTransientScopeContext extends Object implements jakarta.enterprise.context.spi.Context
Minimal implementation of ViewTransientScope.
-
-
Field Summary
Fields Modifier and Type Field Description static StringVIEW_TRANSIENT_SCOPED_STORAGE
-
Constructor Summary
Constructors Constructor Description ViewTransientScopeContext(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)Make sure that the context is really active.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(boolean createIfNotExist, FacesContext facesContext)An implementation has to return the underlying storage which contains the items held in the Context.Class<? extends Annotation>getScope()booleanisActive()booleanisActive(FacesContext facesContext)
-
-
-
Field Detail
-
VIEW_TRANSIENT_SCOPED_STORAGE
public static final String VIEW_TRANSIENT_SCOPED_STORAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
getContextualStorage
protected ContextualStorage getContextualStorage(boolean createIfNotExist, FacesContext facesContext)
An implementation has to return the underlying storage which contains the items held in the Context.- Parameters:
createIfNotExist- whether a ContextualStorage shall get created if it doesn't yet exist.facesContext-- Returns:
- the underlying storage
-
checkActive
protected void checkActive(FacesContext facesContext)
Make sure that the context is really active.- Parameters:
facesContext- the currentFacesContext.- Throws:
jakarta.enterprise.context.ContextNotActiveException- if there is no active context for the current thread.
-
destroyAll
public static void destroyAll(FacesContext facesContext)
-
-