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 javax.faces.application.Application

DOCUMENT ME!

Version:
$Revision: 1080051 $ $Date: 2011-03-09 18:03:46 -0500 (Wed, 09 Mar 2011) $
Author:
Manfred Geiler (latest modification by $Author: struberg $), Anton Koinov, Thomas Spiegl, Stan Silvert

Field Summary
static java.lang.String DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
           
static java.lang.String MYFACES_PROJECT_STAGE_SYSTEM_PROPERTY_NAME
          Deprecated. 
static java.lang.String PROJECT_STAGE_SYSTEM_PROPERTY_NAME
           
 
Constructor Summary
ApplicationImpl()
           
 
Method Summary
 void addBehavior(java.lang.String behaviorId, java.lang.String behaviorClass)
           
 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 addDefaultValidatorId(java.lang.String validatorId)
           
 void addELContextListener(javax.el.ELContextListener listener)
           
 void addELResolver(javax.el.ELResolver resolver)
           
 void addValidator(java.lang.String validatorId, java.lang.String validatorClass)
           
 javax.faces.component.behavior.Behavior createBehavior(java.lang.String behaviorId)
           
 javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context, javax.faces.application.Resource componentResource)
           
 javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context, java.lang.String componentType, java.lang.String rendererType)
           
 javax.faces.component.UIComponent createComponent(java.lang.String componentType)
           
 javax.faces.component.UIComponent createComponent(javax.faces.el.ValueBinding valueBinding, javax.faces.context.FacesContext facesContext, java.lang.String componentType)
          Deprecated. Use createComponent(ValueExpression, FacesContext, String) instead.
 javax.faces.component.UIComponent createComponent(javax.el.ValueExpression componentExpression, javax.faces.context.FacesContext facesContext, java.lang.String componentType)
           
 javax.faces.component.UIComponent createComponent(javax.el.ValueExpression componentExpression, javax.faces.context.FacesContext context, java.lang.String componentType, java.lang.String rendererType)
           
 javax.faces.convert.Converter createConverter(java.lang.Class<?> targetClass)
           
 javax.faces.convert.Converter createConverter(java.lang.String converterId)
          Return an instance of the converter class that has been registered under the specified id.
 javax.faces.el.MethodBinding createMethodBinding(java.lang.String reference, java.lang.Class<?>[] params)
          Deprecated.  
 javax.faces.validator.Validator createValidator(java.lang.String validatorId)
           
 javax.faces.el.ValueBinding createValueBinding(java.lang.String reference)
          Deprecated.  
<T> T
evaluateExpressionGet(javax.faces.context.FacesContext context, java.lang.String expression, java.lang.Class<? extends T> expectedType)
           
 javax.faces.event.ActionListener getActionListener()
           
 java.util.Iterator<java.lang.String> getBehaviorIds()
           
 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()
           
 java.util.Map<java.lang.String,java.lang.String> getDefaultValidatorInfo()
           
 javax.el.ELContextListener[] getELContextListeners()
           
 javax.el.ELResolver getELResolver()
           
 javax.el.ExpressionFactory getExpressionFactory()
           
 java.lang.String getMessageBundle()
           
 javax.faces.application.NavigationHandler getNavigationHandler()
           
 javax.faces.application.ProjectStage getProjectStage()
           
 javax.faces.el.PropertyResolver getPropertyResolver()
          Deprecated.  
protected  ELResolverBuilder getResolverBuilderForFaces()
           
 java.util.ResourceBundle getResourceBundle(javax.faces.context.FacesContext facesContext, java.lang.String name)
           
 javax.faces.application.ResourceHandler getResourceHandler()
           
 javax.faces.application.StateManager getStateManager()
           
 java.util.Iterator<java.util.Locale> getSupportedLocales()
           
 java.util.Iterator<java.lang.String> getValidatorIds()
           
 javax.faces.el.VariableResolver getVariableResolver()
          Deprecated.  
 javax.faces.application.ViewHandler getViewHandler()
           
 void publishEvent(javax.faces.context.FacesContext facesContext, java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass, java.lang.Class<?> sourceBaseType, java.lang.Object source)
           
 void publishEvent(javax.faces.context.FacesContext facesContext, java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass, java.lang.Object source)
           
 void removeELContextListener(javax.el.ELContextListener listener)
           
 void setActionListener(javax.faces.event.ActionListener actionListener)
           
 void setDefaultLocale(java.util.Locale locale)
           
 void setDefaultRenderKitId(java.lang.String defaultRenderKitId)
           
 void setMessageBundle(java.lang.String messageBundle)
           
 void setNavigationHandler(javax.faces.application.NavigationHandler navigationHandler)
           
 void setPropertyResolver(javax.faces.el.PropertyResolver propertyResolver)
          Deprecated.  
 void setResolverBuilderForFaces(ELResolverBuilder factory)
           
 void setResourceHandler(javax.faces.application.ResourceHandler resourceHandler)
           
 void setStateManager(javax.faces.application.StateManager stateManager)
           
 void setSupportedLocales(java.util.Collection<java.util.Locale> locales)
           
 void setVariableResolver(javax.faces.el.VariableResolver variableResolver)
          Deprecated.  
 void setViewHandler(javax.faces.application.ViewHandler viewHandler)
           
 void subscribeToEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass, java.lang.Class<?> sourceClass, javax.faces.event.SystemEventListener listener)
           
 void subscribeToEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass, javax.faces.event.SystemEventListener listener)
           
 void unsubscribeFromEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass, java.lang.Class<?> sourceClass, javax.faces.event.SystemEventListener listener)
           
 void unsubscribeFromEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass, javax.faces.event.SystemEventListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECT_STAGE_SYSTEM_PROPERTY_NAME

