Class ApplicationWrapper
- java.lang.Object
-
- jakarta.faces.application.Application
-
- jakarta.faces.application.ApplicationWrapper
-
- All Implemented Interfaces:
FacesWrapper<Application>
public abstract class ApplicationWrapper extends Application implements FacesWrapper<Application>
Provides a simple implementation of
Applicationthat can be subclassed by developers wishing to provide specialized behavior to an existingApplicationinstance. The default implementation of all methods is to call through to the wrappedApplication.Usage: extend this class and push the implementation being wrapped to the constructor and use
getWrapped()to access the instance being wrapped.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description ApplicationWrapper()Deprecated.Use the other constructor taking the implementation being wrapped.ApplicationWrapper(Application wrapped)If this application has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBehavior(String behaviorId, String behaviorClass)The default behavior of this method is to callApplication.addBehavior(String, String)on the wrappedApplicationobject.voidaddComponent(String componentType, String componentClass)The default behavior of this method is to callApplication.addComponent(String, String)on the wrappedApplicationobject.voidaddConverter(Class<?> targetClass, String converterClass)The default behavior of this method is to callApplication.addConverter(Class, String)on the wrappedApplicationobject.voidaddConverter(String converterId, String converterClass)The default behavior of this method is to callApplication.addConverter(String, String)on the wrappedApplicationobject.voidaddDefaultValidatorId(String validatorId)The default behavior of this method is to callApplication.addDefaultValidatorId(String)on the wrappedApplicationobject.voidaddELContextListener(ELContextListener listener)The default behavior of this method is to callApplication.addELContextListener(jakarta.el.ELContextListener)on the wrappedApplicationobject.voidaddELResolver(ELResolver resolver)The default behavior of this method is to callApplication.addELResolver(jakarta.el.ELResolver)on the wrappedApplicationobject.voidaddSearchKeywordResolver(SearchKeywordResolver resolver)Cause the argumentresolverto be added to the head of the resolver chain.voidaddValidator(String validatorId, String validatorClass)The default behavior of this method is to callApplication.addValidator(String, String)on the wrappedApplicationobject.BehaviorcreateBehavior(String behaviorId)The default behavior of this method is to callApplication.createBehavior(String)on the wrappedApplicationobject.UIComponentcreateComponent(ValueExpression componentExpression, FacesContext context, String componentType)The default behavior of this method is to callApplication.createComponent(jakarta.el.ValueExpression, jakarta.faces.context.FacesContext, String)on the wrappedApplicationobject.UIComponentcreateComponent(ValueExpression componentExpression, FacesContext context, String componentType, String rendererType)The default behavior of this method is to callApplication.createComponent(jakarta.el.ValueExpression, jakarta.faces.context.FacesContext, String, String)on the wrappedApplicationobject.UIComponentcreateComponent(FacesContext context, Resource componentResource)The default behavior of this method is to callApplication.createComponent(jakarta.faces.context.FacesContext, Resource)on the wrappedApplicationobject.UIComponentcreateComponent(FacesContext context, String componentType, String rendererType)The default behavior of this method is to callApplication.createComponent(jakarta.faces.context.FacesContext, String, String)on the wrappedApplicationobject.UIComponentcreateComponent(String componentType)The default behavior of this method is to callApplication.createComponent(String)on the wrappedApplicationobject.ConvertercreateConverter(Class<?> targetClass)The default behavior of this method is to callApplication.createConverter(Class)on the wrappedApplicationobject.ConvertercreateConverter(String converterId)The default behavior of this method is to callApplication.createConverter(String)on the wrappedApplicationobject.ValidatorcreateValidator(String validatorId)The default behavior of this method is to callApplication.createValidator(String)on the wrappedApplicationobject.<T> TevaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType)The default behavior of this method is to callApplication.evaluateExpressionGet(jakarta.faces.context.FacesContext, String, Class)on the wrappedApplicationobject.ActionListenergetActionListener()The default behavior of this method is to callApplication.getActionListener()on the wrappedApplicationobject.Iterator<String>getBehaviorIds()The default behavior of this method is to callApplication.getBehaviorIds()on the wrappedApplicationobject.Iterator<String>getComponentTypes()The default behavior of this method is to callApplication.getComponentTypes()on the wrappedApplicationobject.Iterator<String>getConverterIds()The default behavior of this method is to callApplication.getConverterIds()on the wrappedApplicationobject.Iterator<Class<?>>getConverterTypes()The default behavior of this method is to callApplication.getConverterTypes()on the wrappedApplicationobject.LocalegetDefaultLocale()The default behavior of this method is to callApplication.getDefaultLocale()on the wrappedApplicationobject.StringgetDefaultRenderKitId()The default behavior of this method is to callApplication.getDefaultRenderKitId()on the wrappedApplicationobject.Map<String,String>getDefaultValidatorInfo()The default behavior of this method is to callApplication.getDefaultValidatorInfo()on the wrappedApplicationobject.ELContextListener[]getELContextListeners()The default behavior of this method is to callApplication.getELContextListeners()on the wrappedApplicationobject.ELResolvergetELResolver()The default behavior of this method is to callApplication.getELResolver()on the wrappedApplicationobject.ExpressionFactorygetExpressionFactory()The default behavior of this method is to callApplication.getExpressionFactory()on the wrappedApplicationobject.FlowHandlergetFlowHandler()Return the thread-safe singletonFlowHandlerfor this application.StringgetMessageBundle()The default behavior of this method is to callApplication.getMessageBundle()on the wrappedApplicationobject.NavigationHandlergetNavigationHandler()The default behavior of this method is to callApplication.getNavigationHandler()on the wrappedApplicationobject.ProjectStagegetProjectStage()The default behavior of this method is to callApplication.getProjectStage()on the wrappedApplicationobject.ResourceBundlegetResourceBundle(FacesContext ctx, String name)The default behavior of this method is to callApplication.getResourceBundle(jakarta.faces.context.FacesContext, String)on the wrappedApplicationobject.ResourceHandlergetResourceHandler()The default behavior of this method is to callApplication.getResourceHandler()on the wrappedApplicationobject.SearchExpressionHandlergetSearchExpressionHandler()Return the thread-safe singletonSearchExpressionHandlerfor this application.SearchKeywordResolvergetSearchKeywordResolver()Return the singletonSearchKeywordResolverinstance to be used for all search keyword resolution.StateManagergetStateManager()The default behavior of this method is to callApplication.getStateManager()on the wrappedApplicationobject.Iterator<Locale>getSupportedLocales()The default behavior of this method is to callApplication.getSupportedLocales()on the wrappedApplicationobject.Iterator<String>getValidatorIds()The default behavior of this method is to callApplication.getValidatorIds()on the wrappedApplicationobject.ViewHandlergetViewHandler()The default behavior of this method is to callApplication.getViewHandler()on the wrappedApplicationobject.ApplicationgetWrapped()A class that implements this interface uses this method to return an instance of the class being wrapped.voidpublishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)The default behavior of this method is to callApplication.publishEvent(jakarta.faces.context.FacesContext, Class, Class, Object)on the wrappedApplicationobject.voidpublishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)The default behavior of this method is to callApplication.publishEvent(jakarta.faces.context.FacesContext, Class, Object)on the wrappedApplicationobject.voidremoveELContextListener(ELContextListener listener)The default behavior of this method is to callApplication.removeELContextListener(jakarta.el.ELContextListener)on the wrappedApplicationobject.voidsetActionListener(ActionListener listener)The default behavior of this method is to callApplication.setActionListener(jakarta.faces.event.ActionListener)on the wrappedApplicationobject.voidsetDefaultLocale(Locale locale)The default behavior of this method is to callApplication.setDefaultLocale(java.util.Locale)on the wrappedApplicationobject.voidsetDefaultRenderKitId(String renderKitId)The default behavior of this method is to callApplication.setDefaultRenderKitId(String)on the wrappedApplicationobject.voidsetFlowHandler(FlowHandler newHandler)Set theFlowHandlerinstance used by theNavigationHandlerto satisfy the requirements of the faces flows feature.voidsetMessageBundle(String bundle)The default behavior of this method is to callApplication.setMessageBundle(String)on the wrappedApplicationobject.voidsetNavigationHandler(NavigationHandler handler)The default behavior of this method is to callApplication.setNavigationHandler(NavigationHandler)on the wrappedApplicationobject.voidsetResourceHandler(ResourceHandler resourceHandler)The default behavior of this method is to callApplication.setResourceHandler(ResourceHandler)on the wrappedApplicationobject.voidsetSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)Set theSearchExpressionHandlerinstance used by the application.voidsetStateManager(StateManager manager)The default behavior of this method is to callApplication.setStateManager(StateManager)on the wrappedApplicationobject.voidsetSupportedLocales(Collection<Locale> locales)The default behavior of this method is to callApplication.setSupportedLocales(java.util.Collection)on the wrappedApplicationobject.voidsetViewHandler(ViewHandler handler)The default behavior of this method is to callApplication.setViewHandler(ViewHandler)on the wrappedApplicationobject.voidsubscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)The default behavior of this method is to callApplication.subscribeToEvent(Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.voidsubscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)The default behavior of this method is to callApplication.subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.voidunsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)The default behavior of this method is to callApplication.unsubscribeFromEvent(Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.voidunsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)The default behavior of this method is to callApplication.unsubscribeFromEvent(Class, Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.
-
-
-
Constructor Detail
-
ApplicationWrapper
@Deprecated public ApplicationWrapper()
Deprecated.Use the other constructor taking the implementation being wrapped.
-
ApplicationWrapper
public ApplicationWrapper(Application wrapped)
If this application 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- The implementation being wrapped.- Since:
- 2.3
-
-
Method Detail
-
getWrapped
public Application getWrapped()
Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrappedin interfaceFacesWrapper<Application>- Returns:
- the wrapped instance.
-
getActionListener
public ActionListener getActionListener()
The default behavior of this method is to call
Application.getActionListener()on the wrappedApplicationobject.- Specified by:
getActionListenerin classApplication- Returns:
- the action listener.
-
setActionListener
public void setActionListener(ActionListener listener)
The default behavior of this method is to call
Application.setActionListener(jakarta.faces.event.ActionListener)on the wrappedApplicationobject.- Specified by:
setActionListenerin classApplication- Parameters:
listener- The new defaultActionListener
-
getDefaultLocale
public Locale getDefaultLocale()
The default behavior of this method is to call
Application.getDefaultLocale()on the wrappedApplicationobject.- Specified by:
getDefaultLocalein classApplication- Returns:
- the default Locale, or
null.
-
setDefaultLocale
public void setDefaultLocale(Locale locale)
The default behavior of this method is to call
Application.setDefaultLocale(java.util.Locale)on the wrappedApplicationobject.- Specified by:
setDefaultLocalein classApplication- Parameters:
locale- The new defaultLocale
-
getDefaultRenderKitId
public String getDefaultRenderKitId()
The default behavior of this method is to call
Application.getDefaultRenderKitId()on the wrappedApplicationobject.- Specified by:
getDefaultRenderKitIdin classApplication- Returns:
- the default render kit id, or
null.
-
addDefaultValidatorId
public void addDefaultValidatorId(String validatorId)
The default behavior of this method is to call
Application.addDefaultValidatorId(String)on the wrappedApplicationobject.- Overrides:
addDefaultValidatorIdin classApplication- Parameters:
validatorId- the validator id.
-
getDefaultValidatorInfo
public Map<String,String> getDefaultValidatorInfo()
The default behavior of this method is to call
Application.getDefaultValidatorInfo()on the wrappedApplicationobject.- Overrides:
getDefaultValidatorInfoin classApplication- Returns:
- a map of default validator information.
-
setDefaultRenderKitId
public void setDefaultRenderKitId(String renderKitId)
The default behavior of this method is to call
Application.setDefaultRenderKitId(String)on the wrappedApplicationobject.- Specified by:
setDefaultRenderKitIdin classApplication- Parameters:
renderKitId- the render kit id to set.
-
getMessageBundle
public String getMessageBundle()
The default behavior of this method is to call
Application.getMessageBundle()on the wrappedApplicationobject.- Specified by:
getMessageBundlein classApplication- Returns:
- the message bundle class name, or
null.
-
setMessageBundle
public void setMessageBundle(String bundle)
The default behavior of this method is to call
Application.setMessageBundle(String)on the wrappedApplicationobject.- Specified by:
setMessageBundlein classApplication- Parameters:
bundle- Base name of the resource bundle to be used
-
getNavigationHandler
public NavigationHandler getNavigationHandler()
The default behavior of this method is to call
Application.getNavigationHandler()on the wrappedApplicationobject.- Specified by:
getNavigationHandlerin classApplication- Returns:
- the navigation handler.
-
setNavigationHandler
public void setNavigationHandler(NavigationHandler handler)
The default behavior of this method is to call
Application.setNavigationHandler(NavigationHandler)on the wrappedApplicationobject.- Specified by:
setNavigationHandlerin classApplication- Parameters:
handler- The newNavigationHandlerinstance
-
getViewHandler
public ViewHandler getViewHandler()
The default behavior of this method is to call
Application.getViewHandler()on the wrappedApplicationobject.- Specified by:
getViewHandlerin classApplication- Returns:
- the view handler.
-
setViewHandler
public void setViewHandler(ViewHandler handler)
The default behavior of this method is to call
Application.setViewHandler(ViewHandler)on the wrappedApplicationobject.- Specified by:
setViewHandlerin classApplication- Parameters:
handler- The newViewHandlerinstance- Throws:
IllegalStateException- if this method is called after at least one request has been processed by theLifecycleinstance for this application.NullPointerException- ifmanagerisnull
-
getStateManager
public StateManager getStateManager()
The default behavior of this method is to call
Application.getStateManager()on the wrappedApplicationobject.- Specified by:
getStateManagerin classApplication- Returns:
- the state manager.
-
setStateManager
public void setStateManager(StateManager manager)
The default behavior of this method is to call
Application.setStateManager(StateManager)on the wrappedApplicationobject.- Specified by:
setStateManagerin classApplication- Parameters:
manager- The newStateManagerinstance- Throws:
IllegalStateException- if this method is called after at least one request has been processed by theLifecycleinstance for this application.NullPointerException- ifmanagerisnull
-
addComponent
public void addComponent(String componentType, String componentClass)
The default behavior of this method is to call
Application.addComponent(String, String)on the wrappedApplicationobject.- Specified by:
addComponentin classApplication- Parameters:
componentType- The component type to be registeredcomponentClass- The fully qualified class name of the correspondingUIComponentimplementation
-
createComponent
public UIComponent createComponent(String componentType) throws FacesException
The default behavior of this method is to call
Application.createComponent(String)on the wrappedApplicationobject.- Specified by:
createComponentin classApplication- Parameters:
componentType- The component type for which to create and return a newUIComponentinstance- Returns:
- the UI component.
- Throws:
FacesException- if aUIComponentof the specified type cannot be created
-
getComponentTypes
public Iterator<String> getComponentTypes()
The default behavior of this method is to call
Application.getComponentTypes()on the wrappedApplicationobject.- Specified by:
getComponentTypesin classApplication- Returns:
- an iterator with component types.
-
addConverter
public void addConverter(String converterId, String converterClass)
The default behavior of this method is to call
Application.addConverter(String, String)on the wrappedApplicationobject.- Specified by:
addConverterin classApplication- Parameters:
converterId- The converter id to be registeredconverterClass- The fully qualified class name of the correspondingConverterimplementation
-
addConverter
public void addConverter(Class<?> targetClass, String converterClass)
The default behavior of this method is to call
Application.addConverter(Class, String)on the wrappedApplicationobject.- Specified by:
addConverterin classApplication- Parameters:
targetClass- The class for which this converter is registeredconverterClass- The fully qualified class name of the correspondingConverterimplementation
-
createConverter
public Converter createConverter(String converterId)
The default behavior of this method is to call
Application.createConverter(String)on the wrappedApplicationobject.- Specified by:
createConverterin classApplication- Parameters:
converterId- The converter id for which to create and return a newConverterinstance- Returns:
- the converter.
-
createConverter
public Converter createConverter(Class<?> targetClass)
The default behavior of this method is to call
Application.createConverter(Class)on the wrappedApplicationobject.- Specified by:
createConverterin classApplication- Parameters:
targetClass- Target class for which to return aConverter- Returns:
- the converter.
-
getConverterIds
public Iterator<String> getConverterIds()
The default behavior of this method is to call
Application.getConverterIds()on the wrappedApplicationobject.- Specified by:
getConverterIdsin classApplication- Returns:
- an iterator with converter ids.
-
getConverterTypes
public Iterator<Class<?>> getConverterTypes()
The default behavior of this method is to call
Application.getConverterTypes()on the wrappedApplicationobject.- Specified by:
getConverterTypesin classApplication- Returns:
- an iterator with converter types.
-
getSupportedLocales
public Iterator<Locale> getSupportedLocales()
The default behavior of this method is to call
Application.getSupportedLocales()on the wrappedApplicationobject.- Specified by:
getSupportedLocalesin classApplication- Returns:
- an iterator of the supported locales.
-
setSupportedLocales
public void setSupportedLocales(Collection<Locale> locales)
The default behavior of this method is to call
Application.setSupportedLocales(java.util.Collection)on the wrappedApplicationobject.- Specified by:
setSupportedLocalesin classApplication- Parameters:
locales- The set of supportedLocales for this application
-
addBehavior
public void addBehavior(String behaviorId, String behaviorClass)
The default behavior of this method is to call
Application.addBehavior(String, String)on the wrappedApplicationobject.- Overrides:
addBehaviorin classApplication- Parameters:
behaviorId- The behavior id to be registeredbehaviorClass- The fully qualified class name of the correspondingBehaviorimplementation
-
createBehavior
public Behavior createBehavior(String behaviorId) throws FacesException
The default behavior of this method is to call
Application.createBehavior(String)on the wrappedApplicationobject.- Overrides:
createBehaviorin classApplication- Parameters:
behaviorId- The behavior id for which to create and return a newBehaviorinstance- Returns:
- the behavior.
- Throws:
FacesException- if theBehaviorcannot be created
-
getBehaviorIds
public Iterator<String> getBehaviorIds()
The default behavior of this method is to call
Application.getBehaviorIds()on the wrappedApplicationobject.- Overrides:
getBehaviorIdsin classApplication- Returns:
- an iterator with behavior ids.
-
addValidator
public void addValidator(String validatorId, String validatorClass)
The default behavior of this method is to call
Application.addValidator(String, String)on the wrappedApplicationobject.- Specified by:
addValidatorin classApplication- Parameters:
validatorId- The validator id to be registeredvalidatorClass- The fully qualified class name of the correspondingValidatorimplementation
-
createValidator
public Validator createValidator(String validatorId) throws FacesException
The default behavior of this method is to call
Application.createValidator(String)on the wrappedApplicationobject.- Specified by:
createValidatorin classApplication- Parameters:
validatorId- The validator id for which to create and return a newValidatorinstance- Returns:
- the validator.
- Throws:
FacesException- if aValidatorof the specified id cannot be created
-
getValidatorIds
public Iterator<String> getValidatorIds()
The default behavior of this method is to call
Application.getValidatorIds()on the wrappedApplicationobject.- Specified by:
getValidatorIdsin classApplication- Returns:
- an iterator of validator ids.
-
getResourceHandler
public ResourceHandler getResourceHandler()
The default behavior of this method is to call
Application.getResourceHandler()on the wrappedApplicationobject.- Overrides:
getResourceHandlerin classApplication- Returns:
- the resource handler.
-
setResourceHandler
public void setResourceHandler(ResourceHandler resourceHandler)
The default behavior of this method is to call
This method can throwApplication.setResourceHandler(ResourceHandler)on the wrappedApplicationobject.IllegalStateExceptionandNullPointerException.- Overrides:
setResourceHandlerin classApplication- Parameters:
resourceHandler- The newResourceHandlerinstance- Throws:
IllegalStateException- if this method is called after at least one request has been processed by theLifecycleinstance for this application.NullPointerException- ifresourceHandlerisnull
-
getResourceBundle
public ResourceBundle getResourceBundle(FacesContext ctx, String name)
The default behavior of this method is to call
Application.getResourceBundle(jakarta.faces.context.FacesContext, String)on the wrappedApplicationobject.- Overrides:
getResourceBundlein classApplication- Parameters:
ctx- the Faces context.name- the name of the resource bundle.- Returns:
- the resource bundle.
-
getProjectStage
public ProjectStage getProjectStage()
The default behavior of this method is to call
Application.getProjectStage()on the wrappedApplicationobject.- Overrides:
getProjectStagein classApplication- Returns:
- the project stage.
-
addELResolver
public void addELResolver(ELResolver resolver)
The default behavior of this method is to call
Application.addELResolver(jakarta.el.ELResolver)on the wrappedApplicationobject.- Overrides:
addELResolverin classApplication- Parameters:
resolver- the Jakarta Expression Language resolver to add.- Throws:
IllegalStateException- if called after the first request to theFacesServlethas been serviced.
-
getELResolver
public ELResolver getELResolver()
The default behavior of this method is to call
Application.getELResolver()on the wrappedApplicationobject.- Overrides:
getELResolverin classApplication- Returns:
- the Jakarta Expression Language resolver.
-
createComponent
public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException
The default behavior of this method is to call
Application.createComponent(jakarta.el.ValueExpression, jakarta.faces.context.FacesContext, String)on the wrappedApplicationobject.- Overrides:
createComponentin classApplication- Parameters:
componentExpression-ValueExpressionrepresenting a component value expression (typically specified by thecomponentattribute of a custom tag)context-FacesContextfor the current requestcomponentType- Component type to create if theValueExpressiondoes not return a component instance- Returns:
- the UI component.
- Throws:
FacesException- if aUIComponentcannot be created
-
createComponent
public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType, String rendererType)
The default behavior of this method is to call
Application.createComponent(jakarta.el.ValueExpression, jakarta.faces.context.FacesContext, String, String)on the wrappedApplicationobject.- Overrides:
createComponentin classApplication- Parameters:
componentExpression-ValueExpressionrepresenting a component value expression (typically specified by thecomponentattribute of a custom tag)context-FacesContextfor the current requestcomponentType- Component type to create if theValueExpressiondoes not return a component instancerendererType- The renderer-type of theRendererthat will render this component. Anullvalue must be accepted for this parameter.- Returns:
- the UI component.
-
createComponent
public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
The default behavior of this method is to call
Application.createComponent(jakarta.faces.context.FacesContext, String, String)on the wrappedApplicationobject.- Overrides:
createComponentin classApplication- Parameters:
context-FacesContextfor the current requestcomponentType- Component type to createrendererType- The renderer-type of theRendererthat will render this component. Anullvalue must be accepted for this parameter.- Returns:
- the UI component.
-
createComponent
public UIComponent createComponent(FacesContext context, Resource componentResource)
The default behavior of this method is to call
Application.createComponent(jakarta.faces.context.FacesContext, Resource)on the wrappedApplicationobject.- Overrides:
createComponentin classApplication- Parameters:
context-FacesContextfor the current requestcomponentResource- AResourcethat points to a source file that provides an implementation of a component.- Returns:
- the UI component.
-
getExpressionFactory
public ExpressionFactory getExpressionFactory()
The default behavior of this method is to call
Application.getExpressionFactory()on the wrappedApplicationobject.- Overrides:
getExpressionFactoryin classApplication- Returns:
- the expression factory.
-
getFlowHandler
public FlowHandler getFlowHandler()
Description copied from class:ApplicationReturn the thread-safe singleton
FlowHandlerfor this application. For implementations declaring compliance with version 2.2 of the specification, this method must never returnnull, even if the application has no flows. This is necessary to enable dynamic flow creation during the application's lifetime.All implementations that declare compliance with version 2.2 of the specification must implement this method. For the purpose of backward compatibility with environments that extend
Applicationbut do not override this method, an implementation is provided that returnsnull. Due to the decoratable nature ofApplication, code calling this method should always check for anullreturn.- Overrides:
getFlowHandlerin classApplication- Returns:
- the flow handler.
-
setFlowHandler
public void setFlowHandler(FlowHandler newHandler)
Description copied from class:ApplicationSet the
FlowHandlerinstance used by theNavigationHandlerto satisfy the requirements of the faces flows feature.- Overrides:
setFlowHandlerin classApplication- Parameters:
newHandler- the flow handler to set.
-
evaluateExpressionGet
public <T> T evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType) throws ELException
The default behavior of this method is to call
Application.evaluateExpressionGet(jakarta.faces.context.FacesContext, String, Class)on the wrappedApplicationobject.- Overrides:
evaluateExpressionGetin classApplication- Type Parameters:
T- the return type.- Parameters:
context- the Faces context.expression- the expression.expectedType- the expected type.- Returns:
- the result of the evaluation.
- Throws:
ELException
-
addELContextListener
public void addELContextListener(ELContextListener listener)
The default behavior of this method is to call
Application.addELContextListener(jakarta.el.ELContextListener)on the wrappedApplicationobject.- Overrides:
addELContextListenerin classApplication- Parameters:
listener- the Jakarta Expression Language context listener to add.
-
removeELContextListener
public void removeELContextListener(ELContextListener listener)
The default behavior of this method is to call
Application.removeELContextListener(jakarta.el.ELContextListener)on the wrappedApplicationobject.- Overrides:
removeELContextListenerin classApplication- Parameters:
listener- the Jakarta Expression Language context listener to remove.
-
getELContextListeners
public ELContextListener[] getELContextListeners()
The default behavior of this method is to call
Application.getELContextListeners()on the wrappedApplicationobject.- Overrides:
getELContextListenersin classApplication- Returns:
- an array of Jakarta Expression Language context listeners.
-
publishEvent
public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)
The default behavior of this method is to call
Application.publishEvent(jakarta.faces.context.FacesContext, Class, Object)on the wrappedApplicationobject.- Overrides:
publishEventin classApplication- Parameters:
context- theFacesContextfor the current requestsystemEventClass- TheClassof event that is being published.source- The source for the event of typesystemEventClass.
-
publishEvent
public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
The default behavior of this method is to call
Application.publishEvent(jakarta.faces.context.FacesContext, Class, Class, Object)on the wrappedApplicationobject.- Overrides:
publishEventin classApplication- Parameters:
context- theFacesContextfor the current requestsystemEventClass- TheClassof event that is being published.sourceBaseType- TheClassof the source event that must be used to lookup the listener to which this event must be published. If this argument isnullthe return fromsource.getClass()must be used as thesourceBaseType.source- The source for the event of typesystemEventClass.
-
subscribeToEvent
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
The default behavior of this method is to call
Application.subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.- Overrides:
subscribeToEventin classApplication- Parameters:
systemEventClass- theClassof event for whichlistenermust be fired.sourceClass- theClassof the instance which causes events of typesystemEventClassto be fired. May benull.listener- the implementation ofSystemEventListenerwhoseSystemEventListener.processEvent(jakarta.faces.event.SystemEvent)method must be called when events of typesystemEventClassare fired.
-
subscribeToEvent
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
The default behavior of this method is to call
Application.subscribeToEvent(Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.- Overrides:
subscribeToEventin classApplication- Parameters:
systemEventClass- theClassof event for whichlistenermust be fired.listener- the implementation ofSystemEventListenerwhoseSystemEventListener.processEvent(jakarta.faces.event.SystemEvent)method must be called when events of typesystemEventClassare fired.See
Application.subscribeToEvent(java.lang.Class,java.lang.Class,jakarta.faces.event.SystemEventListener)for an additional requirement regarding when it is valid to call this method.
-
unsubscribeFromEvent
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
The default behavior of this method is to call
Application.unsubscribeFromEvent(Class, Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.- Overrides:
unsubscribeFromEventin classApplication- Parameters:
systemEventClass- theClassof event for whichlistenermust be fired.sourceClass- theClassof the instance which causes events of typesystemEventClassto be fired. May benull.listener- the implementation ofSystemEventListenerto remove from the internal data structure.
-
unsubscribeFromEvent
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
The default behavior of this method is to call
Application.unsubscribeFromEvent(Class, jakarta.faces.event.SystemEventListener)on the wrappedApplicationobject.- Overrides:
unsubscribeFromEventin classApplication- Parameters:
systemEventClass- theClassof event for whichlistenermust be fired.listener- the implementation ofSystemEventListenerto remove from the internal data structure.
-
getSearchExpressionHandler
public SearchExpressionHandler getSearchExpressionHandler()
Description copied from class:ApplicationReturn the thread-safe singleton
SearchExpressionHandlerfor this application.- Overrides:
getSearchExpressionHandlerin classApplication- Returns:
- the
SearchExpressionHandler.
-
setSearchExpressionHandler
public void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)
Description copied from class:ApplicationSet the
SearchExpressionHandlerinstance used by the application.- Overrides:
setSearchExpressionHandlerin classApplication- Parameters:
searchExpressionHandler- theSearchExpressionHandler.
-
addSearchKeywordResolver
public void addSearchKeywordResolver(SearchKeywordResolver resolver)
Description copied from class:ApplicationCause the argument
resolverto be added to the head of the resolver chain.It is not possible to remove a
SearchKeywordResolverregistered with this method, once it has been registered.The default implementation throws
UnsupportedOperationExceptionand is provided for the sole purpose of not breaking existing applications that extendApplication.- Overrides:
addSearchKeywordResolverin classApplication- Parameters:
resolver- the SearchKeywordResolver to add.
-
getSearchKeywordResolver
public SearchKeywordResolver getSearchKeywordResolver()
Description copied from class:ApplicationReturn the singleton
SearchKeywordResolverinstance to be used for all search keyword resolution. This is actually an instance of a composite SearchKeywordResolver that must contain the followingSearchKeywordResolverinstances in the following order:-
SearchKeywordResolverinstances declared using the <search-keyword-resolver> element in the application configuration resources. -
Any
SearchKeywordResolverinstances added by calls toApplication.addSearchKeywordResolver(jakarta.faces.component.search.SearchKeywordResolver). -
The
SearchKeywordResolverimplementations for@all,@child(n),@form,@id(...),@namingcontainer,@next,@none,@parent,@previous,@rootand@this.
The default implementation throws
UnsupportedOperationExceptionand is provided for the sole purpose of not breaking existing applications that extendApplication.- Overrides:
getSearchKeywordResolverin classApplication- Returns:
- the
SearchKeywordResolver.
-
-
-