Class DataModelClassesMapProducer

java.lang.Object
com.sun.faces.cdi.DataModelClassesMapProducer
All Implemented Interfaces:
jakarta.enterprise.context.spi.Contextual<Map<Class<?>,Class<? extends DataModel<?>>>>, jakarta.enterprise.inject.spi.Bean<Map<Class<?>,Class<? extends DataModel<?>>>>, jakarta.enterprise.inject.spi.BeanAttributes<Map<Class<?>,Class<? extends DataModel<?>>>>, jakarta.enterprise.inject.spi.PassivationCapable, Serializable

public class DataModelClassesMapProducer extends Object

The DataModelClassesMapProducer is the CDI producer that allows UIData, UIRepeat and possible other components that need a DataModel wrapper for a given type to obtain a Map of types to DataModel implementations capable of wrapping that type.

Components can obtain this Map by querying the bean manager for beans named "comSunFacesDataModelClassesMap".

Since:
2.3
See Also:
  • Constructor Details

    • DataModelClassesMapProducer

      public DataModelClassesMapProducer()
  • Method Details

    • getId

      public String 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 interface jakarta.enterprise.inject.spi.PassivationCapable
      Returns:
      the ID of this particular instantiation of the producer
    • getName

      public String getName()
      Specified by:
      getName in interface jakarta.enterprise.inject.spi.BeanAttributes<T>
    • getBeanClass

      public Class<?> getBeanClass()
      Specified by:
      getBeanClass in interface jakarta.enterprise.inject.spi.Bean<T>
    • getTypes

      public Set<Type> getTypes()
      Specified by:
      getTypes in interface jakarta.enterprise.inject.spi.BeanAttributes<T>
    • getQualifiers

      public Set<Annotation> getQualifiers()
      Get the default qualifier.
      Specified by:
      getQualifiers in interface jakarta.enterprise.inject.spi.BeanAttributes<T>
      Returns:
      the qualifiers, which in the default case only contains the Default
    • getScope

      public Class<? extends Annotation> getScope()
      Specified by:
      getScope in interface jakarta.enterprise.inject.spi.BeanAttributes<T>
    • create

      public Map<Class<?>,Class<? extends DataModel<?>>> create(jakarta.enterprise.context.spi.CreationalContext<Map<Class<?>,Class<? extends DataModel<?>>>> creationalContext)
      Specified by:
      create in interface jakarta.enterprise.context.spi.Contextual<T>
    • destroy

      public void destroy(Map<Class<?>,Class<? extends DataModel<?>>> instance, jakarta.enterprise.context.spi.CreationalContext<Map<Class<?>,Class<? extends DataModel<?>>>> creationalContext)
      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 interface jakarta.enterprise.context.spi.Contextual<T>
      Parameters:
      instance - the instance.
      creationalContext - the creational context.
    • getInjectionPoints

      public Set<jakarta.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
      Get the injection points.
      Specified by:
      getInjectionPoints in interface jakarta.enterprise.inject.spi.Bean<T>
      Returns:
      the injection points.
    • getStereotypes

      public Set<Class<? extends Annotation>> getStereotypes()
      Get the stereotypes.
      Specified by:
      getStereotypes in interface jakarta.enterprise.inject.spi.BeanAttributes<T>
      Returns:
      the stereotypes.
    • isAlternative

      public boolean isAlternative()
      Is this an alternative.
      Specified by:
      isAlternative in interface jakarta.enterprise.inject.spi.BeanAttributes<T>
      Returns:
      false.
    • isNullable

      public boolean isNullable()
    • name

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> name(String name)
    • create

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> create(Function<jakarta.enterprise.context.spi.CreationalContext<Map<Class<?>,Class<? extends DataModel<?>>>>,Map<Class<?>,Class<? extends DataModel<?>>>> create)
    • beanClass

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> beanClass(Class<?> beanClass)
    • types

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> types(Type... types)
    • beanClassAndType

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> beanClassAndType(Class<?> beanClass)
    • qualifiers

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> qualifiers(Annotation... qualifiers)
    • scope

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> scope(Class<? extends Annotation> scope)
    • addToId

      protected com.sun.faces.cdi.CdiProducer<Map<Class<?>,Class<? extends DataModel<?>>>> addToId(Object object)