Class ViewDeclarationLanguageFactory
- java.lang.Object
-
- jakarta.faces.view.ViewDeclarationLanguageFactory
-
- All Implemented Interfaces:
FacesWrapper<ViewDeclarationLanguageFactory>
public abstract class ViewDeclarationLanguageFactory extends Object implements FacesWrapper<ViewDeclarationLanguageFactory>
ViewDeclarationLanguageFactory is a factory object that creates (if needed) and returns a new
ViewDeclarationLanguageinstance based on the VDL found in a specific view.There must be one
ViewDeclarationLanguageFactoryinstance per web application that is utilizing Jakarta Server Faces. This instance can be acquired, in a portable manner, by calling:ViewDeclarationLanguageFactory factory = (ViewDeclarationLanguageFactory) FactoryFinder.getFactory(FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY);Usage: extend this class and push the implementation being wrapped to the constructor and use
getWrapped()to access the instance being wrapped.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description ViewDeclarationLanguageFactory()Deprecated.Use the other constructor taking the implementation being wrapped.ViewDeclarationLanguageFactory(ViewDeclarationLanguageFactory wrapped)If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<ViewDeclarationLanguage>getAllViewDeclarationLanguages()Gets the list of all view declaration languages supported by this runtime.abstract ViewDeclarationLanguagegetViewDeclarationLanguage(String viewId)Return theViewDeclarationLanguageinstance suitable for handling the VDL contained in the page referenced by the argumentviewId.ViewDeclarationLanguageFactorygetWrapped()If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.
-
-
-
Constructor Detail
-
ViewDeclarationLanguageFactory
@Deprecated public ViewDeclarationLanguageFactory()
Deprecated.Use the other constructor taking the implementation being wrapped.
-
ViewDeclarationLanguageFactory
public ViewDeclarationLanguageFactory(ViewDeclarationLanguageFactory 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
-
getWrapped
public ViewDeclarationLanguageFactory 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 interfaceFacesWrapper<ViewDeclarationLanguageFactory>- Returns:
- the wrapped instance.
-
getViewDeclarationLanguage
public abstract ViewDeclarationLanguage getViewDeclarationLanguage(String viewId)
Return the
ViewDeclarationLanguageinstance suitable for handling the VDL contained in the page referenced by the argumentviewId. The default implementation must return a validViewDeclarationLanguageinstance for views written in either Jakarta Server Pages, Faces XML Views, or Facelets for Jakarta Faces 2.- Parameters:
viewId- the viewId to be inspected for an appropriateViewDeclarationLanguageimplementation for the VDL used in the view.- Returns:
- the
ViewDeclarationLanguagecorresponding to the argumentviewId - Throws:
NullPointerException- ifviewIdis null.- Since:
- 2.0
-
getAllViewDeclarationLanguages
public List<ViewDeclarationLanguage> getAllViewDeclarationLanguages()
Gets the list of all view declaration languages supported by this runtime.- Returns:
- the list of all view declaration languages supported by this runtime.
-
-