Top Description Fields Constructors Methods
com.sun.faces.application

public Class ApplicationImpl

extends Application
Class Inheritance
Static Imports
java.util.logging.Level.FINE

Application represents a per-web-application singleton object where applications based on Faces (or implementations wishing to provide extended functionality) can register application-wide singletons that provide functionality required by Faces.

Field Summary

Modifier and TypeField and Description
private final ApplicationAssociate
private final Events
private final ExpressionLanguage
private final ResolversRegistry
private final InstanceFactory
private static final Logger
private final SearchExpression
private final Singletons
private final Stage
public static final String

Constructor Summary

AccessConstructor and Description
public
ApplicationImpl()

Constructor

Method Summary

Modifier and TypeMethod and Description
public void
addBehavior(String
The behavior id to be registered
behaviorId
,
String
The fully qualified class name of the corresponding Behavior implementation
behaviorClass
)

Overrides jakarta.faces.application.Application.addBehavior.

Register a new mapping of behavior id to the name of the corresponding Behavior class.

public void
addComponent(String
The component type to be registered
componentType
,
String
The fully qualified class name of the corresponding UIComponent implementation
componentClass
)

Implements abstract jakarta.faces.application.Application.addComponent.

Register a new mapping of component type to the name of the corresponding UIComponent class.

public void
addConverter(String
The converter id to be registered
converterId
,
String
The fully qualified class name of the corresponding Converter implementation
converterClass
)

Implements abstract jakarta.faces.application.Application.addConverter.

Register a new mapping of converter id to the name of the corresponding Converter class.

public void
addConverter(Class<?>
The class for which this converter is registered
targetClass
,
String
The fully qualified class name of the corresponding Converter implementation
converterClass
)

Implements abstract jakarta.faces.application.Application.addConverter.

Register a new converter class that is capable of performing conversions for the specified target class.

public void
addDefaultValidatorId(String
the validator id.
validatorId
)

Overrides jakarta.faces.application.Application.addDefaultValidatorId.

Register a validator by its id that is applied to all UIInput components in a view.

public void
addELContextListener(ELContextListener
the Jakarta Expression Language context listener to add.
listener
)

Overrides jakarta.faces.application.Application.addELContextListener.

Provide a way for Faces applications to register an ELContextListener that will be notified on creation of ELContext instances.

public void
addELResolver(ELResolver
the Jakarta Expression Language resolver to add.
resolver
)

Overrides jakarta.faces.application.Application.addELResolver.

Cause an the argument resolver to be added to the resolver chain as specified in section 5.3.2 "ELResolver" of the Jakarta Faces Specification Document.

public void
addSearchKeywordResolver(SearchKeywordResolver
the SearchKeywordResolver to add.
resolver
)

Overrides jakarta.faces.application.Application.addSearchKeywordResolver.

Cause the argument resolver to be added to the head of the resolver chain.

public void
addValidator(String
The validator id to be registered
validatorId
,
String
The fully qualified class name of the corresponding Validator implementation
validatorClass
)

Implements abstract jakarta.faces.application.Application.addValidator.

Register a new mapping of validator id to the name of the corresponding Validator class.

public Behavior
createBehavior(String
The behavior id for which to create and return a new Behavior instance
behaviorId
)

Overrides jakarta.faces.application.Application.createBehavior.

Instantiate and return a new Behavior instance of the class specified by a previous call to addBehavior() for the specified behavior id.

public UIComponent
createComponent(String
The component type for which to create and return a new UIComponent instance
componentType
)

Implements abstract jakarta.faces.application.Application.createComponent.

Instantiate and return a new UIComponent instance of the class specified by a previous call to addComponent() for the specified component type.

public UIComponent
createComponent(ValueExpression
ValueExpression representing a component value expression (typically specified by the component attribute of a custom tag)
componentExpression
,
FacesContext
FacesContext for the current request
context
,
String
Component type to create if the ValueExpression does not return a component instance
componentType
)

Overrides jakarta.faces.application.Application.createComponent.

Call the getValue() method on the specified ValueExpression.

public UIComponent
createComponent(ValueExpression
ValueExpression representing a component value expression (typically specified by the component attribute of a custom tag)
componentExpression
,
FacesContext
FacesContext for the current request
context
,
String
Component type to create if the ValueExpression does not return a component instance
componentType
,
String
The renderer-type of the Renderer that will render this component. A null value must be accepted for this parameter.
rendererType
)

