org.apache.myfaces.application
Class ApplicationImpl

java.lang.Object
  extended by javax.faces.application.Application
      extended by org.apache.myfaces.application.ApplicationImpl

public class ApplicationImpl
extends Application

DOCUMENT ME!

Version:
$Revision: 684459 $ $Date: 2008-08-10 06:13:56 -0500 (Sun, 10 Aug 2008) $
Author:
Manfred Geiler (latest modification by $Author: skitching $), Anton Koinov, Thomas Spiegl, Stan Silvert

Constructor Summary
ApplicationImpl()
           
 
Method Summary
 void addComponent(java.lang.String componentType, java.lang.String componentClassName)
           
 void addConverter(java.lang.Class targetClass, java.lang.String converterClass)
           
 void addConverter(java.lang.String converterId, java.lang.String converterClass)
           
 void addConverterConfiguration(java.lang.String converterClassName, Converter configuration)
           
 void addELContextListener(javax.el.ELContextListener listener)
           
 void addELResolver(javax.el.ELResolver resolver)
           
 void addValidator(java.lang.String validatorId, java.lang.String validatorClass)
           
 UIComponent createComponent(java.lang.String componentType)
           
 UIComponent createComponent(ValueBinding valueBinding, FacesContext facesContext, java.lang.String componentType)
          Deprecated. Use createComponent(ValueExpression, FacesContext, String) instead.
 UIComponent createComponent(javax.el.ValueExpression componentExpression, FacesContext facesContext, java.lang.String componentType)
           
 Converter createConverter(java.lang.Class targetClass)
           
 Converter createConverter(java.lang.String converterId)
          Return an instance of the converter class that has been registered under the specified id.
 MethodBinding createMethodBinding(java.lang.String reference, java.lang.Class[] params)
          Deprecated.  
 Validator createValidator(java.lang.String validatorId)
           
 ValueBinding createValueBinding(java.lang.String reference)
          Deprecated.  
 java.lang.Object evaluateExpressionGet(FacesContext context, java.lang.String expression, java.lang.Class expectedType)
           
 ActionListener getActionListener()
           
 java.util.Iterator<java.lang.String> getComponentTypes()
           
 java.util.Iterator<java.lang.String> getConverterIds()
           
 java.util.Iterator<java.lang.Class> getConverterTypes()
           
 java.util.Locale getDefaultLocale()
           
 java.lang.String getDefaultRenderKitId()
           
 javax.el.ELContextListener[] getELContextListeners()
           
 javax.el.ELResolver getELResolver()
           
 javax.el.ExpressionFactory getExpressionFactory()
           
 java.lang.String getMessageBundle()
           
 NavigationHandler getNavigationHandler()
           
 PropertyResolver getPropertyResolver()
          Deprecated.  
protected  ELResolverBuilder getResolverBuilderForFaces()
           
 java.util.ResourceBundle getResourceBundle(FacesContext facesContext, java.lang.String name)
           
 StateManager getStateManager()
           
 java.util.Iterator<java.util.Locale> getSupportedLocales()
           
 java.util.Iterator<java.lang.String> getValidatorIds()
           
 VariableResolver getVariableResolver()
          Deprecated.  
 ViewHandler getViewHandler()
           
 void removeELContextListener(javax.el.ELContextListener listener)
           
 void setActionListener(ActionListener actionListener)
           
 void setDefaultLocale(java.util.Locale locale)
           
 void setDefaultRenderKitId(java.lang.String defaultRenderKitId)
           
