javax.faces.webapp.pdl
Class PageDeclarationLanguageFactory

java.lang.Object
  extended by javax.faces.webapp.pdl.PageDeclarationLanguageFactory
All Implemented Interfaces:
FacesWrapper<PageDeclarationLanguageFactory>

public abstract class PageDeclarationLanguageFactory
extends Object
implements FacesWrapper<PageDeclarationLanguageFactory>

PageDeclarationLanguageFactory is a factory object that creates (if needed) and returns a new PageDeclarationLanguage instance based on the PDL found in a specific view.

There must be one PageDeclarationLanguageFactory instance per web application that is utilizing JavaServer Faces. This instance can be acquired, in a portable manner, by calling:


   PageDeclarationLanguageFactory factory = (PageDeclarationLanguageFactory)
    FactoryFinder.getFactory(FactoryFinder.PAGE_DECLARATION_LANGUAGE_FACTORY);
 

Since:
2.0

Constructor Summary
PageDeclarationLanguageFactory()
           
 
Method Summary
abstract  PageDeclarationLanguage getPageDeclarationLanguage(String viewId)
          

Return the PageDeclarationLanguage instance suitable for handling the PDL contained in the page referenced by the argument viewId.

 PageDeclarationLanguageFactory getWrapped()
          

If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageDeclarationLanguageFactory

public PageDeclarationLanguageFactory()
Method Detail

getWrapped

public PageDeclarationLanguageFactory 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:
getWrapped in interface FacesWrapper<PageDeclarationLanguageFactory>

getPageDeclarationLanguage

public abstract PageDeclarationLanguage getPageDeclarationLanguage(String viewId)

Return the PageDeclarationLanguage instance suitable for handling the PDL contained in the page referenced by the argument viewId. The default implementation must return a valid PageDeclarationLanguage instance for views written in either JSP or Facelets.

Parameters:
viewId - the viewId to be inspected for an appropriate PageDeclarationLanguage implementation for the PDL used in the view.
Throws:
NullPointerException - if viewId is null.
ClassNotFoundException - if unable to locate a suitable PageDeclarationLanguage implementation.
Since:
2.0


Copyright © 2002-2008 Sun Microsystems, Inc. All Rights Reserved.