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, jakarta.enterprise.context.spi.Context
Static Imports
java.util.logging.Level.FINEST, .Level.SEVERE

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 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 jakarta.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 jakarta.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 jakarta.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 jakarta.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 void assertNotReleased()

Assert the context is active, otherwise throw ContextNotActiveException.

getback to summary
public <T> T get(Contextual<T> contextual)

Implements jakarta.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 jakarta.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 jakarta.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 jakarta.enterprise.context.spi.Context.isActive.

Determine if the context is active.

Returns:boolean

true if there is a view root, false otherwise.

Annotations
@Override