javax.faces
Class FactoryFinder

java.lang.Object
  extended by javax.faces.FactoryFinder

public final class FactoryFinder
extends java.lang.Object

see Javadoc of JSF Specification

Version:
$Revision: 814741 $ $Date: 2009-09-14 12:23:10 -0500 (Mon, 14 Sep 2009) $
Author:
Manfred Geiler (latest modification by $Author: mconcini $)

Field Summary
static java.lang.String APPLICATION_FACTORY
           
static java.lang.String EXCEPTION_HANDLER_FACTORY
           
static java.lang.String EXTERNAL_CONTEXT_FACTORY
           
static java.lang.String FACES_CONTEXT_FACTORY
           
static java.lang.String LIFECYCLE_FACTORY
           
static java.lang.String PARTIAL_VIEW_CONTEXT_FACTORY
           
static java.lang.String RENDER_KIT_FACTORY
           
static java.lang.String TAG_HANDLER_DELEGATE_FACTORY
           
static java.lang.String VIEW_DECLARATION_LANGUAGE_FACTORY
           
static java.lang.String VISIT_CONTEXT_FACTORY
           
 
Method Summary
static java.lang.Object getFactory(java.lang.String factoryName)
           Create (if necessary) and return a per-web-application instance of the appropriate implementation class for the specified JavaServer Faces factory class, based on the discovery algorithm described in the class description.
static void releaseFactories()
           
static void setFactory(java.lang.String factoryName, java.lang.String implName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_FACTORY

public static final java.lang.String APPLICATION_FACTORY
See Also:
Constant Field Values

EXCEPTION_HANDLER_FACTORY

public static final java.lang.String EXCEPTION_HANDLER_FACTORY
See Also:
Constant Field Values

EXTERNAL_CONTEXT_FACTORY

public static final java.lang.String EXTERNAL_CONTEXT_FACTORY
See Also:
Constant Field Values

FACES_CONTEXT_FACTORY

public static final java.lang.String FACES_CONTEXT_FACTORY
See Also:
Constant Field Values

LIFECYCLE_FACTORY

public static final java.lang.String LIFECYCLE_FACTORY
See Also:
Constant Field Values

PARTIAL_VIEW_CONTEXT_FACTORY

public static final java.lang.String PARTIAL_VIEW_CONTEXT_FACTORY
See Also:
Constant Field Values

RENDER_KIT_FACTORY

public static final java.lang.String RENDER_KIT_FACTORY
See Also:
Constant Field Values

TAG_HANDLER_DELEGATE_FACTORY

public static final java.lang.String TAG_HANDLER_DELEGATE_FACTORY
See Also:
Constant Field Values

VIEW_DECLARATION_LANGUAGE_FACTORY

public static final java.lang.String VIEW_DECLARATION_LANGUAGE_FACTORY
See Also:
Constant Field Values

VISIT_CONTEXT_FACTORY

public static final java.lang.String VISIT_CONTEXT_FACTORY
See Also:
Constant Field Values
Method Detail

getFactory

public static java.lang.Object getFactory(java.lang.String factoryName)
                                   throws FacesException

Create (if necessary) and return a per-web-application instance of the appropriate implementation class for the specified JavaServer Faces factory class, based on the discovery algorithm described in the class description.

The standard factories and wrappers in JSF all implement the interface FacesWrapper. If the returned Object is an implementation of one of the standard factories, it must be legal to cast it to an instance of FacesWrapper and call FacesWrapper.getWrapped() on the instance.

Parameters:
factoryName - Fully qualified name of the JavaServer Faces factory for which an implementation instance is requested
Returns:
A per-web-application instance of the appropriate implementation class for the specified JavaServer Faces factory class
Throws:
FacesException - if the web application class loader cannot be identified
FacesException - if an instance of the configured factory implementation class cannot be loaded
FacesException - if an instance of the configured factory implementation class cannot be instantiated
java.lang.IllegalArgumentException - if factoryname does not identify a standard JavaServer Faces factory name
java.lang.IllegalStateException - if there is no configured factory implementation class for the specified factory name
java.lang.NullPointerException - if factoryname is null

setFactory

public static void setFactory(java.lang.String factoryName,
                              java.lang.String implName)

releaseFactories

public static void releaseFactories()
                             throws FacesException
Throws:
FacesException


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.