com.sun.faces.application
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.
Modifier and Type | Field and Description |
---|---|
private AnnotationManager |
annotationManager |
private ApplicationImpl |
app |
private ApplicationStateInfo |
applicationStateInfo |
private static java.lang.String |
ASSOCIATE_KEY |
private BeanManager |
beanManager |
private Compiler |
compiler |
private java.lang.String |
contextName |
private boolean |
devModeEnabled |
private java.util.List<javax.el.ELResolver> |
elResolversFromFacesConfig |
private boolean |
errorPagePresent |
private javax.el.ExpressionFactory |
expressionFactory |
private FaceletFactory |
faceletFactory |
private FacesCompositeELResolver |
facesELResolverForJsp |
private GroovyHelper |
groovyHelper |
private InjectionProvider |
injectionProvider |
private static java.lang.ThreadLocal<ApplicationAssociate> |
instance |
private javax.faces.el.PropertyResolver |
legacyPRChainHead |
private javax.faces.el.PropertyResolver |
legacyPropertyResolver |
private javax.faces.el.VariableResolver |
legacyVariableResolver |
private javax.faces.el.VariableResolver |
legacyVRChainHead |
private VariableResolverChainWrapper |
legacyVRChainHeadWrapperForFaces |
private VariableResolverChainWrapper |
legacyVRChainHeadWrapperForJsp |
private static java.util.logging.Logger |
LOGGER |
private NamedEventManager |
namedEventManager |
private java.util.Map<java.lang.String,java.util.Set<javax.faces.application.NavigationCase>> |
navigationMap
Overall Map containing
from-view-id key and
Set of NavigationCase
objects for that key; The from-view-id strings in
this map will be stored as specified in the configuration file -
some of them will have a trailing asterisk "*" signifying wild
card, and some may be specified as an asterisk "*". |
private PropertyEditorHelper |
propertyEditorHelper |
private boolean |
requestServiced |
(package private) java.util.Map<java.lang.String,ApplicationResourceBundle> |
resourceBundles
keys: element from faces-config
|
private ResourceCache |
resourceCache |
private ResourceManager |
resourceManager |
private boolean |
responseRendered |
private long |
timeOfInstantiation |
Constructor and Description |
---|
ApplicationAssociate(ApplicationImpl appImpl) |
Modifier and Type | Method and Description |
---|---|
void |
addNavigationCase(javax.faces.application.NavigationCase navigationCase)
Add a navigation case to the internal case set.
|
void |
addResourceBundle(java.lang.String var,
ApplicationResourceBundle bundle) |
static void |
clearInstance(javax.faces.context.ExternalContext externalContext) |
static void |
clearInstance(javax.servlet.ServletContext sc) |
protected Compiler |
createCompiler(java.util.Map<java.lang.String,java.lang.Object> appMap,
WebConfiguration webConfig) |
protected FaceletFactory |
createFaceletFactory(Compiler c,
WebConfiguration webConfig) |
AnnotationManager |
getAnnotationManager() |
javax.el.CompositeELResolver |
getApplicationELResolvers() |
ApplicationStateInfo |
getApplicationStateInfo() |
BeanManager |
getBeanManager() |
Compiler |
getCompiler() |
java.lang.String |
getContextName() |
static ApplicationAssociate |
getCurrentInstance() |
java.util.List<javax.el.ELResolver> |
getELResolversFromFacesConfig() |
javax.el.ExpressionFactory |
getExpressionFactory() |
FaceletFactory |
getFaceletFactory() |
FacesCompositeELResolver |
getFacesELResolverForJsp() |
GroovyHelper |
getGroovyHelper() |
InjectionProvider |
getInjectionProvider() |
static ApplicationAssociate |
getInstance(javax.faces.context.ExternalContext externalContext) |
static ApplicationAssociate |
getInstance(javax.servlet.ServletContext context) |
javax.faces.el.PropertyResolver |
getLegacyPRChainHead() |
javax.faces.el.PropertyResolver |
getLegacyPropertyResolver() |
javax.faces.el.VariableResolver |
getLegacyVariableResolver() |
javax.faces.el.VariableResolver |
getLegacyVRChainHead() |
VariableResolverChainWrapper |
getLegacyVRChainHeadWrapperForFaces() |
VariableResolverChainWrapper |
getLegacyVRChainHeadWrapperForJsp() |
NamedEventManager |
getNamedEventManager() |
java.util.Map<java.lang.String,java.util.Set<javax.faces.application.NavigationCase>> |
getNavigationCaseListMappings()
Return a
Map of navigation mappings loaded from
the configuration system. |
PropertyEditorHelper |
getPropertyEditorHelper()
Obtain the PropertyEditorHelper instance for this app.
|
java.util.ResourceBundle |
getResourceBundle(javax.faces.context.FacesContext context,
java.lang.String var) |
java.util.Map<java.lang.String,ApplicationResourceBundle> |
getResourceBundles() |
ResourceCache |
getResourceCache() |
ResourceManager |
getResourceManager() |
long |
getTimeOfInstantiation() |
boolean |
hasRequestBeenServiced() |
void |
initializeELResolverChains() |
void |
installProgrammaticallyAddedResolvers() |
boolean |
isDevModeEnabled() |
boolean |
isErrorPagePresent() |
boolean |
isResponseRendered() |
void |
responseRendered() |
void |
setContextName(java.lang.String contextName) |
static void |
setCurrentInstance(ApplicationAssociate associate) |
void |
setELResolversFromFacesConfig(java.util.List<javax.el.ELResolver> resolvers) |
void |
setErrorPagePresent(boolean errorPagePresent) |
void |
setExpressionFactory(javax.el.ExpressionFactory expressionFactory) |
void |
setFacesELResolverForJsp(FacesCompositeELResolver celr) |
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 |
setLegacyVRChainHeadWrapperForFaces(VariableResolverChainWrapper legacyVRChainHeadWrapperForFaces) |
void |
setLegacyVRChainHeadWrapperForJsp(VariableResolverChainWrapper legacyVRChainHeadWrapper) |
void |
setRequestServiced()
Called by application code to indicate we've processed the
first request to the application.
|
void |
setResourceManager(ResourceManager resourceManager) |
private static final java.util.logging.Logger LOGGER
private ApplicationImpl app
private java.util.Map<java.lang.String,java.util.Set<javax.faces.application.NavigationCase>> navigationMap
from-view-id
key and
Set
of NavigationCase
objects for that key; The from-view-id
strings in
this map will be stored as specified in the configuration file -
some of them will have a trailing asterisk "*" signifying wild
card, and some may be specified as an asterisk "*".private boolean responseRendered
private static final java.lang.String ASSOCIATE_KEY
private static java.lang.ThreadLocal<ApplicationAssociate> instance
private java.util.List<javax.el.ELResolver> elResolversFromFacesConfig
private javax.faces.el.VariableResolver legacyVRChainHead
private VariableResolverChainWrapper legacyVRChainHeadWrapperForJsp
private VariableResolverChainWrapper legacyVRChainHeadWrapperForFaces
private javax.faces.el.PropertyResolver legacyPRChainHead
private javax.el.ExpressionFactory expressionFactory
private javax.faces.el.PropertyResolver legacyPropertyResolver
private javax.faces.el.VariableResolver legacyVariableResolver
private FacesCompositeELResolver facesELResolverForJsp
private InjectionProvider injectionProvider
private ResourceCache resourceCache
private java.lang.String contextName
private boolean requestServiced
private boolean errorPagePresent
private BeanManager beanManager
private GroovyHelper groovyHelper
private AnnotationManager annotationManager
private boolean devModeEnabled
private Compiler compiler
private FaceletFactory faceletFactory
private ResourceManager resourceManager
private ApplicationStateInfo applicationStateInfo
private PropertyEditorHelper propertyEditorHelper
private NamedEventManager namedEventManager
private long timeOfInstantiation
java.util.Map<java.lang.String,ApplicationResourceBundle> resourceBundles
values: ResourceBundleBean instances.
public ApplicationAssociate(ApplicationImpl appImpl)
public static ApplicationAssociate getInstance(javax.faces.context.ExternalContext externalContext)
public long getTimeOfInstantiation()
public static ApplicationAssociate getInstance(javax.servlet.ServletContext context)
public static void setCurrentInstance(ApplicationAssociate associate)
public static ApplicationAssociate getCurrentInstance()
public ApplicationStateInfo getApplicationStateInfo()
public ResourceManager getResourceManager()
public void setResourceManager(ResourceManager resourceManager)
public ResourceCache getResourceCache()
public AnnotationManager getAnnotationManager()
public Compiler getCompiler()
public boolean isErrorPagePresent()
public void setErrorPagePresent(boolean errorPagePresent)
public FaceletFactory getFaceletFactory()
public static void clearInstance(javax.faces.context.ExternalContext externalContext)
public static void clearInstance(javax.servlet.ServletContext sc)
public BeanManager getBeanManager()
public GroovyHelper getGroovyHelper()
public void initializeELResolverChains()
public void installProgrammaticallyAddedResolvers()
public boolean isDevModeEnabled()
public PropertyEditorHelper getPropertyEditorHelper()
public void setLegacyVRChainHead(javax.faces.el.VariableResolver resolver)
ConfigureListener
and will
contain any VariableResolvers
defined within
faces-config configuration files.resolver
- VariableResolverpublic javax.faces.el.VariableResolver getLegacyVRChainHead()
public VariableResolverChainWrapper getLegacyVRChainHeadWrapperForJsp()
public void setLegacyVRChainHeadWrapperForJsp(VariableResolverChainWrapper legacyVRChainHeadWrapper)
public VariableResolverChainWrapper getLegacyVRChainHeadWrapperForFaces()
public void setLegacyVRChainHeadWrapperForFaces(VariableResolverChainWrapper legacyVRChainHeadWrapperForFaces)
public void setLegacyPRChainHead(javax.faces.el.PropertyResolver resolver)
ConfigureListener
and will
contain any PropertyResolvers
defined within
faces-config configuration files.resolver
- PropertyResolverpublic javax.faces.el.PropertyResolver getLegacyPRChainHead()
public FacesCompositeELResolver getFacesELResolverForJsp()
public void setFacesELResolverForJsp(FacesCompositeELResolver 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 javax.el.CompositeELResolver getApplicationELResolvers()
public InjectionProvider getInjectionProvider()
public void setContextName(java.lang.String contextName)
public java.lang.String getContextName()
public void setLegacyPropertyResolver(javax.faces.el.PropertyResolver resolver)
resolver
- PropertyResolverpublic javax.faces.el.PropertyResolver getLegacyPropertyResolver()
public void setLegacyVariableResolver(javax.faces.el.VariableResolver resolver)
resolver
- VariableResolverpublic javax.faces.el.VariableResolver getLegacyVariableResolver()
public void setRequestServiced()
public boolean hasRequestBeenServiced()
true
if we've processed a request, otherwise
false
public void addNavigationCase(javax.faces.application.NavigationCase navigationCase)
from-view-id
), start a new list,
add the case to it, and store the set in the case set map.
If a case set already exists, overwrite the previous case.navigationCase
- the navigation case containing navigation
mapping information from the configuration file.public NamedEventManager getNamedEventManager()
public java.util.Map<java.lang.String,java.util.Set<javax.faces.application.NavigationCase>> 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.ResourceBundle getResourceBundle(javax.faces.context.FacesContext context, java.lang.String var)
public void addResourceBundle(java.lang.String var, ApplicationResourceBundle bundle)
public java.util.Map<java.lang.String,ApplicationResourceBundle> getResourceBundles()
public void responseRendered()
public boolean isResponseRendered()
protected FaceletFactory createFaceletFactory(Compiler c, WebConfiguration webConfig)
protected Compiler createCompiler(java.util.Map<java.lang.String,java.lang.Object> appMap, WebConfiguration webConfig)
Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.