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 JavaServer Faces (or implementations wishing to provide extended functionality) can register application-wide singletons that provide functionality required by JavaServer Faces.

Field Summary

Modifier and TypeField and Description
private final ApplicationAssociate
private final Events
private final ExpressionLanguage
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 javax.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 javax.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 javax.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 javax.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 javax.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 EL context listener to add.
listener
)

Overrides javax.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 EL resolver to add.
resolver
)

Overrides javax.faces.application.Application.addELResolver.

Cause an the argument resolver to be added to the resolver chain as specified in section JSF.5.5.1 of the JavaServer Faces Specification.

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

Overrides javax.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 javax.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 javax.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 javax.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 javax.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 javax.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 javax.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 javax.faces.application.Application.createComponent.

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

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

Implements abstract javax.faces.application.Application.createComponent.

Deprecated as a consequence of ValueBinding being deprecated.

Wrap the argument componentBinding in an implementation of ValueExpression and call through to createComponent(javax.el.ValueExpression, javax.faces.context.FacesContext, java.lang.String).

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

Implements abstract javax.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 "javax.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 javax.faces.convert.DateTimeConverter, javax.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 javax.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 MethodBinding
createMethodBinding(String
Method binding expression for which to return a MethodBinding instance
ref
,
Class<?>[]
Parameter signatures that must be compatible with those of the method to be invoked, or a zero-length array or null for a method that takes no parameters
params
)

Implements abstract javax.faces.application.Application.createMethodBinding.

Deprecated

Call getExpressionFactory then call ExpressionFactory#createMethodExpression, passing the given arguments, and wrap the result in a MethodBinding implementation, returning it.

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

Implements abstract javax.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 javax.faces.application.ResourceDependency annotation.

public ValueBinding
createValueBinding(String
Value binding expression for which to return a ValueBinding instance
ref
)

Implements abstract javax.faces.application.Application.createValueBinding.

Deprecated

Call getExpressionFactory then call ExpressionFactory#createValueExpression, passing the argument ref, Object.class for the expectedType, and null, for the fnMapper.

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

Overrides javax.faces.application.Application.evaluateExpressionGet.

Get a value by evaluating an expression.

public ActionListener
getActionListener()

Implements abstract javax.faces.application.Application.getActionListener.

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

public CompositeELResolver
public Iterator<String>
getBehaviorIds()

Overrides javax.faces.application.Application.getBehaviorIds.

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

public Iterator<String>
getComponentTypes()

Implements abstract javax.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 javax.faces.application.Application.getConverterIds.

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

public Iterator<Class<?>>
getConverterTypes()

Implements abstract javax.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 javax.faces.application.Application.getDefaultLocale.

Return the default Locale for this application.

public String
getDefaultRenderKitId()

Implements abstract javax.faces.application.Application.getDefaultRenderKitId.

Return the renderKitId to be used for rendering this application.

public Map<String, String>
getDefaultValidatorInfo()

Overrides javax.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 javax.faces.application.Application.getELContextListeners.

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

public ELResolver
getELResolver()

Overrides javax.faces.application.Application.getELResolver.

Return the singleton ELResolver instance to be used for all EL resolution.

public ExpressionFactory
public FlowHandler
getFlowHandler()

Overrides javax.faces.application.Application.getFlowHandler.

Return the thread-safe singleton FlowHandler for this application.

public String
getMessageBundle()

Implements abstract javax.faces.application.Application.getMessageBundle.

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

public NavigationHandler
getNavigationHandler()

Implements abstract javax.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 javax.faces.application.Application.getProjectStage.

Return the project stage for the currently running application instance.

public PropertyResolver
getPropertyResolver()

Implements abstract javax.faces.application.Application.getPropertyResolver.

Deprecated

Return a PropertyResolver instance that wraps the ELResolver instance that Faces provides to the unified EL for the resolution of expressions that appear programmatically in an application.

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

Overrides javax.faces.application.Application.getResourceBundle.

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

public ResourceHandler
getResourceHandler()

Overrides javax.faces.application.Application.getResourceHandler.

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

public SearchExpressionHandler
public SearchKeywordResolver
getSearchKeywordResolver()

Overrides javax.faces.application.Application.getSearchKeywordResolver.

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

public StateManager
getStateManager()

Implements abstract javax.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 javax.faces.application.Application.getSupportedLocales.

Return an Iterator over the supported Locales for this appication.

public Iterator<String>
getValidatorIds()

Implements abstract javax.faces.application.Application.getValidatorIds.

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

public VariableResolver
getVariableResolver()

Implements abstract javax.faces.application.Application.getVariableResolver.

Deprecated

Return the VariableResolver that wraps the ELResolver instance that Faces provides to the unified EL for the resolution of expressions that appear programmatically in an application.

public ViewHandler
getViewHandler()

Implements abstract javax.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 javax.faces.application.Application.publishEvent.

If javax.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 javax.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 EL context listener to remove.
listener
)

Overrides javax.faces.application.Application.removeELContextListener.

Remove the argument listener from the list of ELContextListeners.

public void
setActionListener(ActionListener
The new default ActionListener
actionListener
)

Implements abstract javax.faces.application.Application.setActionListener.

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

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

Implements abstract javax.faces.application.Application.setDefaultLocale.

Set the default Locale for this application.

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

Implements abstract javax.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 javax.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 javax.faces.application.Application.setMessageBundle.

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

public void
setNavigationHandler(NavigationHandler
The new NavigationHandler instance
navigationHandler
)

Implements abstract javax.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
setPropertyResolver(PropertyResolver
The new PropertyResolver instance
resolver
)

Implements abstract javax.faces.application.Application.setPropertyResolver.

Deprecated

Set the PropertyResolver instance that will be utilized to resolve method and value bindings.

public void
setResourceHandler(ResourceHandler
The new ResourceHandler instance
resourceHandler
)

Overrides javax.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 javax.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 javax.faces.application.Application.setSupportedLocales.

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

public void
setVariableResolver(VariableResolver
The new VariableResolver instance
resolver
)

Implements abstract javax.faces.application.Application.setVariableResolver.

Deprecated

Set the VariableResolver instance that will be consulted to resolve method and value bindings.

public void
setViewHandler(ViewHandler
The new ViewHandler instance
viewHandler
)

Implements abstract javax.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 javax.faces.event.SystemEventListener whose javax.faces.event.SystemEventListener#processEvent method must be called when events of type systemEventClass are fired.

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

listener
)

Overrides javax.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 javax.faces.event.SystemEventListener whose javax.faces.event.SystemEventListener#processEvent method must be called when events of type systemEventClass are fired.
listener
)

Overrides javax.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 javax.faces.event.SystemEventListener to remove from the internal data structure.
listener
)

Overrides javax.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 javax.faces.event.SystemEventListener to remove from the internal data structure.
listener
)

Overrides javax.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.