- All Implemented Interfaces:
FacesWrapper<Application>
Provides a simple implementation of Application
that can be
subclassed by developers wishing to provide specialized behavior to an existing Application
instance. The
default implementation of all methods is to call through to the wrapped Application
.
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
ConstructorDescriptionDeprecated.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
Modifier and TypeMethodDescriptionvoid
addBehavior
(String behaviorId, String behaviorClass) The default behavior of this method is to callApplication.addBehavior(String, String)
on the wrappedApplication
object.void
addComponent
(String componentType, String componentClass) The default behavior of this method is to callApplication.addComponent(String, String)
on the wrappedApplication
object.void
addConverter
(Class<?> targetClass, String converterClass) The default behavior of this method is to callApplication.addConverter(Class, String)
on the wrappedApplication
object.void
addConverter
(String converterId, String converterClass) The default behavior of this method is to callApplication.addConverter(String, String)
on the wrappedApplication
object.void
addDefaultValidatorId
(String validatorId) The default behavior of this method is to callApplication.addDefaultValidatorId(String)
on the wrappedApplication
object.void
addELContextListener
(ELContextListener listener) The default behavior of this method is to callApplication.addELContextListener(jakarta.el.ELContextListener)
on the wrappedApplication
object.void
addELResolver
(ELResolver resolver) The default behavior of this method is to callApplication.addELResolver(jakarta.el.ELResolver)
on the wrappedApplication
object.void
Cause the argumentresolver
to be added to the head of the resolver chain.void
addValidator
(String validatorId, String validatorClass) The default behavior of this method is to callApplication.addValidator(String, String)
on the wrappedApplication
object.createBehavior
(String behaviorId) The default behavior of this method is to callApplication.createBehavior(String)
on the wrappedApplication
object.createComponent
(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 wrappedApplication
object.createComponent
(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 wrappedApplication
object.createComponent
(FacesContext context, Resource componentResource) The default behavior of this method is to callApplication.createComponent(jakarta.faces.context.FacesContext, Resource)
on the wrappedApplication
object.createComponent
(FacesContext context, String componentType, String rendererType) The default behavior of this method is to callApplication.createComponent(jakarta.faces.context.FacesContext, String, String)
on the wrappedApplication
object.createComponent
(String componentType) The default behavior of this method is to callApplication.createComponent(String)
on the wrappedApplication
object.createConverter
(Class<?> targetClass) The default behavior of this method is to callApplication.createConverter(Class)
on the wrappedApplication
object.createConverter
(String converterId) The default behavior of this method is to callApplication.createConverter(String)
on the wrappedApplication
object.createValidator
(String validatorId) The default behavior of this method is to callApplication.createValidator(String)
on the wrappedApplication
object.<T> T
evaluateExpressionGet
(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 wrappedApplication
object.The default behavior of this method is to callApplication.getActionListener()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getBehaviorIds()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getComponentTypes()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getConverterIds()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getConverterTypes()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getDefaultLocale()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getDefaultRenderKitId()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getDefaultValidatorInfo()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getELContextListeners()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getELResolver()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getExpressionFactory()
on the wrappedApplication
object.Return the thread-safe singletonFlowHandler
for this application.The default behavior of this method is to callApplication.getMessageBundle()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getNavigationHandler()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getProjectStage()
on the wrappedApplication
object.getResourceBundle
(FacesContext ctx, String name) The default behavior of this method is to callApplication.getResourceBundle(jakarta.faces.context.FacesContext, String)
on the wrappedApplication
object.The default behavior of this method is to callApplication.getResourceHandler()
on the wrappedApplication
object.Return the thread-safe singletonSearchExpressionHandler
for this application.Return the singletonSearchKeywordResolver
instance to be used for all search keyword resolution.The default behavior of this method is to callApplication.getStateManager()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getSupportedLocales()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getValidatorIds()
on the wrappedApplication
object.The default behavior of this method is to callApplication.getViewHandler()
on the wrappedApplication
object.A class that implements this interface uses this method to return an instance of the class being wrapped.void
publishEvent
(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 wrappedApplication
object.void
publishEvent
(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 wrappedApplication
object.void
removeELContextListener
(ELContextListener listener) The default behavior of this method is to callApplication.removeELContextListener(jakarta.el.ELContextListener)
on the wrappedApplication
object.void
setActionListener
(ActionListener listener) The default behavior of this method is to callApplication.setActionListener(jakarta.faces.event.ActionListener)
on the wrappedApplication
object.void
setDefaultLocale
(Locale locale) The default behavior of this method is to callApplication.setDefaultLocale(java.util.Locale)
on the wrappedApplication
object.void
setDefaultRenderKitId
(String renderKitId) The default behavior of this method is to callApplication.setDefaultRenderKitId(String)
on the wrappedApplication
object.void
setFlowHandler
(FlowHandler newHandler) Set theFlowHandler
instance used by theNavigationHandler
to satisfy the requirements of the faces flows feature.void
setMessageBundle
(String bundle) The default behavior of this method is to callApplication.setMessageBundle(String)
on the wrappedApplication
object.void
setNavigationHandler
(NavigationHandler handler) The default behavior of this method is to callApplication.setNavigationHandler(NavigationHandler)
on the wrappedApplication
object.void
setResourceHandler
(ResourceHandler resourceHandler) The default behavior of this method is to callApplication.setResourceHandler(ResourceHandler)
on the wrappedApplication
object.void
setSearchExpressionHandler
(SearchExpressionHandler searchExpressionHandler) Set theSearchExpressionHandler
instance used by the application.void
setStateManager
(StateManager manager) The default behavior of this method is to callApplication.setStateManager(StateManager)
on the wrappedApplication
object.void
setSupportedLocales
(Collection<Locale> locales) The default behavior of this method is to callApplication.setSupportedLocales(java.util.Collection)
on the wrappedApplication
object.void
setViewHandler
(ViewHandler handler) The default behavior of this method is to callApplication.setViewHandler(ViewHandler)
on the wrappedApplication
object.void
subscribeToEvent
(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener) The default behavior of this method is to callApplication.subscribeToEvent(Class, jakarta.faces.event.SystemEventListener)
on the wrappedApplication
object.void
subscribeToEvent
(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 wrappedApplication
object.void
unsubscribeFromEvent
(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener) The default behavior of this method is to callApplication.unsubscribeFromEvent(Class, jakarta.faces.event.SystemEventListener)
on the wrappedApplication
object.void
unsubscribeFromEvent
(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 wrappedApplication
object.
-
Constructor Details
-
ApplicationWrapper
Deprecated.Use the other constructor taking the implementation being wrapped. -
ApplicationWrapper
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 Details
-
getWrapped
Description copied from interface:FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrapped
in interfaceFacesWrapper<Application>
- Returns:
- the wrapped instance.
-
getActionListener
The default behavior of this method is to call
Application.getActionListener()
on the wrappedApplication
object.- Specified by:
getActionListener
in classApplication
- Returns:
- the action listener.
-
setActionListener
The default behavior of this method is to call
Application.setActionListener(jakarta.faces.event.ActionListener)
on the wrappedApplication
object.- Specified by:
setActionListener
in classApplication
- Parameters:
listener
- The new defaultActionListener
-
getDefaultLocale
The default behavior of this method is to call
Application.getDefaultLocale()
on the wrappedApplication
object.- Specified by:
getDefaultLocale
in classApplication
- Returns:
- the default Locale, or
null
.
-
setDefaultLocale
The default behavior of this method is to call
Application.setDefaultLocale(java.util.Locale)
on the wrappedApplication
object.- Specified by:
setDefaultLocale
in classApplication
- Parameters:
locale
- The new defaultLocale
-
getDefaultRenderKitId
The default behavior of this method is to call
Application.getDefaultRenderKitId()
on the wrappedApplication
object.- Specified by:
getDefaultRenderKitId
in classApplication
- Returns:
- the default render kit id, or
null
.
-
addDefaultValidatorId
The default behavior of this method is to call
Application.addDefaultValidatorId(String)
on the wrappedApplication
object.- Overrides:
addDefaultValidatorId
in classApplication
- Parameters:
validatorId
- the validator id.
-
getDefaultValidatorInfo
The default behavior of this method is to call
Application.getDefaultValidatorInfo()
on the wrappedApplication
object.- Overrides:
getDefaultValidatorInfo
in classApplication
- Returns:
- a map of default validator information.
-
setDefaultRenderKitId
The default behavior of this method is to call
Application.setDefaultRenderKitId(String)
on the wrappedApplication
object.- Specified by:
setDefaultRenderKitId
in classApplication
- Parameters:
renderKitId
- the render kit id to set.
-
getMessageBundle
The default behavior of this method is to call
Application.getMessageBundle()
on the wrappedApplication
object.- Specified by:
getMessageBundle
in classApplication
- Returns:
- the message bundle class name, or
null
.
-
setMessageBundle
The default behavior of this method is to call
Application.setMessageBundle(String)
on the wrappedApplication
object.- Specified by:
setMessageBundle
in classApplication
- Parameters:
bundle
- Base name of the resource bundle to be used
-
getViewHandler
The default behavior of this method is to call
Application.getViewHandler()
on the wrappedApplication
object.- Specified by:
getViewHandler
in classApplication
- Returns:
- the view handler.
-
setViewHandler
The default behavior of this method is to call
Application.setViewHandler(ViewHandler)
on the wrappedApplication
object.- Specified by:
setViewHandler
in classApplication
- Parameters:
handler
- The newViewHandler
instance- Throws:
IllegalStateException
- if this method is called after at least one request has been processed by theLifecycle
instance for this application.NullPointerException
- ifmanager
isnull
-
getStateManager
The default behavior of this method is to call
Application.getStateManager()
on the wrappedApplication
object.- Specified by:
getStateManager
in classApplication
- Returns:
- the state manager.
-
setStateManager
The default behavior of this method is to call
Application.setStateManager(StateManager)
on the wrappedApplication
object.- Specified by:
setStateManager
in classApplication
- Parameters:
manager
- The newStateManager
instance- Throws:
IllegalStateException
- if this method is called after at least one request has been processed by theLifecycle
instance for this application.NullPointerException
- ifmanager
isnull
-
addComponent
The default behavior of this method is to call
Application.addComponent(String, String)
on the wrappedApplication
object.- Specified by:
addComponent
in classApplication
- Parameters:
componentType
- The component type to be registeredcomponentClass
- The fully qualified class name of the correspondingUIComponent
implementation
-
createComponent
The default behavior of this method is to call
Application.createComponent(String)
on the wrappedApplication
object.- Specified by:
createComponent
in classApplication
- Parameters:
componentType
- The component type for which to create and return a newUIComponent
instance- Returns:
- the UI component.
- Throws:
FacesException
- if aUIComponent
of the specified type cannot be created
-
getComponentTypes
The default behavior of this method is to call
Application.getComponentTypes()
on the wrappedApplication
object.- Specified by:
getComponentTypes
in classApplication
- Returns:
- an iterator with component types.
-
addConverter
The default behavior of this method is to call
Application.addConverter(String, String)
on the wrappedApplication
object.- Specified by:
addConverter
in classApplication
- Parameters:
converterId
- The converter id to be registeredconverterClass
- The fully qualified class name of the correspondingConverter
implementation
-
addConverter
The default behavior of this method is to call
Application.addConverter(Class, String)
on the wrappedApplication
object.- Specified by:
addConverter
in classApplication
- Parameters:
targetClass
- The class for which this converter is registeredconverterClass
- The fully qualified class name of the correspondingConverter
implementation
-
createConverter
The default behavior of this method is to call
Application.createConverter(String)
on the wrappedApplication
object.- Specified by:
createConverter
in classApplication
- Parameters:
converterId
- The converter id for which to create and return a newConverter
instance- Returns:
- the converter.
-
createConverter
The default behavior of this method is to call
Application.createConverter(Class)
on the wrappedApplication
object.- Specified by:
createConverter
in classApplication
- Parameters:
targetClass
- Target class for which to return aConverter
- Returns:
- the converter.
-
getConverterIds
The default behavior of this method is to call
Application.getConverterIds()
on the wrappedApplication
object.- Specified by:
getConverterIds
in classApplication
- Returns:
- an iterator with converter ids.
-
getConverterTypes
The default behavior of this method is to call
Application.getConverterTypes()
on the wrappedApplication
object.- Specified by:
getConverterTypes
in classApplication
- Returns:
- an iterator with converter types.
-
getSupportedLocales
The default behavior of this method is to call
Application.getSupportedLocales()
on the wrappedApplication
object.- Specified by:
getSupportedLocales
in classApplication
- Returns:
- an iterator of the supported locales.
-
setSupportedLocales
The default behavior of this method is to call
Application.setSupportedLocales(java.util.Collection)
on the wrappedApplication
object.- Specified by:
setSupportedLocales
in classApplication
- Parameters:
locales
- The set of supportedLocale
s for this application
-
addBehavior
The default behavior of this method is to call
Application.addBehavior(String, String)
on the wrappedApplication
object.- Overrides:
addBehavior
in classApplication
- Parameters:
behaviorId
- The behavior id to be registeredbehaviorClass
- The fully qualified class name of the correspondingBehavior
implementation
-
createBehavior
The default behavior of this method is to call
Application.createBehavior(String)
on the wrappedApplication
object.- Overrides:
createBehavior
in classApplication
- Parameters:
behaviorId
- The behavior id for which to create and return a newBehavior
instance- Returns:
- the behavior.
- Throws:
FacesException
- if theBehavior
cannot be created
-
getBehaviorIds
The default behavior of this method is to call
Application.getBehaviorIds()
on the wrappedApplication
object.- Overrides:
getBehaviorIds
in classApplication
- Returns:
- an iterator with behavior ids.
-
addValidator
The default behavior of this method is to call
Application.addValidator(String, String)
on the wrappedApplication
object.- Specified by:
addValidator
in classApplication
- Parameters:
validatorId
- The validator id to be registeredvalidatorClass
- The fully qualified class name of the correspondingValidator
implementation
-
createValidator
The default behavior of this method is to call
Application.createValidator(String)
on the wrappedApplication
object.- Specified by:
createValidator
in classApplication
- Parameters:
validatorId
- The validator id for which to create and return a newValidator
instance- Returns:
- the validator.
- Throws:
FacesException
- if aValidator
of the specified id cannot be created
-
getValidatorIds
The default behavior of this method is to call
Application.getValidatorIds()
on the wrappedApplication
object.- Specified by:
getValidatorIds
in classApplication
- Returns:
- an iterator of validator ids.
-
getResourceHandler
The default behavior of this method is to call
Application.getResourceHandler()
on the wrappedApplication
object.- Overrides:
getResourceHandler
in classApplication
- Returns:
- the resource handler.
-
setResourceHandler
The default behavior of this method is to call
This method can throwApplication.setResourceHandler(ResourceHandler)
on the wrappedApplication
object.IllegalStateException
andNullPointerException
.- Overrides:
setResourceHandler
in classApplication
- Parameters:
resourceHandler
- The newResourceHandler
instance- Throws:
IllegalStateException
- if this method is called after at least one request has been processed by theLifecycle
instance for this application.NullPointerException
- ifresourceHandler
isnull
-
getResourceBundle
The default behavior of this method is to call
Application.getResourceBundle(jakarta.faces.context.FacesContext, String)
on the wrappedApplication
object.- Overrides:
getResourceBundle
in classApplication
- Parameters:
ctx
- the Faces context.name
- the name of the resource bundle.- Returns:
- the resource bundle.
-
getProjectStage
The default behavior of this method is to call
Application.getProjectStage()
on the wrappedApplication
object.- Overrides:
getProjectStage
in classApplication
- Returns:
- the project stage.
-
addELResolver
The default behavior of this method is to call
Application.addELResolver(jakarta.el.ELResolver)
on the wrappedApplication
object.- Overrides:
addELResolver
in classApplication
- Parameters:
resolver
- the Jakarta Expression Language resolver to add.- Throws:
IllegalStateException
- if called after the first request to theFacesServlet
has been serviced.
-
getELResolver
The default behavior of this method is to call
Application.getELResolver()
on the wrappedApplication
object.- Overrides:
getELResolver
in 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 wrappedApplication
object.- Overrides:
createComponent
in classApplication
- Parameters:
componentExpression
-ValueExpression
representing a component value expression (typically specified by thecomponent
attribute of a custom tag)context
-FacesContext
for the current requestcomponentType
- Component type to create if theValueExpression
does not return a component instance- Returns:
- the UI component.
- Throws:
FacesException
- if aUIComponent
cannot 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 wrappedApplication
object.- Overrides:
createComponent
in classApplication
- Parameters:
componentExpression
-ValueExpression
representing a component value expression (typically specified by thecomponent
attribute of a custom tag)context
-FacesContext
for the current requestcomponentType
- Component type to create if theValueExpression
does not return a component instancerendererType
- The renderer-type of theRenderer
that will render this component. Anull
value must be accepted for this parameter.- Returns:
- the UI component.
-
createComponent
The default behavior of this method is to call
Application.createComponent(jakarta.faces.context.FacesContext, String, String)
on the wrappedApplication
object.- Overrides:
createComponent
in classApplication
- Parameters:
context
-FacesContext
for the current requestcomponentType
- Component type to createrendererType
- The renderer-type of theRenderer
that will render this component. Anull
value must be accepted for this parameter.- Returns:
- the UI component.
-
createComponent
The default behavior of this method is to call
Application.createComponent(jakarta.faces.context.FacesContext, Resource)
on the wrappedApplication
object.- Overrides:
createComponent
in classApplication
- Parameters:
context
-FacesContext
for the current requestcomponentResource
- AResource
that points to a source file that provides an implementation of a component.- Returns:
- the UI component.
-
getExpressionFactory
The default behavior of this method is to call
Application.getExpressionFactory()
on the wrappedApplication
object.- Overrides:
getExpressionFactory
in classApplication
- Returns:
- the expression factory.
-
getFlowHandler
Description copied from class:Application
Return the thread-safe singleton
FlowHandler
for 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
Application
but 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 anull
return.- Overrides:
getFlowHandler
in classApplication
- Returns:
- the flow handler.
-
setFlowHandler
Description copied from class:Application
Set the
FlowHandler
instance used by theNavigationHandler
to satisfy the requirements of the faces flows feature.- Overrides:
setFlowHandler
in 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 wrappedApplication
object.- Overrides:
evaluateExpressionGet
in 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
The default behavior of this method is to call
Application.addELContextListener(jakarta.el.ELContextListener)
on the wrappedApplication
object.- Overrides:
addELContextListener
in classApplication
- Parameters:
listener
- the Jakarta Expression Language context listener to add.
-
removeELContextListener
The default behavior of this method is to call
Application.removeELContextListener(jakarta.el.ELContextListener)
on the wrappedApplication
object.- Overrides:
removeELContextListener
in classApplication
- Parameters:
listener
- the Jakarta Expression Language context listener to remove.
-
getELContextListeners
The default behavior of this method is to call
Application.getELContextListeners()
on the wrappedApplication
object.- Overrides:
getELContextListeners
in 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 wrappedApplication
object.- Overrides:
publishEvent
in classApplication
- Parameters:
context
- theFacesContext
for the current requestsystemEventClass
- TheClass
of 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 wrappedApplication
object.- Overrides:
publishEvent
in classApplication
- Parameters:
context
- theFacesContext
for the current requestsystemEventClass
- TheClass
of event that is being published.sourceBaseType
- TheClass
of the source event that must be used to lookup the listener to which this event must be published. If this argument isnull
the 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 wrappedApplication
object.- Overrides:
subscribeToEvent
in classApplication
- Parameters:
systemEventClass
- theClass
of event for whichlistener
must be fired.sourceClass
- theClass
of the instance which causes events of typesystemEventClass
to be fired. May benull
.listener
- the implementation ofSystemEventListener
whoseSystemEventListener.processEvent(jakarta.faces.event.SystemEvent)
method must be called when events of typesystemEventClass
are 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 wrappedApplication
object.- Overrides:
subscribeToEvent
in classApplication
- Parameters:
systemEventClass
- theClass
of event for whichlistener
must be fired.listener
- the implementation ofSystemEventListener
whoseSystemEventListener.processEvent(jakarta.faces.event.SystemEvent)
method must be called when events of typesystemEventClass
are 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 wrappedApplication
object.- Overrides:
unsubscribeFromEvent
in classApplication
- Parameters:
systemEventClass
- theClass
of event for whichlistener
must be fired.sourceClass
- theClass
of the instance which causes events of typesystemEventClass
to be fired. May benull
.listener
- the implementation ofSystemEventListener
to 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 wrappedApplication
object.- Overrides:
unsubscribeFromEvent
in classApplication
- Parameters:
systemEventClass
- theClass
of event for whichlistener
must be fired.listener
- the implementation ofSystemEventListener
to remove from the internal data structure.
-
getSearchExpressionHandler
Description copied from class:Application
Return the thread-safe singleton
SearchExpressionHandler
for this application.- Overrides:
getSearchExpressionHandler
in classApplication
- Returns:
- the
SearchExpressionHandler
.
-
setSearchExpressionHandler
Description copied from class:Application
Set the
SearchExpressionHandler
instance used by the application.- Overrides:
setSearchExpressionHandler
in classApplication
- Parameters:
searchExpressionHandler
- theSearchExpressionHandler
.
-
addSearchKeywordResolver
Description copied from class:Application
Cause the argument
resolver
to be added to the head of the resolver chain.It is not possible to remove a
SearchKeywordResolver
registered with this method, once it has been registered.The default implementation throws
UnsupportedOperationException
and is provided for the sole purpose of not breaking existing applications that extendApplication
.- Overrides:
addSearchKeywordResolver
in classApplication
- Parameters:
resolver
- the SearchKeywordResolver to add.
-
getSearchKeywordResolver
Description copied from class:Application
Return the singleton
SearchKeywordResolver
instance to be used for all search keyword resolution. This is actually an instance of a composite SearchKeywordResolver that must contain the followingSearchKeywordResolver
instances in the following order:-
SearchKeywordResolver
instances declared using the <search-keyword-resolver> element in the application configuration resources. -
Any
SearchKeywordResolver
instances added by calls toApplication.addSearchKeywordResolver(jakarta.faces.component.search.SearchKeywordResolver)
. -
The
SearchKeywordResolver
implementations for@all
,@child(n)
,@form
,@id(...)
,@namingcontainer
,@next
,@none
,@parent
,@previous
,@root
and@this
.
The default implementation throws
UnsupportedOperationException
and is provided for the sole purpose of not breaking existing applications that extendApplication
.- Overrides:
getSearchKeywordResolver
in classApplication
- Returns:
- the
SearchKeywordResolver
.
-
-