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 existing Application instance. The default implementation of all methods
is to call through to the wrapped Application.
Usage: extend this class and override getWrapped() to
return the instance we are wrapping.
| Constructor and Description |
|---|
ApplicationWrapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBehavior(String behaviorId,
String behaviorClass)
The default behavior of this method
is to call |
void |
addComponent(String componentType,
String componentClass)
The default behavior of this method
is to call |
void |
addConverter(Class<?> targetClass,
String converterClass)
The default behavior of this method
is to call |
void |
addConverter(String converterId,
String converterClass)
The default behavior of this method
is to call |
void |
addDefaultValidatorId(String validatorId)
The default behavior of this method
is to call |
void |
addELContextListener(ELContextListener listener)
The default behavior of this method
is to call |
void |
addELResolver(ELResolver resolver)
The default behavior of this method
is to call |
void |
addValidator(String validatorId,
String validatorClass)
The default behavior of this method
is to call |
Behavior |
createBehavior(String behaviorId)
The default behavior of this method
is to call |
UIComponent |
createComponent(FacesContext context,
Resource componentResource)
The default behavior of this method
is to call |
UIComponent |
createComponent(FacesContext context,
String componentType,
String rendererType)
The default behavior of this method
is to call |
UIComponent |
createComponent(String componentType)
The default behavior of this method
is to call |
UIComponent |
createComponent(ValueBinding componentBinding,
FacesContext context,
String componentType)
Deprecated.
See superclass for alternative.
|
UIComponent |
createComponent(ValueExpression componentExpression,
FacesContext context,
String componentType)
The default behavior of this method
is to call |
UIComponent |
createComponent(ValueExpression componentExpression,
FacesContext context,
String componentType,
String rendererType)
The default behavior of this method
is to call |
Converter |
createConverter(Class<?> targetClass)
The default behavior of this method
is to call |
Converter |
createConverter(String converterId)
The default behavior of this method
is to call |
MethodBinding |
createMethodBinding(String ref,
Class<?>[] params)
Deprecated.
See superclass for alternative.
|
Validator |
createValidator(String validatorId)
The default behavior of this method
is to call |
ValueBinding |
createValueBinding(String ref)
The default behavior of this method
is to call |
<T> T |
evaluateExpressionGet(FacesContext context,
String expression,
Class<? extends T> expectedType)
Deprecated.
See superclass for alternative.
|
ActionListener |
getActionListener()
The default behavior of this method
is to call |
Iterator<String> |
getBehaviorIds()
The default behavior of this method
is to call |
Iterator<String> |
getComponentTypes()
The default behavior of this method
is to call |
Iterator<String> |
getConverterIds()
The default behavior of this method
is to call |
Iterator<Class<?>> |
getConverterTypes()
The default behavior of this method
is to call |
Locale |
getDefaultLocale()
The default behavior of this method
is to call |
String |
getDefaultRenderKitId()
The default behavior of this method
is to call |
Map<String,String> |
getDefaultValidatorInfo()
The default behavior of this method
is to call |
ELContextListener[] |
getELContextListeners()
The default behavior of this method
is to call |
ELResolver |
getELResolver()
The default behavior of this method
is to call |
ExpressionFactory |
getExpressionFactory()
The default behavior of this method
is to call |
FlowHandler |
getFlowHandler()
Return the thread-safe singleton
|
String |
getMessageBundle()
The default behavior of this method
is to call |
NavigationHandler |
getNavigationHandler()
The default behavior of this method
is to call |
ProjectStage |
getProjectStage()
The default behavior of this method
is to call |
PropertyResolver |
getPropertyResolver()
Deprecated.
See superclass for alternative.
|
ResourceBundle |
getResourceBundle(FacesContext ctx,
String name)
The default behavior of this method
is to call |
ResourceHandler |
getResourceHandler()
The default behavior of this method
is to call |
StateManager |
getStateManager()
The default behavior of this method
is to call |
Iterator<Locale> |
getSupportedLocales()
The default behavior of this method
is to call |
Iterator<String> |
getValidatorIds()
The default behavior of this method
is to call |
VariableResolver |
getVariableResolver()
Deprecated.
See superclass for alternative.
|
ViewHandler |
getViewHandler()
The default behavior of this method
is to call |
abstract 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 call |
void |
publishEvent(FacesContext context,
Class<? extends SystemEvent> systemEventClass,
Object source)
The default behavior of this method
is to call |
void |
removeELContextListener(ELContextListener listener)
The default behavior of this method
is to call |
void |
setActionListener(ActionListener listener)
The default behavior of this method
is to call |
void |
setDefaultLocale(Locale locale)
The default behavior of this method
is to call |
void |
setDefaultRenderKitId(String renderKitId)
The default behavior of this method
is to call |
void |
setFlowHandler(FlowHandler newHandler)
Set the |
void |
setMessageBundle(String bundle)
The default behavior of this method
is to call |
void |
setNavigationHandler(NavigationHandler handler)
The default behavior of this method
is to call |
void |
setPropertyResolver(PropertyResolver resolver)
Deprecated.
See superclass for alternative.
|
void |
setResourceHandler(ResourceHandler resourceHandler)
The default behavior of this method
is to call |
void |
setStateManager(StateManager manager)
The default behavior of this method
is to call |
void |
setSupportedLocales(Collection<Locale> locales)
The default behavior of this method
is to call |
void |
setVariableResolver(VariableResolver resolver)
Deprecated.
See superclass for alternative.
|
void |
setViewHandler(ViewHandler handler)
The default behavior of this method
is to call |
void |
subscribeToEvent(Class<? extends SystemEvent> systemEventClass,
Class<?> sourceClass,
SystemEventListener listener)
The default behavior of this method
is to call |
void |
subscribeToEvent(Class<? extends SystemEvent> systemEventClass,
SystemEventListener listener)
The default behavior of this method
is to call |
void |
unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass,
Class<?> sourceClass,
SystemEventListener listener)
The default behavior of this method
is to call |
void |
unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass,
SystemEventListener listener)
The default behavior of this method
is to call |
public abstract Application getWrapped()
FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
getWrapped in interface FacesWrapper<Application>public ActionListener getActionListener()
The default behavior of this method
is to call Application.getActionListener() on the
wrapped Application object.
getActionListener in class Applicationpublic void setActionListener(ActionListener listener)
The default behavior of this method
is to call Application.setActionListener(javax.faces.event.ActionListener)
on the wrapped Application object.
setActionListener in class Applicationlistener - The new default ActionListenerpublic Locale getDefaultLocale()
The default behavior of this method
is to call Application.getDefaultLocale() on the
wrapped Application object.
getDefaultLocale in class Applicationpublic void setDefaultLocale(Locale locale)
The default behavior of this method
is to call Application.setDefaultLocale(java.util.Locale) on the
wrapped Application object.
setDefaultLocale in class Applicationlocale - The new default Localepublic String getDefaultRenderKitId()
The default behavior of this method
is to call Application.getDefaultRenderKitId() on the
wrapped Application object.
getDefaultRenderKitId in class Applicationpublic void addDefaultValidatorId(String validatorId)
The default behavior of this method
is to call Application.addDefaultValidatorId(String) on the
wrapped Application object.
addDefaultValidatorId in class Applicationpublic Map<String,String> getDefaultValidatorInfo()
The default behavior of this method
is to call Application.getDefaultValidatorInfo() on the
wrapped Application object.
getDefaultValidatorInfo in class Applicationpublic void setDefaultRenderKitId(String renderKitId)
The default behavior of this method
is to call Application.setDefaultRenderKitId(String) on the
wrapped Application object.
setDefaultRenderKitId in class Applicationpublic String getMessageBundle()
The default behavior of this method
is to call Application.getMessageBundle() on the
wrapped Application object.
getMessageBundle in class Applicationpublic void setMessageBundle(String bundle)
The default behavior of this method
is to call Application.setMessageBundle(String) on the
wrapped Application object.
setMessageBundle in class Applicationbundle - Base name of the resource bundle to be usedpublic NavigationHandler getNavigationHandler()
The default behavior of this method
is to call Application.getNavigationHandler() on the
wrapped Application object.
getNavigationHandler in class Applicationpublic void setNavigationHandler(NavigationHandler handler)
The default behavior of this method
is to call Application.setNavigationHandler(NavigationHandler) on the
wrapped Application object.
setNavigationHandler in class Applicationhandler - The new NavigationHandler instance@Deprecated public PropertyResolver getPropertyResolver()
The default behavior of this method
is to call Application.getPropertyResolver() on the
wrapped Application object.
getPropertyResolver in class Application@Deprecated public void setPropertyResolver(PropertyResolver resolver)
The default behavior of this method
is to call Application.setPropertyResolver(javax.faces.el.PropertyResolver) on the
wrapped Application object.
setPropertyResolver in class Applicationresolver - The new PropertyResolver instance@Deprecated public VariableResolver getVariableResolver()
The default behavior of this method
is to call Application.getVariableResolver() on the
wrapped Application object.
getVariableResolver in class Application@Deprecated public void setVariableResolver(VariableResolver resolver)
The default behavior of this method
is to call Application.setVariableResolver(javax.faces.el.VariableResolver) on the
wrapped Application object.
setVariableResolver in class Applicationresolver - The new VariableResolver instancepublic ViewHandler getViewHandler()
The default behavior of this method
is to call Application.getViewHandler() on the
wrapped Application object.
getViewHandler in class Applicationpublic void setViewHandler(ViewHandler handler)
The default behavior of this method
is to call Application.setViewHandler(ViewHandler) on the
wrapped Application object.
setViewHandler in class Applicationhandler - The new ViewHandler instanceIllegalStateException - if this method is called after
at least one request has been processed by the
Lifecycle instance for this application.NullPointerException - if manager
is nullpublic StateManager getStateManager()
The default behavior of this method
is to call Application.getStateManager() on the
wrapped Application object.
getStateManager in class Applicationpublic void setStateManager(StateManager manager)
The default behavior of this method
is to call Application.setStateManager(StateManager) on the
wrapped Application object.
setStateManager in class Applicationmanager - The new StateManager instanceIllegalStateException - if this method is called after
at least one request has been processed by the
Lifecycle instance for this application.NullPointerException - if manager
is nullpublic void addComponent(String componentType, String componentClass)
The default behavior of this method
is to call Application.addComponent(String, String) on the
wrapped Application object.
addComponent in class ApplicationcomponentType - The component type to be registeredcomponentClass - The fully qualified class name of the
corresponding UIComponent implementationpublic UIComponent createComponent(String componentType) throws FacesException
The default behavior of this method
is to call Application.createComponent(String) on the
wrapped Application object.
createComponent in class ApplicationcomponentType - The component type for which to create and
return a new UIComponent instanceFacesException - if a UIComponent of the
specified type cannot be created@Deprecated public UIComponent createComponent(ValueBinding componentBinding, FacesContext context, String componentType) throws FacesException
The default behavior of this method
is to call Application.createComponent(javax.faces.el.ValueBinding, javax.faces.context.FacesContext, String)
on the wrapped Application object.
createComponent in class ApplicationcomponentBinding - ValueBinding representing a
component value binding expression (typically specified by the
component attribute of a custom tag)context - FacesContext for the current requestcomponentType - Component type to create if the ValueBinding
does not return a component instanceFacesException - if a UIComponent cannot be createdpublic Iterator<String> getComponentTypes()
The default behavior of this method
is to call Application.getComponentTypes() on the
wrapped Application object.
getComponentTypes in class Applicationpublic void addConverter(String converterId, String converterClass)
The default behavior of this method
is to call Application.addConverter(String, String) on the
wrapped Application object.
addConverter in class ApplicationconverterId - The converter id to be registeredconverterClass - The fully qualified class name of the
corresponding Converter implementationpublic void addConverter(Class<?> targetClass, String converterClass)
The default behavior of this method
is to call Application.addConverter(Class, String) on the
wrapped Application object.
addConverter in class ApplicationtargetClass - The class for which this converter is registeredconverterClass - The fully qualified class name of the
corresponding Converter implementationpublic Converter createConverter(String converterId)
The default behavior of this method
is to call Application.createConverter(String) on the
wrapped Application object.
createConverter in class ApplicationconverterId - The converter id for which to create and
return a new Converter instancepublic Converter createConverter(Class<?> targetClass)
The default behavior of this method
is to call Application.createConverter(Class) on the
wrapped Application object.
createConverter in class ApplicationtargetClass - Target class for which to return a Converterpublic Iterator<String> getConverterIds()
The default behavior of this method
is to call Application.getConverterIds() on the
wrapped Application object.
getConverterIds in class Applicationpublic Iterator<Class<?>> getConverterTypes()
The default behavior of this method
is to call Application.getConverterTypes() on the
wrapped Application object.
getConverterTypes in class Application@Deprecated public MethodBinding createMethodBinding(String ref, Class<?>[] params) throws ReferenceSyntaxException
The default behavior of this method
is to call Application.createMethodBinding(String, Class[]) on the
wrapped Application object.
createMethodBinding in class Applicationref - Method binding expression for which to return a
MethodBinding instanceparams - Parameter signatures that must be compatible with those
of the method to be invoked, or a zero-length array or null
for a method that takes no parametersReferenceSyntaxException - if the specified ref
has invalid syntaxpublic Iterator<Locale> getSupportedLocales()
The default behavior of this method
is to call Application.getSupportedLocales() on the
wrapped Application object.
getSupportedLocales in class Applicationpublic void setSupportedLocales(Collection<Locale> locales)
The default behavior of this method
is to call Application.setSupportedLocales(java.util.Collection) on the
wrapped Application object.
setSupportedLocales in class Applicationlocales - The set of supported Locales
for this applicationpublic void addBehavior(String behaviorId, String behaviorClass)
The default behavior of this method
is to call Application.addBehavior(String, String) on the
wrapped Application object.
addBehavior in class ApplicationbehaviorId - The behavior id to be registeredbehaviorClass - The fully qualified class name of the
corresponding Behavior implementationpublic Behavior createBehavior(String behaviorId) throws FacesException
The default behavior of this method
is to call Application.createBehavior(String) on the
wrapped Application object.
createBehavior in class ApplicationbehaviorId - The behavior id for which to create and
return a new Behavior instanceFacesException - if the Behavior cannot be
createdpublic Iterator<String> getBehaviorIds()
The default behavior of this method
is to call Application.getBehaviorIds() on the
wrapped Application object.
getBehaviorIds in class Applicationpublic void addValidator(String validatorId, String validatorClass)
The default behavior of this method
is to call Application.addValidator(String, String) on the
wrapped Application object.
addValidator in class ApplicationvalidatorId - The validator id to be registeredvalidatorClass - The fully qualified class name of the
corresponding Validator implementationpublic Validator createValidator(String validatorId) throws FacesException
The default behavior of this method
is to call Application.createValidator(String) on the
wrapped Application object.
createValidator in class ApplicationvalidatorId - The validator id for which to create and
return a new Validator instanceFacesException - if a Validator of the
specified id cannot be createdpublic Iterator<String> getValidatorIds()
The default behavior of this method
is to call Application.getValidatorIds() on the
wrapped Application object.
getValidatorIds in class Applicationpublic ValueBinding createValueBinding(String ref) throws ReferenceSyntaxException
The default behavior of this method
is to call Application.createValueBinding(String) on the
wrapped Application object.
createValueBinding in class Applicationref - Value binding expression for which to return a
ValueBinding instanceReferenceSyntaxException - if the specified ref
has invalid syntaxpublic ResourceHandler getResourceHandler()
The default behavior of this method
is to call Application.getResourceHandler() on the
wrapped Application object.
getResourceHandler in class Applicationpublic void setResourceHandler(ResourceHandler resourceHandler)
The default behavior of this method
is to call Application.setResourceHandler(ResourceHandler) on the
wrapped Application object.
setResourceHandler in class ApplicationresourceHandler - The new ResourceHandler instanceIllegalStateException - if this method is called after
at least one request has been processed by the
Lifecycle instance for this application.NullPointerException - if resourceHandler
is nullpublic ResourceBundle getResourceBundle(FacesContext ctx, String name)
The default behavior of this method
is to call Application.getResourceBundle(javax.faces.context.FacesContext, String) on the
wrapped Application object.
getResourceBundle in class Applicationpublic ProjectStage getProjectStage()
The default behavior of this method
is to call Application.getProjectStage() on the
wrapped Application object.
getProjectStage in class Applicationpublic void addELResolver(ELResolver resolver)
The default behavior of this method
is to call Application.addELResolver(javax.el.ELResolver) on the
wrapped Application object.
addELResolver in class ApplicationIllegalStateException - if called after the first
request to the FacesServlet has been
serviced.public ELResolver getELResolver()
The default behavior of this method
is to call Application.getELResolver() on the
wrapped Application object.
getELResolver in class Applicationpublic UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException
The default behavior of this method
is to call Application.createComponent(javax.el.ValueExpression, javax.faces.context.FacesContext, String)
on the wrapped Application object.
createComponent in class ApplicationcomponentExpression - ValueExpression representing a
component value expression (typically specified by the
component attribute of a custom tag)context - FacesContext for the current requestcomponentType - Component type to create if the ValueExpression does not return a component instanceFacesException - if a UIComponent cannot be createdpublic UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType, String rendererType)
The default behavior of this method
is to call Application.createComponent(javax.el.ValueExpression, javax.faces.context.FacesContext, String, String)
on the wrapped Application object.
createComponent in class ApplicationcomponentExpression - ValueExpression representing a
component value expression (typically specified by the
component attribute of a custom tag)context - FacesContext for the current requestcomponentType - Component type to create if the ValueExpression does not return a component instancerendererType - The renderer-type of the
Renderer that will render this component. A
null value must be accepted for this parameter.public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
The default behavior of this method
is to call Application.createComponent(javax.faces.context.FacesContext, String, String)
on the wrapped Application object.
createComponent in class Applicationcontext - FacesContext for the current requestcomponentType - Component type to createrendererType - The renderer-type of the
Renderer that will render this component. A
null value must be accepted for this parameter.public UIComponent createComponent(FacesContext context, Resource componentResource)
The default behavior of this method
is to call Application.createComponent(javax.faces.context.FacesContext, Resource)
on the wrapped Application object.
createComponent in class Applicationcontext - FacesContext for the current requestcomponentResource - A Resource that points to a
source file that provides an implementation of a component.public ExpressionFactory getExpressionFactory()
The default behavior of this method
is to call Application.getExpressionFactory() on the
wrapped Application object.
getExpressionFactory in class Applicationpublic FlowHandler getFlowHandler()
ApplicationReturn the thread-safe singleton
FlowHandler for this application. For implementations declaring
compliance with version 2.2 of the specification, this method must never return
null, 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 returns null. Due to the decoratable nature
of Application, code calling this method should always check
for a null return.
getFlowHandler in class Applicationpublic void setFlowHandler(FlowHandler newHandler)
ApplicationSet the FlowHandler instance used by
the NavigationHandler to satisfy the requirements of the faces
flows feature.
setFlowHandler in class Application@Deprecated 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(javax.faces.context.FacesContext, String, Class)
on the wrapped Application object.
evaluateExpressionGet in class ApplicationELExceptionpublic void addELContextListener(ELContextListener listener)
The default behavior of this method
is to call Application.addELContextListener(javax.el.ELContextListener) on the
wrapped Application object.
addELContextListener in class Applicationpublic void removeELContextListener(ELContextListener listener)
The default behavior of this method
is to call Application.removeELContextListener(javax.el.ELContextListener) on the
wrapped Application object.
removeELContextListener in class Applicationpublic ELContextListener[] getELContextListeners()
The default behavior of this method
is to call Application.getELContextListeners() on the
wrapped Application object.
getELContextListeners in class Applicationpublic void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)
The default behavior of this method
is to call Application.publishEvent(javax.faces.context.FacesContext, Class, Object)
on the wrapped Application object.
publishEvent in class Applicationcontext - the FacesContext for the current requestsystemEventClass - The Class of event that is
being published.source - The source for the event of type
systemEventClass.public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
The default behavior of this method
is to call Application.publishEvent(javax.faces.context.FacesContext, Class, Class, Object)
on the wrapped Application object.
publishEvent in class Applicationcontext - the FacesContext for the current requestsystemEventClass - The Class of event that is
being published.sourceBaseType - The Class of the source event
that must be used to lookup the listener to which this event must
be published. If this argument is null the return
from source.getClass() must be used as the
sourceBaseType.source - The source for the event of type
systemEventClass.public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
The default behavior of this method
is to call Application.subscribeToEvent(Class, Class, javax.faces.event.SystemEventListener) on the
wrapped Application object.
subscribeToEvent in class ApplicationsystemEventClass - the Class of event for which
listener must be fired.sourceClass - the Class of the instance which
causes events of type systemEventClass to be fired.
May be null.listener - the implementation of SystemEventListener whose SystemEventListener.processEvent(javax.faces.event.SystemEvent) method must be called when
events of type systemEventClass are fired.public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
The default behavior of this method
is to call Application.subscribeToEvent(Class, javax.faces.event.SystemEventListener) on the
wrapped Application object.
subscribeToEvent in class ApplicationsystemEventClass - the Class of event for which
listener must be fired.listener - the implementation of SystemEventListener whose SystemEventListener.processEvent(javax.faces.event.SystemEvent) method must
be called when events of type systemEventClass are
fired.
See Application.subscribeToEvent(java.lang.Class,java.lang.Class,javax.faces.event.SystemEventListener)
for an additional requirement regarding when it is valid to call
this method.
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
The default behavior of this method
is to call Application.unsubscribeFromEvent(Class, Class, javax.faces.event.SystemEventListener) on the
wrapped Application object.
unsubscribeFromEvent in class ApplicationsystemEventClass - the Class of event for which
listener must be fired.sourceClass - the Class of the instance which
causes events of type systemEventClass to be fired.
May be null.listener - the implementation of SystemEventListener to remove from the internal data
structure.public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
The default behavior of this method
is to call Application.unsubscribeFromEvent(Class, javax.faces.event.SystemEventListener) on the
wrapped Application object.
unsubscribeFromEvent in class ApplicationsystemEventClass - the Class of event for which
listener must be fired.listener - the implementation of SystemEventListener to remove from the internal data
structure.Copyright © 2017 JBoss by Red Hat. All rights reserved.