Top Description Fields Constructors Methods
com.sun.faces.application.view

public Class ViewScopeContext

extends Object
implements Context, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.enterprise.context.spi.Context
Imports
java.io.Serializable, java.lang.annotation.Annotation, java.util.logging.Level, .Logger, javax.enterprise.context.ContextNotActiveException, javax.enterprise.context.spi.Context, .Contextual, .CreationalContext, javax.faces.component.UIViewRoot, javax.faces.context.FacesContext, javax.faces.view.ViewScoped

The CDI context for CDI ViewScoped beans.

Field Summary

Modifier and TypeField and Description
private static final Logger
LOGGER

Stores the logger.

private static final long
serialVersionUID

Stores the serial version UID.

Constructor Summary

AccessConstructor and Description
public
ViewScopeContext()

Constructor.

Method Summary

Modifier and TypeMethod and Description
private final void
assertNotReleased()

Assert the context is active, otherwise throw ContextNotActiveException.

public <
the type.
T
>
T

Returns:

the view scoped bean, or null if not found.
get
(Contextual<T>
the contextual.
contextual
)

Implements javax.enterprise.context.spi.Context.get.

Get the ViewScoped bean for the given contextual.
public <
the type.
T
>
T

Returns:

the instance.
get
(Contextual<T>
the contextual.
contextual
,
CreationalContext<T>
the creational.
creational
)

Implements javax.enterprise.context.spi.Context.get.

Get the existing instance of the ViewScoped bean for the given contextual or create a new one.
public Class<? extends Annotation>

Returns:

the class.
getScope
()

Implements javax.enterprise.context.spi.Context.getScope.

Get the class of the scope object.
public boolean

Returns:

true if there is a view root, false otherwise.
isActive
()

Implements javax.enterprise.context.spi.Context.isActive.

Determine if the context is active.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

Stores the logger.

serialVersionUIDback to summary
private static final long serialVersionUID

Stores the serial version UID.

Constructor Detail

ViewScopeContextback to summary
public ViewScopeContext()

Constructor.

Method Detail

assertNotReleasedback to summary
private final void assertNotReleased()

Assert the context is active, otherwise throw ContextNotActiveException.

Annotations
@SuppressWarnings:FinalPrivateMethod
getback to summary
public <T> T get(Contextual<T> contextual)

Implements javax.enterprise.context.spi.Context.get.

Get the ViewScoped bean for the given contextual.

Parameters
<T>
the type.
contextual:Contextual<T>

the contextual.

Returns:T

the view scoped bean, or null if not found.

Annotations
@Override
getback to summary
public <T> T get(Contextual<T> contextual, CreationalContext<T> creational)

Implements javax.enterprise.context.spi.Context.get.

Get the existing instance of the ViewScoped bean for the given contextual or create a new one.

Parameters
<T>
the type.
contextual:Contextual<T>

the contextual.

creational:CreationalContext<T>

the creational.

Returns:T

the instance.

Annotations
@Override
Exceptions
ContextNotActiveException:
when the context is not active.
getScopeback to summary
public Class<? extends Annotation> getScope()

Implements javax.enterprise.context.spi.Context.getScope.

Get the class of the scope object.

Returns:Class<? extends Annotation>

the class.

Annotations
@Override
isActiveback to summary
public boolean isActive()

Implements javax.enterprise.context.spi.Context.isActive.

Determine if the context is active.

Returns:boolean

true if there is a view root, false otherwise.

Annotations
@Override