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
Application
that can be subclassed by developers wishing to provide specialized behavior to an existingApplication
instance. 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 void
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
addSearchKeywordResolver(SearchKeywordResolver resolver)
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.Behavior
createBehavior(String behaviorId)
The default behavior of this method is to callApplication.createBehavior(String)
on the wrappedApplication
object.UIComponent
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.UIComponent
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.UIComponent
createComponent(FacesContext context, Resource componentResource)
The default behavior of this method is to callApplication.createComponent(jakarta.faces.context.FacesContext, Resource)
on the wrappedApplication
object.UIComponent
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.UIComponent
createComponent(String componentType)
The default behavior of this method is to callApplication.createComponent(String)
on the wrappedApplication
object.Converter
createConverter(Class<?> targetClass)
The default behavior of this method is to callApplication.createConverter(Class)
on the wrappedApplication
object.Converter
createConverter(String converterId)
The default behavior of this method is to callApplication.createConverter(String)
on the wrappedApplication
object.Validator
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.ActionListener
getActionListener()
The default behavior of this method is to callApplication.getActionListener()
on the wrappedApplication
object.Iterator<String>
getBehaviorIds()
The default behavior of this method is to callApplication.getBehaviorIds()
on the wrappedApplication
object.Iterator<String>
getComponentTypes()
The default behavior of this method is to callApplication.getComponentTypes()
on the wrappedApplication
object.Iterator<String>
getConverterIds()
The default behavior of this method is to callApplication.getConverterIds()
on the wrappedApplication
object.Iterator<Class<?>>
getConverterTypes()
The default behavior of this method is to callApplication.getConverterTypes()
on the wrappedApplication
object.Locale
getDefaultLocale()
The default behavior of this method is to callApplication.getDefaultLocale()
on the wrappedApplication
object.String
getDefaultRenderKitId()
The default behavior of this method is to callApplication.getDefaultRenderKitId()
on the wrappedApplication
object.Map<String,String>
getDefaultValidatorInfo()
The default behavior of this method is to callApplication.getDefaultValidatorInfo()
on the wrappedApplication
object.ELContextListener[]
getELContextListeners()
The default behavior of this method is to callApplication.getELContextListeners()
on the wrappedApplication
object.ELResolver
getELResolver()
The default behavior of this method is to callApplication.getELResolver()
on the wrappedApplication
object.ExpressionFactory
getExpressionFactory()
The default behavior of this method is to callApplication.getExpressionFactory()
on the wrappedApplication
object.FlowHandler
getFlowHandler()
Return the thread-safe singletonFlowHandler
for this application.String
getMessageBundle()
The default behavior of this method is to callApplication.getMessageBundle()
on the wrappedApplication
object.NavigationHandler
getNavigationHandler()
The default behavior of this method is to callApplication.getNavigationHandler()
on the wrappedApplication
object.ProjectStage
getProjectStage()
The default behavior of this method is to callApplication.getProjectStage()
on the wrappedApplication
object.ResourceBundle
getResourceBundle(FacesContext ctx, String name)
The default behavior of this method is to callApplication.getResourceBundle(jakarta.faces.context.FacesContext, String)
on the wrappedApplication
object.ResourceHandler
getResourceHandler()
The default behavior of this method is to callApplication.getResourceHandler()
on the wrappedApplication
object.SearchExpressionHandler
getSearchExpressionHandler()
Return the thread-safe singletonSearchExpressionHandler
for this application.SearchKeywordResolver
getSearchKeywordResolver()
Return the singletonSearchKeywordResolver
instance to be used for all search keyword resolution.StateManager
getStateManager()
The default behavior of this method is to callApplication.getStateManager()
on the wrappedApplication
object.Iterator<Locale>
getSupportedLocales()
The default behavior of this method is to callApplication.getSupportedLocales()
on the wrappedApplication
object.Iterator<String>
getValidatorIds()
The default behavior of this method is to callApplication.getValidatorIds()
on the wrappedApplication
object.ViewHandler
getViewHandler()
The default behavior of this method is to callApplication.getViewHandler()
on the wrappedApplication
object.Application
getWrapped()
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 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: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
public ActionListener 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
public void setActionListener(ActionListener listener)
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
public Locale 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
public void setDefaultLocale(Locale locale)
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
public String 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
public void addDefaultValidatorId(String validatorId)
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
public Map<String,String> 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
public void setDefaultRenderKitId(String renderKitId)
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
public String 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
public void setMessageBundle(String bundle)
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
-
getNavigationHandler
public NavigationHandler getNavigationHandler()
The default behavior of this method is to call
Application.getNavigationHandler()
on the wrappedApplication
object.- Specified by:
getNavigationHandler
in 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 wrappedApplication
object.- Specified by:
setNavigationHandler
in classApplication
- Parameters:
handler
- The newNavigationHandler
instance
-
getViewHandler
public ViewHandler 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
public void setViewHandler(ViewHandler handler)
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
public StateManager 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
public void setStateManager(StateManager manager)
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
public void addComponent(String componentType, String componentClass)
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
public UIComponent createComponent(String componentType) throws FacesException
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
public Iterator<String> 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
public void addConverter(String converterId, String converterClass)
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
public void addConverter(Class<?> targetClass, String converterClass)
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
public Converter createConverter(String converterId)
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
public Converter createConverter(Class<?> targetClass)
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
public Iterator<String> 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
public Iterator<Class<?>> 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
public Iterator<Locale> 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
public void setSupportedLocales(Collection<Locale> locales)
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
public void addBehavior(String behaviorId, String behaviorClass)
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
public Behavior createBehavior(String behaviorId) throws FacesException
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
public Iterator<String> 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
public void addValidator(String validatorId, String validatorClass)
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
public Validator createValidator(String validatorId) throws FacesException
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
public Iterator<String> 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
public ResourceHandler 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
public void setResourceHandler(ResourceHandler resourceHandler)
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
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 wrappedApplication
object.- Overrides:
getResourceBundle
in 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 wrappedApplication
object.- Overrides:
getProjectStage
in 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 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
public ELResolver 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
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 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
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 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
public ExpressionFactory 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
public FlowHandler 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
public void setFlowHandler(FlowHandler newHandler)
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
public void addELContextListener(ELContextListener listener)
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
public void removeELContextListener(ELContextListener listener)
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
public ELContextListener[] 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
public SearchExpressionHandler getSearchExpressionHandler()
Description copied from class:Application
Return the thread-safe singleton
SearchExpressionHandler
for this application.- Overrides:
getSearchExpressionHandler
in classApplication
- Returns:
- the
SearchExpressionHandler
.
-
setSearchExpressionHandler
public void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)
Description copied from class:Application
Set the
SearchExpressionHandler
instance used by the application.- Overrides:
setSearchExpressionHandler
in classApplication
- Parameters:
searchExpressionHandler
- theSearchExpressionHandler
.
-
addSearchKeywordResolver
public void addSearchKeywordResolver(SearchKeywordResolver resolver)
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
public SearchKeywordResolver 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
.
-
-
-