com.sun.faces.application
Class ApplicationImpl

java.lang.Object
  extended by javax.faces.application.Application
      extended by com.sun.faces.application.ApplicationImpl

public class ApplicationImpl
extends javax.faces.application.Application

Application represents a per-web-application singleton object where applications based on JavaServer Faces (or implementations wishing to provide extended functionality) can register application-wide singletons that provide functionality required by JavaServer Faces.


Field Summary
protected  java.lang.String defaultRenderKitId
           
 
Constructor Summary
ApplicationImpl()
          Constructor
 
Method Summary
 void addComponent(java.lang.String componentType, java.lang.String componentClass)
           
 void addConverter(java.lang.Class targetClass, java.lang.String converterClass)
           
 void addConverter(java.lang.String converterId, java.lang.String converterClass)
           
 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.UIComponent createComponent(java.lang.String componentType)
           
 javax.faces.component.UIComponent createComponent(javax.faces.el.ValueBinding componentBinding, javax.faces.context.FacesContext context, java.lang.String componentType)
           
 javax.faces.component.UIComponent createComponent(javax.el.ValueExpression componentExpression, javax.faces.context.FacesContext context, java.lang.String componentType)
           
 javax.faces.convert.Converter createConverter(java.lang.Class targetClass)
           
 javax.faces.convert.Converter createConverter(java.lang.String converterId)
           
protected  javax.faces.convert.Converter createConverterBasedOnClass(java.lang.Class targetClass, java.lang.Class baseClass)
           
 javax.faces.el.MethodBinding createMethodBinding(java.lang.String ref, java.lang.Class[] params)
           
 javax.faces.validator.Validator createValidator(java.lang.String validatorId)
           
 javax.faces.el.ValueBinding createValueBinding(java.lang.String ref)
           
 java.lang.Object evaluateExpressionGet(javax.faces.context.FacesContext context, java.lang.String expression, java.lang.Class expectedType)
           
 javax.faces.event.ActionListener getActionListener()
           
 java.util.List<javax.el.ELResolver> getApplicationELResolvers()
           
 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()
           
 javax.faces.application.NavigationHandler getNavigationHandler()
          Return the NavigationHandler instance installed present in this application instance.
 javax.faces.el.PropertyResolver getPropertyResolver()
           
 java.util.ResourceBundle getResourceBundle(javax.faces.context.FacesContext context, java.lang.String var)
           
 javax.faces.application.StateManager getStateManager()
           
 java.util.Iterator<java.util.Locale> getSupportedLocales()
           
 java.util.Iterator<java.lang.String> getValidatorIds()
           
 javax.faces.el.VariableResolver getVariableResolver()
           
 javax.faces.application.ViewHandler getViewHandler()
           
protected  java.lang.Object newConverter(java.lang.Class key, java.util.Map<java.lang.Class,java.lang.Object> map, java.lang.Class targetClass)
          The same as newThing except that a single argument constructor that accepts a Class is looked for before calling the no-arg version.