Overrides jakarta.faces.application.Application.createComponent.

Like createComponent(ValueExpression, FacesContext, String) except the Renderer for the component to be returned must be inspected for the annotations mentioned in createComponent(ValueExpression, FacesContext, String) as specified in the documentation for that method.

public UIComponent
createComponent(FacesContext
FacesContext for the current request
context
,
String
Component type to create
componentType
,
String
The renderer-type of the Renderer that will render this component. A null value must be accepted for this parameter.
rendererType
)

Overrides jakarta.faces.application.Application.createComponent.

Like createComponent(String) except the Renderer for the component to be returned must be inspected for the annotations mentioned in createComponent(ValueExpression, FacesContext, String) as specified in the documentation for that method.

public UIComponent
createComponent(FacesContext
FacesContext for the current request
context
,
Resource
A Resource that points to a source file that provides an implementation of a component.
componentResource
)

Overrides jakarta.faces.application.Application.createComponent.

Instantiate and return a new UIComponent instance from the argument Resource.

public Converter<?>
createConverter(String
The converter id for which to create and return a new Converter instance
converterId
)

Implements abstract jakarta.faces.application.Application.createConverter.

Instantiate and return a new Converter instance of the class specified by a previous call to addConverter() for the specified converter id.

If the toLowerCase() of the String represenation of the value of the "jakarta.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE" application configuration parameter is "true" (without the quotes) and the Converter instance to be returned is an instance of jakarta.faces.convert.DateTimeConverter, jakarta.faces.convert.DateTimeConverter#setTimeZone must be called, passing the return from TimeZone.getDefault().

public Converter<?>
createConverter(Class<?>
Target class for which to return a Converter
targetClass
)

Implements abstract jakarta.faces.application.Application.createConverter.

Instantiate and return a new Converter instance of the class that has registered itself as capable of performing conversions for objects of the specified type.

public Validator<?>
createValidator(String
The validator id for which to create and return a new Validator instance
validatorId
)

Implements abstract jakarta.faces.application.Application.createValidator.

Instantiate and return a new Validator instance of the class specified by a previous call to addValidator() for the specified validator id.

The argument validator must be inspected for the presence of the jakarta.faces.application.ResourceDependency annotation.

public <T> T
evaluateExpressionGet(FacesContext
the Faces context.
context
,
String
the expression.
expression
,
Class<? extends T>
the expected type.
expectedType
)

Overrides jakarta.faces.application.Application.evaluateExpressionGet.

Get a value by evaluating an expression.

public ActionListener
getActionListener()

Implements abstract jakarta.faces.application.Application.getActionListener.

Return the default ActionListener to be registered for all jakarta.faces.component.ActionSource components in this application.

public CompositeELResolver
public Iterator<String>
getBehaviorIds()

Overrides jakarta.faces.application.Application.getBehaviorIds.

Return an Iterator over the set of currently registered behavior ids for this Application.

public Iterator<String>
getComponentTypes()

Implements abstract jakarta.faces.application.Application.getComponentTypes.

Return an Iterator over the set of currently defined component types for this Application.

public FacesCompositeELResolver
public Iterator<String>
getConverterIds()

Implements abstract jakarta.faces.application.Application.getConverterIds.

Return an Iterator over the set of currently registered converter ids for this Application.

public Iterator<Class<?>>
getConverterTypes()

Implements abstract jakarta.faces.application.Application.getConverterTypes.

Return an Iterator over the set of Class instances for which Converter classes have been explicitly registered.

public Locale
getDefaultLocale()

Implements abstract jakarta.faces.application.Application.getDefaultLocale.

Return the default Locale for this application.

public String
getDefaultRenderKitId()

Implements abstract jakarta.faces.application.Application.getDefaultRenderKitId.

Return the renderKitId to be used for rendering this application.

public Map<String, String>
getDefaultValidatorInfo()

Overrides jakarta.faces.application.Application.getDefaultValidatorInfo.

Return an immutable Map over the set of currently registered default validator IDs and their class name for this Application.

public ELContextListener[]
getELContextListeners()

