@Typed public class ViewScopeContextImpl extends Object implements javax.enterprise.context.spi.Context
ViewScoped
beans.Constructor and Description |
---|
ViewScopeContextImpl(javax.enterprise.inject.spi.BeanManager beanManager) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkActive()
Make sure that the Context is really active.
|
boolean |
destroy(javax.enterprise.context.spi.Contextual bean)
Destroy the Contextual Instance of the given Bean.
|
void |
destroyAllActive()
destroys all the Contextual Instances in the Storage returned by
getContextualStorage(boolean) . |
static void |
destroyAllActive(ViewScopeContextualStorage storage) |
static void |
destroyAllActive(ViewScopeContextualStorage storage,
FacesContext facesContext) |
<T> T |
get(javax.enterprise.context.spi.Contextual<T> bean) |
<T> T |
get(javax.enterprise.context.spi.Contextual<T> bean,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
protected ViewScopeContextualStorage |
getContextualStorage(boolean createIfNotExist) |
String |
getCurrentViewScopeId(boolean create) |
protected static ManagedBeanDestroyer |
getManagedBeanDestroyer(ExternalContext externalContext) |
Class<? extends Annotation> |
getScope() |
protected ViewScopeBeanHolder |
getViewScopeBeanHolder() |
protected ViewScopeBeanHolder |
getViewScopeBeanHolder(FacesContext facesContext) |
boolean |
isActive()
The WindowContext is active once a current windowId is set for the current Thread.
|
public ViewScopeContextImpl(javax.enterprise.inject.spi.BeanManager beanManager)
protected ViewScopeBeanHolder getViewScopeBeanHolder()
protected ViewScopeBeanHolder getViewScopeBeanHolder(FacesContext facesContext)
public String getCurrentViewScopeId(boolean create)
protected ViewScopeContextualStorage getContextualStorage(boolean createIfNotExist)
public Class<? extends Annotation> getScope()
getScope
in interface javax.enterprise.context.spi.Context
public boolean isActive()
isActive
in interface javax.enterprise.context.spi.Context
public <T> T get(javax.enterprise.context.spi.Contextual<T> bean)
get
in interface javax.enterprise.context.spi.Context
public <T> T get(javax.enterprise.context.spi.Contextual<T> bean, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
get
in interface javax.enterprise.context.spi.Context
public boolean destroy(javax.enterprise.context.spi.Contextual bean)
bean
- dictates which bean shall get cleaned uptrue
if the bean was destroyed, false
if there was no such bean.public void destroyAllActive()
getContextualStorage(boolean)
.public static void destroyAllActive(ViewScopeContextualStorage storage)
public static void destroyAllActive(ViewScopeContextualStorage storage, FacesContext facesContext)
protected void checkActive()
javax.enterprise.context.ContextNotActiveException
- if there is no active
Context for the current Thread.protected static ManagedBeanDestroyer getManagedBeanDestroyer(ExternalContext externalContext)
Copyright © 2020 The Apache Software Foundation. All rights reserved.