static void setInitializingRuntimeConfig(RuntimeConfig config)
           
 void setMessageBundle(java.lang.String messageBundle)
           
 void setNavigationHandler(NavigationHandler navigationHandler)
           
 void setPropertyResolver(PropertyResolver propertyResolver)
          Deprecated.  
 void setResolverBuilderForFaces(ELResolverBuilder factory)
           
 void setStateManager(StateManager stateManager)
           
 void setSupportedLocales(java.util.Collection<java.util.Locale> locales)
           
 void setVariableResolver(VariableResolver variableResolver)
          Deprecated.  
 void setViewHandler(ViewHandler viewHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationImpl

public ApplicationImpl()
Method Detail

setInitializingRuntimeConfig

public static void setInitializingRuntimeConfig(RuntimeConfig config)

addELResolver

public void addELResolver(javax.el.ELResolver resolver)
Overrides:
addELResolver in class Application

getELResolver

public javax.el.ELResolver getELResolver()
Overrides:
getELResolver in class Application

getResolverBuilderForFaces

protected ELResolverBuilder getResolverBuilderForFaces()

setResolverBuilderForFaces

public void setResolverBuilderForFaces(ELResolverBuilder factory)

getResourceBundle

public java.util.ResourceBundle getResourceBundle(FacesContext facesContext,
                                                  java.lang.String name)
                                           throws FacesException,
                                                  java.lang.NullPointerException
Overrides:
getResourceBundle in class Application
Throws:
FacesException
java.lang.NullPointerException

createComponent

public UIComponent createComponent(javax.el.ValueExpression componentExpression,
                                   FacesContext facesContext,
                                   java.lang.String componentType)
                            throws FacesException,
                                   java.lang.NullPointerException
Overrides:
createComponent in class Application
Throws:
FacesException
java.lang.NullPointerException

getExpressionFactory

public javax.el.ExpressionFactory getExpressionFactory()
Overrides:
getExpressionFactory in class Application

evaluateExpressionGet

public java.lang.Object evaluateExpressionGet(FacesContext context,
                                              java.lang.String expression,
                                              java.lang.Class expectedType)
                                       throws javax.el.ELException
Overrides:
evaluateExpressionGet in class Application
Throws:
javax.el.ELException

addELContextListener

public void addELContextListener(javax.el.ELContextListener listener)
Overrides:
addELContextListener in class Application

removeELContextListener

public void removeELContextListener(javax.el.ELContextListener listener)
Overrides:
removeELContextListener in class Application

getELContextListeners

public javax.el.ELContextListener[] getELContextListeners()
Overrides:
getELContextListeners in class Application

setActionListener

public void setActionListener(ActionListener actionListener)
Specified by:
setActionListener in class Application

getActionListener

public ActionListener getActionListener()
Specified by:
getActionListener in class Application

getComponentTypes

public java.util.Iterator<java.lang.String> getComponentTypes()
Specified by:
getComponentTypes in class Application

getConverterIds

public java.util.Iterator<java.lang.String> getConverterIds()
Specified by:
getConverterIds in class Application

getConverterTypes

public java.util.Iterator<java.lang.Class> getConverterTypes()
Specified by:
getConverterTypes in class Application

setDefaultLocale

public void setDefaultLocale(java.util.Locale locale)
Specified by:
setDefaultLocale in class Application

getDefaultLocale

public java.util.Locale getDefaultLocale()
Specified by:
getDefaultLocale in class Application

setMessageBundle

public void setMessageBundle(java.lang.String messageBundle)
Specified by:
setMessageBundle in class Application

getMessageBundle

public java.lang.String getMessageBundle()
Specified by:
getMessageBundle in class Application

setNavigationHandler

public void setNavigationHandler(NavigationHandler navigationHandler)
Specified by:
setNavigationHandler in class Application

getNavigationHandler

public NavigationHandler getNavigationHandler()
Specified by:
getNavigationHandler in class Application

setPropertyResolver

@Deprecated
public void setPropertyResolver(PropertyResolver propertyResolver)
Deprecated. 

Specified by:
setPropertyResolver in class Application

getPropertyResolver

@Deprecated
public PropertyResolver getPropertyResolver()
Deprecated. 

Specified by:
getPropertyResolver in class Application

setSupportedLocales

public void setSupportedLocales(java.util.Collection<java.util.Locale> locales)
Specified by:
setSupportedLocales in class Application

getSupportedLocales

public java.util.Iterator<java.util.Locale> getSupportedLocales()
Specified by:
getSupportedLocales in class Application

getValidatorIds

public java.util.Iterator<java.lang.String> getValidatorIds()
Specified by:
getValidatorIds in class Application

setVariableResolver

@Deprecated
public void setVariableResolver(VariableResolver variableResolver)
Deprecated. 

Specified by:
setVariableResolver in class Application

getVariableResolver

@Deprecated
public VariableResolver getVariableResolver()
Deprecated. 

Specified by:
getVariableResolver in class Application

setViewHandler

public void setViewHandler(ViewHandler viewHandler)
Specified by:
setViewHandler in class Application

getViewHandler

public ViewHandler getViewHandler()
Specified by:
getViewHandler in class Application

addComponent

public void addComponent(java.lang.String componentType,
                         java.lang.String componentClassName)
Specified by:
addComponent in class Application

addConverter

public void addConverter(java.lang.String converterId,
                         java.lang.String converterClass)
Specified by:
addConverter in class Application

addConverter

public void addConverter(java.lang.Class targetClass,
                         java.lang.String converterClass)
Specified by:
addConverter in class Application

addConverterConfiguration

public void addConverterConfiguration(java.lang.String converterClassName,
                                      Converter configuration)

addValidator

public void addValidator(java.lang.String validatorId,
                         java.lang.String validatorClass)
Specified by:
addValidator in class Application

createComponent

public UIComponent createComponent(java.lang.String componentType)
                            throws FacesException
Specified by:
createComponent in class Application
Throws:
FacesException

createComponent

@Deprecated
public UIComponent createComponent(ValueBinding valueBinding,
                                              FacesContext facesContext,
                                              java.lang.String componentType)
                            throws FacesException
Deprecated. Use createComponent(ValueExpression, FacesContext, String) instead.

Specified by:
createComponent in class Application
Throws:
FacesException

createConverter

public Converter createConverter(java.lang.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:

  1. the Sun Mojarra JSF implemenation ignores nested property tags completely, so this behaviour cannot be relied on across implementations.
  2. 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 class Application

createConverter

public Converter createConverter(java.lang.Class targetClass)
Specified by:
createConverter in class Application

createMethodBinding

@Deprecated
public MethodBinding createMethodBinding(java.lang.String reference,
                                                    java.lang.Class[] params)
                                  throws ReferenceSyntaxException
Deprecated. 

Specified by:
createMethodBinding in class Application
Throws:
ReferenceSyntaxException

createValidator

public Validator createValidator(java.lang.String validatorId)
                          throws FacesException
Specified by:
createValidator in class Application
Throws:
FacesException

createValueBinding

public ValueBinding createValueBinding(java.lang.String reference)
                                throws ReferenceSyntaxException
Deprecated. 

Specified by:
createValueBinding in class Application
Throws:
ReferenceSyntaxException

getDefaultRenderKitId

public java.lang.String getDefaultRenderKitId()
Specified by:
getDefaultRenderKitId in class Application

setDefaultRenderKitId

public void setDefaultRenderKitId(java.lang.String defaultRenderKitId)
Specified by:
setDefaultRenderKitId in class Application

getStateManager

public StateManager getStateManager()
Specified by:
getStateManager in class Application

setStateManager

public void setStateManager(StateManager stateManager)
Specified by:
setStateManager in class Application


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.