protected  java.lang.Object newThing(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> map)
          PRECONDITIONS: the values in the Map are either Strings representing fully qualified java class names, or java.lang.Class instances.
 void removeELContextListener(javax.el.ELContextListener listener)
           
 void setActionListener(javax.faces.event.ActionListener listener)
           
 void setDefaultLocale(java.util.Locale locale)
           
 void setDefaultRenderKitId(java.lang.String renderKitId)
           
 void setMessageBundle(java.lang.String messageBundle)
           
 void setNavigationHandler(javax.faces.application.NavigationHandler handler)
          Set a NavigationHandler instance for this application instance.
 void setPropertyResolver(javax.faces.el.PropertyResolver resolver)
           
 void setStateManager(javax.faces.application.StateManager manager)
           
 void setSupportedLocales(java.util.Collection<java.util.Locale> newLocales)
           
 void setVariableResolver(javax.faces.el.VariableResolver resolver)
           
 void setViewHandler(javax.faces.application.ViewHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultRenderKitId

protected java.lang.String defaultRenderKitId
Constructor Detail

ApplicationImpl

public ApplicationImpl()
Constructor

Method Detail

addELContextListener

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

removeELContextListener

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

getELContextListeners

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

getExpressionFactory

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

evaluateExpressionGet

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

createComponent

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

getELResolver

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

addELResolver

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

getApplicationELResolvers

public java.util.List<javax.el.ELResolver> getApplicationELResolvers()

getActionListener

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

getViewHandler

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

setViewHandler

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

getStateManager

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

setStateManager

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

setActionListener

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

getNavigationHandler

public javax.faces.application.NavigationHandler getNavigationHandler()
Return the NavigationHandler instance installed present in this application instance. If an instance does not exist, it will be created.

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

setNavigationHandler

public void setNavigationHandler(javax.faces.application.NavigationHandler handler)
Set a NavigationHandler instance for this application instance.

Specified by:
setNavigationHandler in class javax.faces.application.Application
Parameters:
handler - The NavigationHandler instance.

getPropertyResolver

public javax.faces.el.PropertyResolver getPropertyResolver()
Specified by:
getPropertyResolver in class javax.faces.application.Application

getResourceBundle

public java.util.ResourceBundle getResourceBundle(javax.faces.context.FacesContext context,
                                                  java.lang.String var)
Overrides:
getResourceBundle in class javax.faces.application.Application

setPropertyResolver

public void setPropertyResolver(javax.faces.el.PropertyResolver resolver)
Specified by:
setPropertyResolver in class javax.faces.application.Application

createMethodBinding

public javax.faces.el.MethodBinding createMethodBinding(java.lang.String ref,
                                                        java.lang.Class[] params)
Specified by:
createMethodBinding in class javax.faces.application.Application

createValueBinding

public javax.faces.el.ValueBinding createValueBinding(java.lang.String ref)
                                               throws javax.faces.el.ReferenceSyntaxException
Specified by:
createValueBinding in class javax.faces.application.Application
Throws:
javax.faces.el.ReferenceSyntaxException

getVariableResolver

public javax.faces.el.VariableResolver getVariableResolver()
Specified by:
getVariableResolver in class javax.faces.application.Application

setVariableResolver

public void setVariableResolver(javax.faces.el.VariableResolver resolver)
Specified by:
setVariableResolver in class javax.faces.application.Application

addComponent

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

createComponent

public 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

public javax.faces.component.UIComponent createComponent(javax.faces.el.ValueBinding componentBinding,
                                                         javax.faces.context.FacesContext context,
                                                         java.lang.String componentType)
                                                  throws javax.faces.FacesException
Specified by:
createComponent in class javax.faces.application.Application
Throws:
javax.faces.FacesException

getComponentTypes

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

addConverter

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

addConverter

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

createConverter

public javax.faces.convert.Converter createConverter(java.lang.String converterId)
Specified by:
createConverter in class javax.faces.application.Application

createConverter

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

createConverterBasedOnClass

protected javax.faces.convert.Converter createConverterBasedOnClass(java.lang.Class targetClass,
                                                                    java.lang.Class baseClass)

getConverterIds

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

getConverterTypes

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

getSupportedLocales

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

setSupportedLocales

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

getDefaultLocale

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

setDefaultLocale

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

getDefaultRenderKitId

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

setDefaultRenderKitId

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

addValidator

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

createValidator

public 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

getValidatorIds

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

setMessageBundle

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

getMessageBundle

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

newThing

protected java.lang.Object newThing(java.lang.String key,
                                    java.util.Map<java.lang.String,java.lang.Object> map)

PRECONDITIONS: the values in the Map are either Strings representing fully qualified java class names, or java.lang.Class instances.

ALGORITHM: Look in the argument map for a value for the argument key. If found, if the value is instanceof String, assume the String specifies a fully qualified java class name and obtain the java.lang.Class instance for that String using Util.loadClass(). Replace the String instance in the argument map with the Class instance. If the value is instanceof Class, proceed. Assert that the value is either instanceof java.lang.Class or java.lang.String.

Now that you have a java.lang.class, call its newInstance and return it as the result of this method.

Parameters:
key - Used to look up the value in the Map.
map - The Map that will be searched.
Returns:
The new object instance.

newConverter

protected java.lang.Object newConverter(java.lang.Class key,
                                        java.util.Map<java.lang.Class,java.lang.Object> map,
                                        java.lang.Class targetClass)

The same as newThing except that a single argument constructor that accepts a Class is looked for before calling the no-arg version.

PRECONDITIONS: the values in the Map are either Strings representing fully qualified java class names, or java.lang.Class instances.

ALGORITHM: Look in the argument map for a value for the argument key. If found, if the value is instanceof String, assume the String specifies a fully qualified java class name and obtain the java.lang.Class instance for that String using Util.loadClass(). Replace the String instance in the argument map with the Class instance. If the value is instanceof Class, proceed. Assert that the value is either instanceof java.lang.Class or java.lang.String.

Now that you have a java.lang.class, call its newInstance and return it as the result of this method.

Parameters:
key - Used to look up the value in the Map.
map - The Map that will be searched.
Returns:
The new object instance.


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.