Class RenderKitFactory
- java.lang.Object
- 
- jakarta.faces.render.RenderKitFactory
 
- 
- All Implemented Interfaces:
- FacesWrapper<RenderKitFactory>
 
 public abstract class RenderKitFactory extends Object implements FacesWrapper<RenderKitFactory> RenderKitFactory is a factory object that registers and returns RenderKitinstances. Implementations of Jakarta Faces must provide at least a default implementation ofRenderKit. Advanced implementations (or external third party libraries) may provide additionalRenderKitimplementations (keyed by render kit identifiers) for performing different types of rendering for the same components.There must be one RenderKitFactoryinstance per web application that is utilizing Jakarta Faces. This instance can be acquired, in a portable manner, by calling:RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped()to access the instance being wrapped.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringHTML_BASIC_RENDER_KITThe render kit identifier of the defaultRenderKitinstance for this Jakarta Faces implementation.
 - 
Constructor SummaryConstructors Constructor Description RenderKitFactory()Deprecated.Use the other constructor taking the implementation being wrapped.RenderKitFactory(RenderKitFactory wrapped)If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddRenderKit(String renderKitId, RenderKit renderKit)Register the specifiedRenderKitinstance, associated with the specifiedrenderKitId, to be supported by thisRenderKitFactory, replacing any previously registeredRenderKitfor this identifier.abstract RenderKitgetRenderKit(FacesContext context, String renderKitId)Return aRenderKitinstance for the specified render kit identifier, possibly customized based on dynamic characteristics of the specifiedFacesContext, if non-null.abstract Iterator<String>getRenderKitIds()Return anIteratorover the set of render kit identifiers registered with this factory.RenderKitFactorygetWrapped()If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.
 
- 
- 
- 
Field Detail- 
HTML_BASIC_RENDER_KITpublic static final String HTML_BASIC_RENDER_KIT The render kit identifier of the default RenderKitinstance for this Jakarta Faces implementation.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
RenderKitFactory@Deprecated public RenderKitFactory() Deprecated.Use the other constructor taking the implementation being wrapped.
 - 
RenderKitFactorypublic RenderKitFactory(RenderKitFactory wrapped) If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The getWrapped()will then return the implementation being wrapped.- Parameters:
- wrapped- The implementation being wrapped.
 
 
- 
 - 
Method Detail- 
getWrappedpublic RenderKitFactory getWrapped() If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped. - Specified by:
- getWrappedin interface- FacesWrapper<RenderKitFactory>
- Returns:
- the wrapped instance.
- Since:
- 2.0
 
 - 
addRenderKitpublic abstract void addRenderKit(String renderKitId, RenderKit renderKit) Register the specified RenderKitinstance, associated with the specifiedrenderKitId, to be supported by thisRenderKitFactory, replacing any previously registeredRenderKitfor this identifier.- Parameters:
- renderKitId- Identifier of the- RenderKitto register
- renderKit-- RenderKitinstance that we are registering
- Throws:
- NullPointerException- if- renderKitIdor- renderKitis- null
 
 - 
getRenderKitpublic abstract RenderKit getRenderKit(FacesContext context, String renderKitId) Return a RenderKitinstance for the specified render kit identifier, possibly customized based on dynamic characteristics of the specifiedFacesContext, if non-null. If there is no registeredRenderKitfor the specified identifier, returnnull. The set of available render kit identifiers is available via thegetRenderKitIds()method.- Parameters:
- context- FacesContext for the request currently being processed, or- nullif none is available.
- renderKitId- Render kit identifier of the requested- RenderKitinstance
- Returns:
- a RenderKitinstance
- Throws:
- IllegalArgumentException- if no- RenderKitinstance can be returned for the specified identifier
- NullPointerException- if- renderKitIdis- null
 
 
- 
 
-