public class ApplicationAssociate
extends java.lang.Object
Break out the things that are associated with the Application, but need to be present even when the user has replaced the Application instance.
For example: the user replaces ApplicationFactory, and wants to intercept calls to createValueExpression() and createMethodExpression() for certain kinds of expressions, but allow the existing application to handle the rest.
Constructor and Description |
---|
ApplicationAssociate(ApplicationImpl appImpl) |
Modifier and Type | Method and Description |
---|---|
void |
addManagedBeanFactory(java.lang.String managedBeanName,
ManagedBeanFactory factory)
Adds a new mapping of managed bean name to a managed bean
factory instance.
|
void |
addNavigationCase(ConfigNavigationCase navigationCase)
Add a navigation case to the internal case list.
|
void |
addResourceBundleBean(java.lang.String var,
ResourceBundleBean bean) |
static void |
clearInstance(javax.faces.context.ExternalContext externalContext) |
java.lang.Object |
createAndMaybeStoreManagedBeans(javax.faces.context.FacesContext context,
java.lang.String managedBeanName)
The managedBeanFactories HashMap has been populated
with ManagedBeanFactoryImpl object keyed by the bean name.
|
java.util.List<javax.el.ELResolver> |
getApplicationELResolvers() |
java.lang.String |
getContextName() |
java.util.List<javax.el.ELResolver> |
getELResolversFromFacesConfig() |
javax.el.ExpressionFactory |
getExpressionFactory() |
javax.el.CompositeELResolver |
getFacesELResolverForJsp() |
InjectionProvider |
getInjectionProvider() |
static ApplicationAssociate |
getInstance(javax.faces.context.ExternalContext externalContext) |
static ApplicationAssociate |
getInstance(javax.servlet.ServletContext context) |
JSFVersionTracker |
getJSFVersionTracker()
Getter for property JSFVersionTracker.
|
javax.faces.el.PropertyResolver |
getLegacyPRChainHead() |
javax.faces.el.PropertyResolver |
getLegacyPropertyResolver()
Returns the PropertyResolver called through
Application.getPropertyResolver()
|
javax.faces.el.VariableResolver |
getLegacyVariableResolver()
Returns the VariableResolver called through
Application.getVariableResolver()
|
javax.faces.el.VariableResolver |
getLegacyVRChainHead() |
java.util.Map<java.lang.String,ManagedBeanFactory> |
getManagedBeanFactoryMap() |
java.util.Map<java.lang.String,java.util.List<ConfigNavigationCase>> |
getNavigationCaseListMappings()
Return a
Map of navigation mappings loaded from
the configuration system. |
java.util.TreeSet<java.lang.String> |
getNavigationWildCardList()
Return all navigation mappings whose
from-view-id
contained a trailing "*". |
java.util.ResourceBundle |
getResourceBundle(javax.faces.context.FacesContext context,
java.lang.String var) |
java.util.Map<java.lang.String,ResourceBundleBean> |
getResourceBundleBeanMap() |
void |
handlePreDestroy(java.lang.String beanName,
java.lang.Object bean,
ManagedBeanFactory.Scope scope)
Attempts to look up a ManagedBeanFactory from the
managedBeanFactoriesMap.
|
boolean |
hasRequestBeenServiced() |
void |
setContextName(java.lang.String contextName) |
void |
setELResolversFromFacesConfig(java.util.List<javax.el.ELResolver> resolvers) |
void |
setExpressionFactory(javax.el.ExpressionFactory expressionFactory) |
void |
setFacesELResolverForJsp(javax.el.CompositeELResolver celr) |
void |
setJSFVersionTracker(JSFVersionTracker JSFVersionTracker)
Setter for property JSFVersionTracker.
|
void |
setLegacyPRChainHead(javax.faces.el.PropertyResolver resolver)
This method is called by
ConfigureListener and will
contain any PropertyResolvers defined within
faces-config configuration files. |
void |
setLegacyPropertyResolver(javax.faces.el.PropertyResolver resolver)
Maintains the PropertyResolver called through
Application.setPropertyResolver()
|
void |
setLegacyVariableResolver(javax.faces.el.VariableResolver resolver)
Maintains the PropertyResolver called through
Application.setVariableResolver()
|
void |
setLegacyVRChainHead(javax.faces.el.VariableResolver resolver)
This method is called by
ConfigureListener and will
contain any VariableResolvers defined within
faces-config configuration files. |
void |
setRequestServiced()
Called by application code to indicate we've processed the
first request to the application.
|
public ApplicationAssociate(ApplicationImpl appImpl)
public static ApplicationAssociate getInstance(javax.faces.context.ExternalContext externalContext)
public static ApplicationAssociate getInstance(javax.servlet.ServletContext context)
public static void clearInstance(javax.faces.context.ExternalContext externalContext)
public void setLegacyVRChainHead(javax.faces.el.VariableResolver resolver)
ConfigureListener
and will
contain any VariableResolvers
defined within
faces-config configuration files.resolver
- public javax.faces.el.VariableResolver getLegacyVRChainHead()
public void setLegacyPRChainHead(javax.faces.el.PropertyResolver resolver)
ConfigureListener
and will
contain any PropertyResolvers
defined within
faces-config configuration files.resolver
- public javax.faces.el.PropertyResolver getLegacyPRChainHead()
public javax.el.CompositeELResolver getFacesELResolverForJsp()
public void setFacesELResolverForJsp(javax.el.CompositeELResolver celr)
public void setELResolversFromFacesConfig(java.util.List<javax.el.ELResolver> resolvers)
public java.util.List<javax.el.ELResolver> getELResolversFromFacesConfig()
public void setExpressionFactory(javax.el.ExpressionFactory expressionFactory)
public javax.el.ExpressionFactory getExpressionFactory()
public java.util.List<javax.el.ELResolver> getApplicationELResolvers()
public InjectionProvider getInjectionProvider()
public void setContextName(java.lang.String contextName)
public java.lang.String getContextName()
public void setLegacyPropertyResolver(javax.faces.el.PropertyResolver resolver)
public javax.faces.el.PropertyResolver getLegacyPropertyResolver()
public void setLegacyVariableResolver(javax.faces.el.VariableResolver resolver)
public javax.faces.el.VariableResolver getLegacyVariableResolver()
public void setRequestServiced()
public boolean hasRequestBeenServiced()
true
if we've processed a request, otherwise
false
public void addNavigationCase(ConfigNavigationCase navigationCase)
from-view-id
), start a new list,
add the case to it, and store the list in the case list map.
If a case list already exists, see if a case entry exists in the list
with a matching from-view-id
from-action
from-outcome
combination. If there is suach an entry,
overwrite it with this new case. Otherwise, add the case to the list.navigationCase
- the navigation case containing navigation
mapping information from the configuration file.public java.util.Map<java.lang.String,java.util.List<ConfigNavigationCase>> getNavigationCaseListMappings()
Map
of navigation mappings loaded from
the configuration system. The key for the returned Map
is from-view-id
, and the value is a List
of navigation cases.public java.util.TreeSet<java.lang.String> getNavigationWildCardList()
from-view-id
contained a trailing "*".TreeSet
The navigation mappings sorted in
descending order.public java.util.ResourceBundle getResourceBundle(javax.faces.context.FacesContext context, java.lang.String var)
public void addResourceBundleBean(java.lang.String var, ResourceBundleBean bean)
public java.util.Map<java.lang.String,ResourceBundleBean> getResourceBundleBeanMap()
public void addManagedBeanFactory(java.lang.String managedBeanName, ManagedBeanFactory factory)
Adds a new mapping of managed bean name to a managed bean factory instance.
managedBeanName
- the name of the managed bean that will
be created by the managed bean factory instance.factory
- the managed bean factory instance.public java.util.Map<java.lang.String,ManagedBeanFactory> getManagedBeanFactoryMap()
public java.lang.Object createAndMaybeStoreManagedBeans(javax.faces.context.FacesContext context, java.lang.String managedBeanName) throws javax.faces.FacesException
The managedBeanFactories HashMap has been populated with ManagedBeanFactoryImpl object keyed by the bean name. Find the ManagedBeanFactoryImpl object and if it exists instantiate the bean and store it in the appropriate scope, if any.
context
- The Faces context.managedBeanName
- The name identifying the managed bean.javax.faces.FacesException
- if the managed bean
could not be created.public void handlePreDestroy(java.lang.String beanName, java.lang.Object bean, ManagedBeanFactory.Scope scope)
Attempts to look up a ManagedBeanFactory from the
managedBeanFactoriesMap. If not null and
ManagedBeanFactory.isInjectable()
returns true,
pass bean
to InjectionProvider.invokePreDestr
beanName
- the name of the bean for which to call PreDestroy
annotated methods. If null
, all beans in argument
scope
have their PreDestroy annotated methods
called.bean
- the target bean associated with beanName
scope
- the managed bean scope in which to look for the bean
or beans.public JSFVersionTracker getJSFVersionTracker()
public void setJSFVersionTracker(JSFVersionTracker JSFVersionTracker)
JSFVersionTracker
- New value of property JSFVersionTracker.Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.