Top Description Fields Constructors Methods
javax.faces.application

public abstract Class ApplicationFactory

extends Object
implements FacesWrapper<ApplicationFactory>
Class Inheritance
All Implemented Interfaces
javax.faces.FacesWrapper
Known Direct Subclasses
com.sun.faces.application.ApplicationFactoryImpl, com.sun.faces.application.InjectionApplicationFactory
Imports
javax.faces.FacesWrapper

ApplicationFactory is a factory object that creates (if needed) and returns Application instances. Implementations of JavaServer Faces must provide at least a default implementation of Application.

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

ApplicationFactory factory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);

Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped to access the instance being wrapped.

Field Summary

Modifier and TypeField and Description
private ApplicationFactory

Constructor Summary

AccessConstructor and Description
public
ApplicationFactory()

Deprecated Use the other constructor taking the implementation being wrapped.
public
ApplicationFactory(ApplicationFactory
The implementation being wrapped.
wrapped
)

If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract Application

Returns:

the application.
getApplication
()

Create (if needed) and return an Application instance for this web application.

public ApplicationFactory
getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

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

public abstract void
setApplication(Application
The replacement Application instance
application
)

Replace the Application instance that will be returned for this web application.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

wrappedback to summary
private ApplicationFactory wrapped

Constructor Detail

ApplicationFactoryback to summary
public ApplicationFactory()

Deprecated

Use the other constructor taking the implementation being wrapped.

Annotations
@Deprecated
ApplicationFactoryback to summary
public ApplicationFactory(ApplicationFactory 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:ApplicationFactory

The implementation being wrapped.

Method Detail

getApplicationback to summary
public abstract Application getApplication()

Create (if needed) and return an Application instance for this web application.

Returns:Application

the application.

getWrappedback to summary
public ApplicationFactory getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

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

Returns:ApplicationFactory

Doc from javax.faces.FacesWrapper.getWrapped.

the wrapped instance.

Annotations
@Override
Since
2.0
setApplicationback to summary
public abstract void setApplication(Application application)

Replace the Application instance that will be returned for this web application.

Parameters
application:Application

The replacement Application instance

Exceptions
NullPointerException:
if application is null.