public static final java.lang.String PROJECT_STAGE_SYSTEM_PROPERTY_NAME
See Also:
Constant Field Values

MYFACES_PROJECT_STAGE_SYSTEM_PROPERTY_NAME

@Deprecated
public static final java.lang.String MYFACES_PROJECT_STAGE_SYSTEM_PROPERTY_NAME
Deprecated. 
See Also:
Constant Field Values

DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME

@JSFWebConfigParam(defaultValue="false",
                   expectedValues="true, false",
                   since="2.0")
public static final java.lang.String DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
See Also:
Constant Field Values
Constructor Detail

ApplicationImpl

public ApplicationImpl()
Method Detail

addELResolver

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

addDefaultValidatorId

public void addDefaultValidatorId(java.lang.String validatorId)
Overrides:
addDefaultValidatorId in class javax.faces.application.Application

getDefaultValidatorInfo

public java.util.Map<java.lang.String,java.lang.String> getDefaultValidatorInfo()
Overrides:
getDefaultValidatorInfo in class javax.faces.application.Application

getELResolver

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

getResolverBuilderForFaces

protected final ELResolverBuilder getResolverBuilderForFaces()

setResolverBuilderForFaces

public final void setResolverBuilderForFaces(ELResolverBuilder factory)

getResourceBundle

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

createComponent

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

createComponent

public javax.faces.component.UIComponent createComponent(javax.el.ValueExpression componentExpression,
                                                         javax.faces.context.FacesContext context,
                                                         java.lang.String componentType,
                                                         java.lang.String rendererType)
Overrides:
createComponent in class javax.faces.application.Application

getExpressionFactory

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

evaluateExpressionGet

public final <T> T evaluateExpressionGet(javax.faces.context.FacesContext context,
                                         java.lang.String expression,
                                         java.lang.Class<? extends T> expectedType)
                              throws javax.el.ELException
Overrides:
evaluateExpressionGet in class javax.faces.application.Application
Throws:
javax.el.ELException

addELContextListener

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

publishEvent

public void publishEvent(javax.faces.context.FacesContext facesContext,
                         java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass,
                         java.lang.Class<?> sourceBaseType,
                         java.lang.Object source)
Overrides:
publishEvent in class javax.faces.application.Application

publishEvent

public void publishEvent(javax.faces.context.FacesContext facesContext,
                         java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass,
                         java.lang.Object source)
Overrides:
publishEvent in class javax.faces.application.Application

removeELContextListener

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

getELContextListeners

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

setActionListener

public final void setActionListener(javax.faces.event.ActionListener actionListener)
Specified by:
setActionListener in class javax.faces.application.Application

getActionListener

public final javax.faces.event.ActionListener getActionListener()
Specified by:
getActionListener in class javax.faces.application.Application

getBehaviorIds

public java.util.Iterator<java.lang.String> getBehaviorIds()
Overrides:
getBehaviorIds in class javax.faces.application.Application

getComponentTypes

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

getConverterIds

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

getConverterTypes

public final java.util.Iterator<java.lang.Class<?>> getConverterTypes()
Specified by:
getConverterTypes in class javax.faces.application.Application

setDefaultLocale

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

getDefaultLocale

public final java.util.Locale getDefaultLocale()
Specified by:
getDefaultLocale in class javax.faces.application.Application

setMessageBundle

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

getMessageBundle

public final java.lang.String getMessageBundle()
Specified by:
getMessageBundle in class javax.faces.application.Application

setNavigationHandler

public final void setNavigationHandler(javax.faces.application.NavigationHandler navigationHandler)
Specified by:
setNavigationHandler in class javax.faces.application.Application

getNavigationHandler

public final javax.faces.application.NavigationHandler getNavigationHandler()
Specified by:
getNavigationHandler in class javax.faces.application.Application

setPropertyResolver

@Deprecated
public final void setPropertyResolver(javax.faces.el.PropertyResolver propertyResolver)
Deprecated. 

Specified by:
setPropertyResolver in class javax.faces.application.Application

getProjectStage

public javax.faces.application.ProjectStage getProjectStage()
Overrides:
getProjectStage in class javax.faces.application.Application

getPropertyResolver

@Deprecated
public final javax.faces.el.PropertyResolver getPropertyResolver()
Deprecated. 

Specified by:
getPropertyResolver in class javax.faces.application.Application

setResourceHandler

public final void setResourceHandler(javax.faces.application.ResourceHandler resourceHandler)
Overrides:
setResourceHandler in class javax.faces.application.Application

