java.lang.Object
com.sun.faces.cdi.ViewProducer
- All Implemented Interfaces:
Contextual<UIViewRoot>
,Bean<UIViewRoot>
,BeanAttributes<UIViewRoot>
,PassivationCapable
,Serializable
The ViewProducer is the CDI producer that allows you to inject the UIViewRoot and to do EL resolving of #{view}
- Since:
- 2.3
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.sun.faces.cdi.CdiProducer
<UIViewRoot> create
(CreationalContext<UIViewRoot> creationalContext) Create a new instance of the contextual type.protected com.sun.faces.cdi.CdiProducer
<UIViewRoot> create
(Function<CreationalContext<UIViewRoot>, UIViewRoot> create) void
destroy
(UIViewRoot instance, CreationalContext<UIViewRoot> creationalContext) Destroy the instance.Class
<?> The bean class of the managed bean or session bean or of the bean that declares the producer method or field.getId()
Get the ID of this particular instantiation of the producer.Get the injection points.getName()
Obtains the EL name of a bean, if it has one.Get the default qualifier.Class
<? extends Annotation> getScope()
Obtains the scope of the bean.Set
<Class<? extends Annotation>> Get the stereotypes.getTypes()
Obtains the bean types of the bean.boolean
Is this an alternative.boolean
protected com.sun.faces.cdi.CdiProducer
<UIViewRoot> protected com.sun.faces.cdi.CdiProducer
<UIViewRoot> qualifiers
(Annotation... qualifiers) protected com.sun.faces.cdi.CdiProducer
<UIViewRoot> scope
(Class<? extends Annotation> scope) protected com.sun.faces.cdi.CdiProducer
<UIViewRoot>
-
Constructor Details
-
ViewProducer
public ViewProducer()
-
-
Method Details
-
getId
Get the ID of this particular instantiation of the producer.This is an implementation detail of CDI, where it wants to relocate a particular producer in order to re-inject a value. This is typically used in combination with passivation. Note that this is NOT about the value we're producing, but about the producer itself.
- Specified by:
getId
in interfacePassivationCapable
- Returns:
- the ID of this particular instantiation of the producer
-
getName
Description copied from interface:BeanAttributes
Obtains the EL name of a bean, if it has one.- Specified by:
getName
in interfaceBeanAttributes<T>
- Returns:
- the EL name
-
getBeanClass
-
getTypes
Description copied from interface:BeanAttributes
Obtains the bean types of the bean.- Specified by:
getTypes
in interfaceBeanAttributes<T>
- Returns:
- the bean types
-
getQualifiers
Get the default qualifier.- Specified by:
getQualifiers
in interfaceBeanAttributes<T>
- Returns:
- the qualifiers, which in the default case only contains the Default
-
getScope
Description copied from interface:BeanAttributes
Obtains the scope of the bean.- Specified by:
getScope
in interfaceBeanAttributes<T>
- Returns:
- the scope
-
create
Description copied from interface:Contextual
Create a new instance of the contextual type. Instances should use the givenCreationalContext
when obtaining contextual references to inject, in order to ensure that any dependent objects are associated with the contextual instance that is being created. An implementation may callCreationalContext.push(Object)
between instantiation and injection to help the container minimize the use of client proxy objects.- Specified by:
create
in interfaceContextual<T>
- Parameters:
creationalContext
- the context in which this instance is being created- Returns:
- the contextual instance
-
destroy
Destroy the instance.Since most artifact that the sub classes are producing are artifacts that the Faces runtime really is managing the destroy method here does not need to do anything.
- Specified by:
destroy
in interfaceContextual<T>
- Parameters:
instance
- the instance.creationalContext
- the creational context.
-
getInjectionPoints
Get the injection points.- Specified by:
getInjectionPoints
in interfaceBean<T>
- Returns:
- the injection points.
-
getStereotypes
Get the stereotypes.- Specified by:
getStereotypes
in interfaceBeanAttributes<T>
- Returns:
- the stereotypes.
-
isAlternative
public boolean isAlternative()Is this an alternative.- Specified by:
isAlternative
in interfaceBeanAttributes<T>
- Returns:
- false.
-
isNullable
public boolean isNullable() -
name
-
create
protected com.sun.faces.cdi.CdiProducer<UIViewRoot> create(Function<CreationalContext<UIViewRoot>, UIViewRoot> create) -
types
-
qualifiers
-
scope
-
addToId
-