Class RenderKitFactory
- java.lang.Object
-
- javax.faces.render.RenderKitFactory
-
- All Implemented Interfaces:
FacesWrapper<RenderKitFactory>
public abstract class RenderKitFactory extends java.lang.Object implements FacesWrapper<RenderKitFactory>
RenderKitFactory is a factory object that registers and returns
RenderKitinstances. Implementations of JavaServer 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 JavaServer Faces. This instance can be acquired, in a portable manner, by calling:RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringHTML_BASIC_RENDER_KITThe render kit identifier of the defaultRenderKitinstance for this JavaServer Faces implementation.
-
Constructor Summary
Constructors Constructor Description RenderKitFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddRenderKit(java.lang.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, java.lang.String renderKitId)Return aRenderKitinstance for the specified render kit identifier, possibly customized based on dynamic characteristics of the specifiedFacesContext, if non-null.abstract java.util.Iterator<java.lang.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_KIT
public static final java.lang.String HTML_BASIC_RENDER_KIT
The render kit identifier of the default
RenderKitinstance for this JavaServer Faces implementation.- See Also:
- Constant Field Values
-
-
Method Detail
-
getWrapped
public 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. A default implementation is provided that returns
null.- Specified by:
getWrappedin interfaceFacesWrapper<RenderKitFactory>- Since:
- 2.0
-
addRenderKit
public abstract void addRenderKit(java.lang.String renderKitId, RenderKit renderKit)Register the specified
RenderKitinstance, associated with the specifiedrenderKitId, to be supported by thisRenderKitFactory, replacing any previously registeredRenderKitfor this identifier.
-
getRenderKit
public abstract RenderKit getRenderKit(FacesContext context, java.lang.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, ornullif none is available.renderKitId- Render kit identifier of the requestedRenderKitinstance- Throws:
java.lang.IllegalArgumentException- if noRenderKitinstance can be returned for the specified identifierjava.lang.NullPointerException- ifrenderKitIdisnull
-
getRenderKitIds
public abstract java.util.Iterator<java.lang.String> getRenderKitIds()
Return an
Iteratorover the set of render kit identifiers registered with this factory. This set must include the value specified byRenderKitFactory.HTML_BASIC_RENDER_KIT.
-
-