getResourceHandler

public final javax.faces.application.ResourceHandler getResourceHandler()
Overrides:
getResourceHandler in class javax.faces.application.Application

setSupportedLocales

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

getSupportedLocales

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

getValidatorIds

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

setVariableResolver

@Deprecated
public final void setVariableResolver(javax.faces.el.VariableResolver variableResolver)
Deprecated. 

Specified by:
setVariableResolver in class javax.faces.application.Application

getVariableResolver

@Deprecated
public final javax.faces.el.VariableResolver getVariableResolver()
Deprecated. 

Specified by:
getVariableResolver in class javax.faces.application.Application

setViewHandler

public final void setViewHandler(javax.faces.application.ViewHandler viewHandler)
Specified by:
setViewHandler in class javax.faces.application.Application

subscribeToEvent

public void subscribeToEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass,
                             javax.faces.event.SystemEventListener listener)
Overrides:
subscribeToEvent in class javax.faces.application.Application

subscribeToEvent

public void subscribeToEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass,
                             java.lang.Class<?> sourceClass,
                             javax.faces.event.SystemEventListener listener)
Overrides:
subscribeToEvent in class javax.faces.application.Application

unsubscribeFromEvent

public void unsubscribeFromEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass,
                                 javax.faces.event.SystemEventListener listener)
Overrides:
unsubscribeFromEvent in class javax.faces.application.Application

unsubscribeFromEvent

public void unsubscribeFromEvent(java.lang.Class<? extends javax.faces.event.SystemEvent> systemEventClass,
                                 java.lang.Class<?> sourceClass,
                                 javax.faces.event.SystemEventListener listener)
Overrides:
unsubscribeFromEvent in class javax.faces.application.Application

getViewHandler

public final javax.faces.application.ViewHandler getViewHandler()
Specified by:
getViewHandler in class javax.faces.application.Application

addBehavior

public void addBehavior(java.lang.String behaviorId,
                        java.lang.String behaviorClass)
Overrides:
addBehavior in class javax.faces.application.Application

addComponent

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

addConverter

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

addConverter

public final void addConverter(java.lang.Class<?> targetClass,
                               java.lang.String converterClass)
Specified by:
addConverter in class javax.faces.application.Application

addValidator

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

createBehavior

public javax.faces.component.behavior.Behavior createBehavior(java.lang.String behaviorId)
                                                       throws javax.faces.FacesException
Overrides:
createBehavior in class javax.faces.application.Application
Throws:
javax.faces.FacesException

createComponent

public javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context,
                                                         javax.faces.application.Resource componentResource)
Overrides:
createComponent in class javax.faces.application.Application

createComponent

public javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context,
                                                         java.lang.String componentType,
                                                         java.lang.String rendererType)
Overrides:
createComponent in class javax.faces.application.Application

createComponent

public final javax.faces.component.UIComponent createComponent(java.lang.String componentType)
                                                        throws javax.faces.FacesException
Specified by:
createComponent in class javax.faces.application.Application
Throws:
javax.faces.FacesException

createComponent

@Deprecated
public final javax.faces.component.UIComponent createComponent(javax.faces.el.ValueBinding valueBinding,
                                                                          javax.faces.context.FacesContext facesContext,
                                                                          java.lang.String componentType)
                                                        throws javax.faces.FacesException
Deprecated. Use createComponent(ValueExpression, FacesContext, String) instead.

Specified by:
createComponent in class javax.faces.application.Application
Throws:
javax.faces.FacesException

createConverter

public final javax.faces.convert.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 javax.faces.application.Application

createConverter

public final javax.faces.convert.Converter createConverter(java.lang.Class<?> targetClass)
Specified by:
createConverter in class javax.faces.application.Application

createMethodBinding

@Deprecated
public final javax.faces.el.MethodBinding createMethodBinding(java.lang.String reference,
                                                                         java.lang.Class<?>[] params)
                                                       throws javax.faces.el.ReferenceSyntaxException
Deprecated. 

Specified by:
createMethodBinding in class javax.faces.application.Application
Throws:
javax.faces.el.ReferenceSyntaxException

createValidator

public final javax.faces.validator.Validator createValidator(java.lang.String validatorId)
                                                      throws javax.faces.FacesException
Specified by:
createValidator in class javax.faces.application.Application
Throws:
javax.faces.FacesException

createValueBinding

public final javax.faces.el.ValueBinding createValueBinding(java.lang.String reference)
                                                     throws javax.faces.el.ReferenceSyntaxException
Deprecated. 

Specified by:
createValueBinding in class javax.faces.application.Application
Throws:
javax.faces.el.ReferenceSyntaxException

getDefaultRenderKitId

public final java.lang.String getDefaultRenderKitId()
Specified by:
getDefaultRenderKitId in class javax.faces.application.Application

setDefaultRenderKitId

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

getStateManager

public final javax.faces.application.StateManager getStateManager()
Specified by:
getStateManager in class javax.faces.application.Application

setStateManager

public final void setStateManager(javax.faces.application.StateManager stateManager)
Specified by:
setStateManager in class javax.faces.application.Application


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