Overrides jakarta.faces.application.Application.getELContextListeners.

If no calls have been made to addELContextListener, this method must return an empty array.

public ELResolver
getELResolver()

Overrides jakarta.faces.application.Application.getELResolver.

Return the singleton ELResolver instance to be used for all Jakarta Expression Language resolution.

public ExpressionFactory
public FlowHandler
getFlowHandler()

Overrides jakarta.faces.application.Application.getFlowHandler.

Return the thread-safe singleton FlowHandler for this application.

public ResolversRegistry
public String
getMessageBundle()

Implements abstract jakarta.faces.application.Application.getMessageBundle.

Return the fully qualified class name of the ResourceBundle to be used for Jakarta Faces messages for this application.

public NavigationHandler
getNavigationHandler()

Implements abstract jakarta.faces.application.Application.getNavigationHandler.

Return the NavigationHandler instance that will be passed the outcome returned by any invoked application action for this web application.

public ProjectStage
getProjectStage()

Overrides jakarta.faces.application.Application.getProjectStage.

Return the project stage for the currently running application instance.

public ResourceBundle
getResourceBundle(FacesContext
the Faces context.
context
,
String
the name of the resource bundle.
var
)

Overrides jakarta.faces.application.Application.getResourceBundle.

Find a ResourceBundle as defined in the application configuration resources under the specified name.

public ResourceHandler
getResourceHandler()

Overrides jakarta.faces.application.Application.getResourceHandler.

Return the singleton, stateless, thread-safe ResourceHandler for this application.

public SearchExpressionHandler
public SearchKeywordResolver
getSearchKeywordResolver()

Overrides jakarta.faces.application.Application.getSearchKeywordResolver.

Return the singleton SearchKeywordResolver instance to be used for all search keyword resolution.

public StateManager
getStateManager()

Implements abstract jakarta.faces.application.Application.getStateManager.

Return the StateManager instance that will be utilized during the Restore View and Render Response phases of the request processing lifecycle.

public Iterator<Locale>
getSupportedLocales()

Implements abstract jakarta.faces.application.Application.getSupportedLocales.

Return an Iterator over the supported Locales for this appication.

public Iterator<String>
getValidatorIds()

Implements abstract jakarta.faces.application.Application.getValidatorIds.

Return an Iterator over the set of currently registered validator ids for this Application.

public ViewHandler
getViewHandler()

Implements abstract jakarta.faces.application.Application.getViewHandler.

Return the ViewHandler instance that will be utilized during the Restore View and Render Response phases of the request processing lifecycle.

public void
publishEvent(FacesContext
the FacesContext for the current request
context
,
Class<? extends SystemEvent>
The Class of event that is being published.
systemEventClass
,
Object
The source for the event of type systemEventClass.
source
)

Overrides jakarta.faces.application.Application.publishEvent.

If jakarta.faces.context.FacesContext#isProcessingEvents() is true and there are one or more listeners for events of the type represented by systemEventClass, call those listeners, passing source as the source of the event.

public void
publishEvent(FacesContext
the FacesContext for the current request
context
,
Class<? extends SystemEvent>
The Class of event that is being published.
systemEventClass
,
Class<?>
The Class of the source event that must be used to lookup the listener to which this event must be published. If this argument is null the return from source.getClass() must be used as the sourceBaseType.
sourceBaseType
,
Object
The source for the event of type systemEventClass.
source
)

Overrides jakarta.faces.application.Application.publishEvent.

This method functions exactly like publishEvent(FacesContext, Class, Object), except the run-time must use the argument sourceBaseType to find the matching listener instead of using the Class of the source argument.

public void
removeELContextListener(ELContextListener
the Jakarta Expression Language context listener to remove.
listener
)

Overrides jakarta.faces.application.Application.removeELContextListener.

Remove the argument listener from the list of ELContextListeners.

public void
setActionListener(ActionListener
The new default ActionListener
actionListener
)

Implements abstract jakarta.faces.application.Application.setActionListener.

Set the default ActionListener to be registered for all jakarta.faces.component.ActionSource components.

public void
public void
setDefaultLocale(Locale
The new default Locale
locale
)

Implements abstract jakarta.faces.application.Application.setDefaultLocale.

Set the default Locale for this application.

