Class ApplicationImpl
- java.lang.Object
-
- javax.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 StringPROJECT_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(javax.el.ELResolver resolver)
- Overrides:
addELResolverin classApplication
-
addDefaultValidatorId
public void addDefaultValidatorId(String validatorId)
- Overrides:
addDefaultValidatorIdin classApplication
-
getDefaultValidatorInfo
public Map<String,String> getDefaultValidatorInfo()
- Overrides:
getDefaultValidatorInfoin classApplication
-
getELResolver
public final javax.el.ELResolver getELResolver()
- Overrides:
getELResolverin classApplication
-
getResourceBundle
public final ResourceBundle getResourceBundle(FacesContext facesContext, String name) throws FacesException, NullPointerException
- Overrides:
getResourceBundlein classApplication- Throws:
FacesExceptionNullPointerException
-
createComponent
public final UIComponent createComponent(javax.el.ValueExpression componentExpression, FacesContext facesContext, String componentType) throws FacesException, NullPointerException
- Overrides:
createComponentin classApplication- Throws:
FacesExceptionNullPointerException
-
createComponent
public UIComponent createComponent(javax.el.ValueExpression componentExpression, FacesContext context, String componentType, String rendererType)
- Overrides:
createComponentin classApplication
-
getExpressionFactory
public final javax.el.ExpressionFactory getExpressionFactory()
- Overrides:
getExpressionFactoryin classApplication
-
evaluateExpressionGet
public final <T> T evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType) throws javax.el.ELException
- Overrides:
evaluateExpressionGetin classApplication- Throws:
javax.el.ELException
-
addELContextListener
public final void addELContextListener(javax.el.ELContextListener listener)
- Overrides:
addELContextListenerin classApplication
-
publishEvent
public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
- Overrides:
publishEventin classApplication
-
publishEvent
public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass, Object source)
- Overrides:
publishEventin classApplication
-
removeELContextListener
public final void removeELContextListener(javax.el.ELContextListener listener)
- Overrides:
removeELContextListenerin classApplication
-
getELContextListeners
public final javax.el.ELContextListener[] getELContextListeners()
- Overrides:
getELContextListenersin classApplication
-
setActionListener
public final void setActionListener(ActionListener actionListener)
- Specified by:
setActionListenerin classApplication
-
getActionListener
public final ActionListener getActionListener()
- Specified by:
getActionListenerin classApplication
-
getBehaviorIds
public Iterator<String> getBehaviorIds()
- Overrides:
getBehaviorIdsin classApplication
-
getComponentTypes
public final Iterator<String> getComponentTypes()
- Specified by:
getComponentTypesin classApplication
-
getConverterIds
public final Iterator<String> getConverterIds()
- Specified by:
getConverterIdsin classApplication
-
getConverterTypes
public final Iterator<Class<?>> getConverterTypes()
- Specified by:
getConverterTypesin classApplication
-
setDefaultLocale
public final void setDefaultLocale(Locale locale)
- Specified by:
setDefaultLocalein classApplication
-
getDefaultLocale
public final Locale getDefaultLocale()
- Specified by:
getDefaultLocalein classApplication
-
setMessageBundle
public final void setMessageBundle(String messageBundle)
- Specified by:
setMessageBundlein classApplication
-
getMessageBundle
public final String getMessageBundle()
- Specified by:
getMessageBundlein classApplication
-
setNavigationHandler
public final void setNavigationHandler(NavigationHandler navigationHandler)
- Specified by:
setNavigationHandlerin classApplication
-
getNavigationHandler
public final NavigationHandler getNavigationHandler()
- Specified by:
getNavigationHandlerin classApplication
-
getProjectStage
public ProjectStage getProjectStage()
- Overrides:
getProjectStagein classApplication
-
setResourceHandler
public final void setResourceHandler(ResourceHandler resourceHandler)
- Overrides:
setResourceHandlerin classApplication
-
getResourceHandler
public final ResourceHandler getResourceHandler()
- Overrides:
getResourceHandlerin classApplication
-
setSupportedLocales
public final void setSupportedLocales(Collection<Locale> locales)
- Specified by:
setSupportedLocalesin classApplication
-
getSupportedLocales
public final Iterator<Locale> getSupportedLocales()
- Specified by:
getSupportedLocalesin classApplication
-
getValidatorIds
public final Iterator<String> getValidatorIds()
- Specified by:
getValidatorIdsin classApplication
-
setViewHandler
public final void setViewHandler(ViewHandler viewHandler)
- Specified by:
setViewHandlerin classApplication
-
subscribeToEvent
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
- Overrides:
subscribeToEventin classApplication
-
subscribeToEvent
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
- Overrides:
subscribeToEventin classApplication
-
unsubscribeFromEvent
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
- Overrides:
unsubscribeFromEventin classApplication
-
unsubscribeFromEvent
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
- Overrides:
unsubscribeFromEventin classApplication
-
getViewHandler
public final ViewHandler getViewHandler()
- Specified by:
getViewHandlerin classApplication
-
addBehavior
public void addBehavior(String behaviorId, String behaviorClass)
- Overrides:
addBehaviorin classApplication
-
addComponent
public final void addComponent(String componentType, String componentClassName)
- Specified by:
addComponentin classApplication
-
addConverter
public final void addConverter(String converterId, String converterClass)
- Specified by:
addConverterin classApplication
-
addConverter
public final void addConverter(Class<?> targetClass, String converterClass)
- Specified by:
addConverterin classApplication
-
addValidator
public final void addValidator(String validatorId, String validatorClass)
- Specified by:
addValidatorin classApplication
-
createBehavior
public Behavior createBehavior(String behaviorId) throws FacesException
- Overrides:
createBehaviorin classApplication- Throws:
FacesException
-
createComponent
public UIComponent createComponent(FacesContext context, Resource componentResource)
- Overrides:
createComponentin classApplication
-
createComponent
public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
- Overrides:
createComponentin classApplication
-
createComponent
public final UIComponent createComponent(String componentType) throws FacesException
- Specified by:
createComponentin 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 JSF 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 JSF 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:
createConverterin classApplication
-
createConverter
public final Converter createConverter(Class<?> targetClass)
- Specified by:
createConverterin classApplication
-
createValidator
public final Validator createValidator(String validatorId) throws FacesException
- Specified by:
createValidatorin classApplication- Throws:
FacesException
-
getDefaultRenderKitId
public final String getDefaultRenderKitId()
- Specified by:
getDefaultRenderKitIdin classApplication
-
setDefaultRenderKitId
public final void setDefaultRenderKitId(String defaultRenderKitId)
- Specified by:
setDefaultRenderKitIdin classApplication
-
getStateManager
public final StateManager getStateManager()
- Specified by:
getStateManagerin classApplication
-
setStateManager
public final void setStateManager(StateManager stateManager)
- Specified by:
setStateManagerin classApplication
-
setFlowHandler
public final void setFlowHandler(FlowHandler flowHandler)
- Overrides:
setFlowHandlerin classApplication
-
getFlowHandler
public final FlowHandler getFlowHandler()
- Overrides:
getFlowHandlerin classApplication
-
setSearchExpressionHandler
public final void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)
- Overrides:
setSearchExpressionHandlerin classApplication
-
getSearchExpressionHandler
public final SearchExpressionHandler getSearchExpressionHandler()
- Overrides:
getSearchExpressionHandlerin classApplication
-
getSearchKeywordResolver
public SearchKeywordResolver getSearchKeywordResolver()
- Overrides:
getSearchKeywordResolverin classApplication
-
addSearchKeywordResolver
public void addSearchKeywordResolver(SearchKeywordResolver resolver)
- Overrides:
addSearchKeywordResolverin classApplication
-
-