Class ApplicationImpl
- java.lang.Object
-
- jakarta.faces.application.Application
-
- org.apache.myfaces.application.ApplicationImpl
-
public class ApplicationImpl extends Application
DOCUMENT ME!- Version:
- $Revision$ $Date$
- Author:
- Manfred Geiler (latest modification by $Author$), Anton Koinov, Thomas Spiegl, Stan Silvert
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROJECT_STAGE_SYSTEM_PROPERTY_NAME
-
Constructor Summary
Constructors Constructor Description ApplicationImpl()
-
Method Summary
-
-
-
Field Detail
-
PROJECT_STAGE_SYSTEM_PROPERTY_NAME
public static final String PROJECT_STAGE_SYSTEM_PROPERTY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
addELResolver
public final void addELResolver(jakarta.el.ELResolver resolver)
- Overrides:
addELResolver
in classApplication
-
addDefaultValidatorId
public void addDefaultValidatorId(String validatorId)
- Overrides:
addDefaultValidatorId
in classApplication
-
getDefaultValidatorInfo
public Map<String,String> getDefaultValidatorInfo()
- Overrides:
getDefaultValidatorInfo
in classApplication
-
getELResolver
public final jakarta.el.ELResolver getELResolver()
- Overrides:
getELResolver
in classApplication
-
getResourceBundle
public final ResourceBundle getResourceBundle(FacesContext facesContext, String name) throws FacesException, NullPointerException
- Overrides:
getResourceBundle
in classApplication
- Throws:
FacesException
NullPointerException
-
createComponent
public final UIComponent createComponent(jakarta.el.ValueExpression componentExpression, FacesContext facesContext, String componentType) throws FacesException, NullPointerException
- Overrides:
createComponent
in classApplication
- Throws:
FacesException
NullPointerException
-
createComponent
public UIComponent createComponent(jakarta.el.ValueExpression componentExpression, FacesContext context, String componentType, String rendererType)
- Overrides:
createComponent
in classApplication
-
getExpressionFactory
public final jakarta.el.ExpressionFactory getExpressionFactory()
- Overrides:
getExpressionFactory
in classApplication
-
evaluateExpressionGet
public final <T> T evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType) throws jakarta.el.ELException
- Overrides:
evaluateExpressionGet
in classApplication
- Throws:
jakarta.el.ELException
-
addELContextListener
public final void addELContextListener(jakarta.el.ELContextListener listener)
- Overrides:
addELContextListener
in classApplication
-
publishEvent
public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
- Overrides:
publishEvent
in classApplication
-
publishEvent
public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass, Object source)
- Overrides:
publishEvent
in classApplication
-
removeELContextListener
public final void removeELContextListener(jakarta.el.ELContextListener listener)
- Overrides:
removeELContextListener
in classApplication
-
getELContextListeners
public final jakarta.el.ELContextListener[] getELContextListeners()
- Overrides:
getELContextListeners
in classApplication
-
setActionListener
public final void setActionListener(ActionListener actionListener)
- Specified by:
setActionListener
in classApplication
-
getActionListener
public final ActionListener getActionListener()
- Specified by:
getActionListener
in classApplication
-
getBehaviorIds
public Iterator<String> getBehaviorIds()
- Overrides:
getBehaviorIds
in classApplication
-
getComponentTypes
public final Iterator<String> getComponentTypes()
- Specified by:
getComponentTypes
in classApplication
-
getConverterIds
public final Iterator<String> getConverterIds()
- Specified by:
getConverterIds
in classApplication
-
getConverterTypes
public final Iterator<Class<?>> getConverterTypes()
- Specified by:
getConverterTypes
in classApplication
-
setDefaultLocale
public final void setDefaultLocale(Locale locale)
- Specified by:
setDefaultLocale
in classApplication
-
getDefaultLocale
public final Locale getDefaultLocale()
- Specified by:
getDefaultLocale
in classApplication
-
setMessageBundle
public final void setMessageBundle(String messageBundle)
- Specified by:
setMessageBundle
in classApplication
-
getMessageBundle
public final String getMessageBundle()
- Specified by:
getMessageBundle
in classApplication
-
setNavigationHandler
public final void setNavigationHandler(NavigationHandler navigationHandler)
- Specified by:
setNavigationHandler
in classApplication
-
getNavigationHandler
public final NavigationHandler getNavigationHandler()
- Specified by:
getNavigationHandler
in classApplication
-
getProjectStage
public ProjectStage getProjectStage()
- Overrides:
getProjectStage
in classApplication
-
setResourceHandler
public final void setResourceHandler(ResourceHandler resourceHandler)
- Overrides:
setResourceHandler
in classApplication
-
getResourceHandler
public final ResourceHandler getResourceHandler()
- Overrides:
getResourceHandler
in classApplication
-
setSupportedLocales
public final void setSupportedLocales(Collection<Locale> locales)
- Specified by:
setSupportedLocales
in classApplication
-
getSupportedLocales
public final Iterator<Locale> getSupportedLocales()
- Specified by:
getSupportedLocales
in classApplication
-
getValidatorIds
public final Iterator<String> getValidatorIds()
- Specified by:
getValidatorIds
in classApplication
-
setViewHandler
public final void setViewHandler(ViewHandler viewHandler)
- Specified by:
setViewHandler
in classApplication
-
subscribeToEvent
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
- Overrides:
subscribeToEvent
in classApplication
-
subscribeToEvent
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
- Overrides:
subscribeToEvent
in classApplication
-
unsubscribeFromEvent
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
- Overrides:
unsubscribeFromEvent
in classApplication
-
unsubscribeFromEvent
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
- Overrides:
unsubscribeFromEvent
in classApplication
-
getViewHandler
public final ViewHandler getViewHandler()
- Specified by:
getViewHandler
in classApplication
-
addBehavior
public void addBehavior(String behaviorId, String behaviorClass)
- Overrides:
addBehavior
in classApplication
-
addComponent
public final void addComponent(String componentType, String componentClassName)
- Specified by:
addComponent
in classApplication
-
addConverter
public final void addConverter(String converterId, String converterClass)
- Specified by:
addConverter
in classApplication
-
addConverter
public final void addConverter(Class<?> targetClass, String converterClass)
- Specified by:
addConverter
in classApplication
-
addValidator
public final void addValidator(String validatorId, String validatorClass)
- Specified by:
addValidator
in classApplication
-
createBehavior
public Behavior createBehavior(String behaviorId) throws FacesException
- Overrides:
createBehavior
in classApplication
- Throws:
FacesException
-
createComponent
public UIComponent createComponent(FacesContext context, Resource componentResource)
- Overrides:
createComponent
in classApplication
-
createComponent
public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
- Overrides:
createComponent
in classApplication
-
createComponent
public final UIComponent createComponent(String componentType) throws FacesException
- Specified by:
createComponent
in classApplication
- Throws:
FacesException
-
createConverter
public final Converter createConverter(String converterId)
Return an instance of the converter class that has been registered under the specified id.Converters are registered via faces-config.xml files, and can also be registered via the addConverter(String id, Class converterClass) method on this class. Here the the appropriate Class definition is found, then an instance is created and returned.
A converter registered via a config file can have any number of nested attribute or property tags. The Faces specification is very vague about what effect these nested tags have. This method ignores nested attribute definitions, but for each nested property tag the corresponding setter is invoked on the new Converter instance passing the property's defaultValuer. Basic typeconversion is done so the target properties on the Converter instance can be String, int, boolean, etc. Note that:
- the Sun Mojarra Faces implemenation ignores nested property tags completely, so this behaviour cannot be relied on across implementations.
- there is no equivalent functionality for converter classes registered via the Application.addConverter api method.
Note that this method is most commonly called from the standard f:attribute tag. As an alternative, most components provide a "converter" attribute which uses an EL expression to create a Converter instance, in which case this method is not invoked at all. The converter attribute allows the returned Converter instance to be configured via normal dependency-injection, and is generally a better choice than using this method.
- Specified by:
createConverter
in classApplication
-
createConverter
public final Converter createConverter(Class<?> targetClass)
- Specified by:
createConverter
in classApplication
-
createValidator
public final Validator createValidator(String validatorId) throws FacesException
- Specified by:
createValidator
in classApplication
- Throws:
FacesException
-
getDefaultRenderKitId
public final String getDefaultRenderKitId()
- Specified by:
getDefaultRenderKitId
in classApplication
-
setDefaultRenderKitId
public final void setDefaultRenderKitId(String defaultRenderKitId)
- Specified by:
setDefaultRenderKitId
in classApplication
-
getStateManager
public final StateManager getStateManager()
- Specified by:
getStateManager
in classApplication
-
setStateManager
public final void setStateManager(StateManager stateManager)
- Specified by:
setStateManager
in classApplication
-
setFlowHandler
public final void setFlowHandler(FlowHandler flowHandler)
- Overrides:
setFlowHandler
in classApplication
-
getFlowHandler
public final FlowHandler getFlowHandler()
- Overrides:
getFlowHandler
in classApplication
-
setSearchExpressionHandler
public final void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)
- Overrides:
setSearchExpressionHandler
in classApplication
-
getSearchExpressionHandler
public final SearchExpressionHandler getSearchExpressionHandler()
- Overrides:
getSearchExpressionHandler
in classApplication
-
getSearchKeywordResolver
public SearchKeywordResolver getSearchKeywordResolver()
- Overrides:
getSearchKeywordResolver
in classApplication
-
addSearchKeywordResolver
public void addSearchKeywordResolver(SearchKeywordResolver resolver)
- Overrides:
addSearchKeywordResolver
in classApplication
-
-