public void
setDefaultRenderKitId(String
the render kit id to set.
renderKitId
)

Implements abstract jakarta.faces.application.Application.setDefaultRenderKitId.

Set the renderKitId to be used to render this application.

public void
setFlowHandler(FlowHandler
the flow handler to set.
flowHandler
)

Overrides jakarta.faces.application.Application.setFlowHandler.

Set the FlowHandler instance used by the NavigationHandler to satisfy the requirements of the faces flows feature.

public void
setMessageBundle(String
Base name of the resource bundle to be used
messageBundle
)

Implements abstract jakarta.faces.application.Application.setMessageBundle.

Set the fully qualified class name of the ResourceBundle to be used for Jakarta Faces messages for this application.

public void
setNavigationHandler(NavigationHandler
The new NavigationHandler instance
navigationHandler
)

Implements abstract jakarta.faces.application.Application.setNavigationHandler.

Set the NavigationHandler instance that will be passed the outcome returned by any invoked application action for this web application.

public void
setResourceHandler(ResourceHandler
The new ResourceHandler instance
resourceHandler
)

Overrides jakarta.faces.application.Application.setResourceHandler.

Set the ResourceHandler instance that will be utilized for rendering the markup for resources, and for satisfying client requests to serve up resources.

public void
public void
setStateManager(StateManager
The new StateManager instance
stateManager
)

Implements abstract jakarta.faces.application.Application.setStateManager.

Set the StateManager instance that will be utilized during the Restore View and Render Response phases of the request processing lifecycle.

public void
setSupportedLocales(Collection<Locale>
The set of supported Locales for this application
newLocales
)

Implements abstract jakarta.faces.application.Application.setSupportedLocales.

Set the Locale instances representing the supported Locales for this application.

public void
setViewHandler(ViewHandler
The new ViewHandler instance
viewHandler
)

Implements abstract jakarta.faces.application.Application.setViewHandler.

Set the ViewHandler instance that will be utilized during the Restore View and Render Response phases of the request processing lifecycle.

public void
subscribeToEvent(Class<? extends SystemEvent>
the Class of event for which listener must be fired.
systemEventClass
,
SystemEventListener
the implementation of jakarta.faces.event.SystemEventListener whose jakarta.faces.event.SystemEventListener#processEvent method must be called when events of type systemEventClass are fired.

See subscribeToEvent(java.lang.Class, java.lang.Class, jakarta.faces.event.SystemEventListener) for an additional requirement regarding when it is valid to call this method.

listener
)

Overrides jakarta.faces.application.Application.subscribeToEvent.

Install the listener instance referenced by argument listener into application as a listener for events of type systemEventClass.

public void
subscribeToEvent(Class<? extends SystemEvent>
the Class of event for which listener must be fired.
systemEventClass
,
Class<?>
the Class of the instance which causes events of type systemEventClass to be fired. May be null.
sourceClass
,
SystemEventListener
the implementation of jakarta.faces.event.SystemEventListener whose jakarta.faces.event.SystemEventListener#processEvent method must be called when events of type systemEventClass are fired.
listener
)

Overrides jakarta.faces.application.Application.subscribeToEvent.

Install the listener instance referenced by argument listener into the application as a listener for events of type systemEventClass that originate from objects of type sourceClass.

public void
unsubscribeFromEvent(Class<? extends SystemEvent>
the Class of event for which listener must be fired.
systemEventClass
,
SystemEventListener
the implementation of jakarta.faces.event.SystemEventListener to remove from the internal data structure.
listener
)

Overrides jakarta.faces.application.Application.unsubscribeFromEvent.

Remove the listener instance referenced by argument listener from the application as a listener for events of type systemEventClass.

public void
unsubscribeFromEvent(Class<? extends SystemEvent>
the Class of event for which listener must be fired.
systemEventClass
,
Class<?>
the Class of the instance which causes events of type systemEventClass to be fired. May be null.
sourceClass
,
SystemEventListener
the implementation of jakarta.faces.event.SystemEventListener to remove from the internal data structure.
listener
)

Overrides jakarta.faces.application.Application.unsubscribeFromEvent.

Remove the listener instance referenced by argument listener from the application as a listener for events of type systemEventClass that originate from objects of type sourceClass.