Top Description Inners Fields Constructors Methods
com.sun.faces.application

public Class ApplicationAssociate

extends Object
Class Inheritance
Static Imports
com.sun.faces.RIConstants.FACES_CONFIG_VERSION, .RIConstants.FACES_PREFIX, com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.AutomaticExtensionlessMapping, .WebConfiguration.BooleanWebContextInitParameter.FaceletsSkipComments, .WebConfiguration.WebContextInitParameter.FaceletsDecorators, .WebConfiguration.WebContextInitParameter.FaceletsDefaultRefreshPeriod, com.sun.faces.el.ELUtils.buildFacesResolver, .FacesCompositeELResolver.ELResolverChainType.Faces, com.sun.faces.facelets.util.ReflectionUtil.forName, com.sun.faces.util.MessageUtils.APPLICATION_ASSOCIATE_EXISTS_ID, .MessageUtils.getExceptionMessageString, .Util.getFacesConfigXmlVersion, .Util.getFacesServletRegistration, .Util.split, jakarta.faces.FactoryFinder.FACELET_CACHE_FACTORY, .FactoryFinder.FLOW_HANDLER_FACTORY, jakarta.faces.application.ProjectStage.Development, .ProjectStage.Production, .ViewVisitOption.RETURN_AS_MINIMAL_IMPLICIT_OUTCOME, java.lang.Long.parseLong, java.util.Collections.emptyList, .Collections.emptyMap, java.util.logging.Level.FINE, .Level.SEVERE

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final AnnotationManager
private final ApplicationImpl
private final ApplicationStateInfo
private static final String
private Compiler
private String
private final Map<String, String>
private final boolean
private List<ELResolver>
private boolean
private ExpressionFactory
private DefaultFaceletFactory
private static final String
private Map<String, List<FacesComponentUsage>>
private FlowHandler
private final InjectionProvider
private static final ThreadLocal<ApplicationAssociate>
private static final Logger
private final NamedEventManager
private final PropertyEditorHelper
private boolean
pack-priv Map<String, ApplicationResourceBundle>
private ResourceCache
private Map<String, List<String>>
private ResourceManager
private boolean
private SearchExpressionHandler
private final long
private final WebConfiguration

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
addNavigationCase(NavigationCase
the navigation case containing navigation mapping information from the configuration file.
navigationCase
)

Add a navigation case to the internal case set.

public void
addResourceBundle(String
the variable name
var
,
ApplicationResourceBundle
the application resource bundle
bundle
)

keys: element from faces-config

values: ResourceBundleBean instances.

protected void
public static void
clearInstance(ExternalContext externalContext)

public static void
clearInstance(ServletContext servletContext)

protected Compiler
protected DefaultFaceletFactory
public AnnotationManager
public Application
public CompositeELResolver
public ResolversRegistry

Returns:

global EL resolvers for the current application
getApplicationResolvers
()

Returns a container with EL resolvers global to this application associate

public ApplicationStateInfo
public Compiler
public List<FacesComponentUsage>
public String
public static ApplicationAssociate
public List<ELResolver>
public ExpressionFactory
public DefaultFaceletFactory
public FlowHandler
public ResolversRegistry
public InjectionProvider
public static ApplicationAssociate
public static ApplicationAssociate
getInstance(FacesContext facesContext)

public static ApplicationAssociate
getInstance(ExternalContext externalContext)

public static ApplicationAssociate
public NamedEventManager
public Map<String, Set<NavigationCase>>

Returns:

Map the map of navigation mappings.
getNavigationCaseListMappings
()

Return a Map of navigation mappings loaded from the configuration system.

public PropertyEditorHelper

Returns:

The PropertyEditorHeler instance for this app.
getPropertyEditorHelper
()

Obtain the PropertyEditorHelper instance for this app.

public ResourceBundle
public Map<String, ApplicationResourceBundle>
public ResourceCache
public Map<String, List<String>>
public ResourceManager
public SearchExpressionHandler
public long
public boolean

Returns:

true if we've processed a request, otherwise false
hasRequestBeenServiced
()

public void
public void
public boolean
public boolean
public boolean
protected void
loadDecorators(Map<String, Object> appMap, Compiler newCompiler)

public void
relateUrlToDefiningDocumentInJar(URL url, String definingDocumentId)

public void
public void
setContextName(String contextName)

public static void
public void
public void
setErrorPagePresent(boolean errorPagePresent)

public void
public void
public void
setRequestServiced()

Called by application code to indicate we've processed the first request to the application.

public void
public void
public void
public boolean
urlIsRelatedToDefiningDocumentInJar(URL candidateUrl, String definingDocumentId)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

annotationManagerback to summary
private final AnnotationManager annotationManager
applicationImplback to summary
private final ApplicationImpl applicationImpl
applicationStateInfoback to summary
private final ApplicationStateInfo applicationStateInfo
ASSOCIATE_KEYback to summary
private static final String ASSOCIATE_KEY
compilerback to summary
private Compiler compiler
contextNameback to summary
private String contextName
definingDocumentIdsToTruncatedJarUrlsback to summary
private final Map<String, String> definingDocumentIdsToTruncatedJarUrls
devModeEnabledback to summary
private final boolean devModeEnabled
elResolversFromFacesConfigback to summary
private List<ELResolver> elResolversFromFacesConfig
errorPagePresentback to summary
private boolean errorPagePresent
expressionFactoryback to summary
private ExpressionFactory expressionFactory
faceletFactoryback to summary
private DefaultFaceletFactory faceletFactory
FacesComponentJcpNamespaceback to summary
private static final String FacesComponentJcpNamespace
facesComponentsByNamespaceback to summary
private Map<String, List<FacesComponentUsage>> facesComponentsByNamespace
flowHandlerback to summary
private FlowHandler flowHandler
injectionProviderback to summary
private final InjectionProvider injectionProvider
instanceback to summary
private static final ThreadLocal<ApplicationAssociate> instance
LOGGERback to summary
private static final Logger LOGGER
namedEventManagerback to summary
private final NamedEventManager namedEventManager
propertyEditorHelperback to summary
private final PropertyEditorHelper propertyEditorHelper
requestServicedback to summary
private boolean requestServiced
resourceBundlesback to summary
pack-priv Map<String, ApplicationResourceBundle> resourceBundles
resourceCacheback to summary
private ResourceCache resourceCache
resourceLibraryContractsback to summary
private Map<String, List<String>> resourceLibraryContracts
resourceManagerback to summary
private ResourceManager resourceManager
responseRenderedback to summary
private boolean responseRendered
searchExpressionHandlerback to summary
private SearchExpressionHandler searchExpressionHandler
timeOfInstantiationback to summary
private final long timeOfInstantiation
webConfigback to summary
private final WebConfiguration webConfig

Constructor Detail

ApplicationAssociateback to summary
public ApplicationAssociate(ApplicationImpl appImpl)

Method Detail

addFacesComponentback to summary
public void addFacesComponent(FacesComponentUsage facesComponentUsage)
addNavigationCaseback to summary
public void addNavigationCase(NavigationCase navigationCase)

Add a navigation case to the internal case set. If a case set does not already exist in the case list map containing this case (identified by 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.

Parameters
navigationCase:NavigationCase

the navigation case containing navigation mapping information from the configuration file.

addResourceBundleback to summary
public void addResourceBundle(String var, ApplicationResourceBundle bundle)

keys: element from faces-config

values: ResourceBundleBean instances.

Parameters
var:String

the variable name

bundle:ApplicationResourceBundle

the application resource bundle

addTagLibrariesback to summary
protected void addTagLibraries(Compiler newCompiler)
clearInstanceback to summary
public static void clearInstance(ExternalContext externalContext)
clearInstanceback to summary
public static void clearInstance(ServletContext servletContext)
createCompilerback to summary
protected Compiler createCompiler(Map<String, Object> appMap, WebConfiguration webConfig)
createFaceletFactoryback to summary
protected DefaultFaceletFactory createFaceletFactory(FacesContext context, Compiler compiler, WebConfiguration webConfig)
getAnnotationManagerback to summary
public AnnotationManager getAnnotationManager()
getApplicationback to summary
public Application getApplication()
getApplicationELResolversback to summary
public CompositeELResolver getApplicationELResolvers()
getApplicationResolversback to summary
public ResolversRegistry getApplicationResolvers()

Returns a container with EL resolvers global to this application associate

Returns:ResolversRegistry

global EL resolvers for the current application

getApplicationStateInfoback to summary
public ApplicationStateInfo getApplicationStateInfo()
getCompilerback to summary
public Compiler getCompiler()
getComponentsForNamespaceback to summary
public List<FacesComponentUsage> getComponentsForNamespace(String namespace)
getContextNameback to summary
public String getContextName()
getCurrentInstanceback to summary
public static ApplicationAssociate getCurrentInstance()
getELResolversFromFacesConfigback to summary
public List<ELResolver> getELResolversFromFacesConfig()
getExpressionFactoryback to summary
public ExpressionFactory getExpressionFactory()
getFaceletFactoryback to summary
public DefaultFaceletFactory getFaceletFactory()
getFlowHandlerback to summary
public FlowHandler getFlowHandler()
getGlobalResolversRegistryback to summary
public ResolversRegistry getGlobalResolversRegistry()
getInjectionProviderback to summary
public InjectionProvider getInjectionProvider()
getInstanceback to summary
public static ApplicationAssociate getInstance()
getInstanceback to summary
public static ApplicationAssociate getInstance(FacesContext facesContext)
getInstanceback to summary
public static ApplicationAssociate getInstance(ExternalContext externalContext)
getInstanceback to summary
public static ApplicationAssociate getInstance(ServletContext context)
getNamedEventManagerback to summary
public NamedEventManager getNamedEventManager()
getNavigationCaseListMappingsback to summary
public Map<String, Set<NavigationCase>> getNavigationCaseListMappings()

Return a 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.

Returns:Map<String, Set<NavigationCase>>

Map the map of navigation mappings.

getPropertyEditorHelperback to summary
public PropertyEditorHelper getPropertyEditorHelper()

Obtain the PropertyEditorHelper instance for this app.

Returns:PropertyEditorHelper

The PropertyEditorHeler instance for this app.

getResourceBundleback to summary
public ResourceBundle getResourceBundle(FacesContext context, String var)
getResourceBundlesback to summary
public Map<String, ApplicationResourceBundle> getResourceBundles()
getResourceCacheback to summary
public ResourceCache getResourceCache()
getResourceLibraryContractsback to summary
public Map<String, List<String>> getResourceLibraryContracts()
getResourceManagerback to summary
public ResourceManager getResourceManager()
getSearchExpressionHandlerback to summary
public SearchExpressionHandler getSearchExpressionHandler()
getTimeOfInstantiationback to summary
public long getTimeOfInstantiation()
hasRequestBeenServicedback to summary
public boolean hasRequestBeenServiced()
Returns:boolean

true if we've processed a request, otherwise false

initializeELResolverChainsback to summary
public void initializeELResolverChains()
initializeFaceletsback to summary
public void initializeFacelets()
isDevModeEnabledback to summary
public boolean isDevModeEnabled()
isErrorPagePresentback to summary
public boolean isErrorPagePresent()
isResponseRenderedback to summary
public boolean isResponseRendered()
loadDecoratorsback to summary
protected void loadDecorators(Map<String, Object> appMap, Compiler newCompiler)
relateUrlToDefiningDocumentInJarback to summary
public void relateUrlToDefiningDocumentInJar(URL url, String definingDocumentId)
responseRenderedback to summary
public void responseRendered()
setContextNameback to summary
public void setContextName(String contextName)
setCurrentInstanceback to summary
public static void setCurrentInstance(ApplicationAssociate associate)
setELResolversFromFacesConfigback to summary
public void setELResolversFromFacesConfig(List<ELResolver> resolvers)
setErrorPagePresentback to summary
public void setErrorPagePresent(boolean errorPagePresent)
setExpressionFactoryback to summary
public void setExpressionFactory(ExpressionFactory expressionFactory)
setFlowHandlerback to summary
public void setFlowHandler(FlowHandler flowHandler)
setRequestServicedback to summary
public void setRequestServiced()

Called by application code to indicate we've processed the first request to the application.

setResourceLibraryContractsback to summary
public void setResourceLibraryContracts(Map<String, List<String>> map)
setResourceManagerback to summary
public void setResourceManager(ResourceManager resourceManager)
setSearchExpressionHandlerback to summary
public void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)
urlIsRelatedToDefiningDocumentInJarback to summary
public boolean urlIsRelatedToDefiningDocumentInJar(URL candidateUrl, String definingDocumentId)
com.sun.faces.application back to summary

private Class ApplicationAssociate.PostConstructApplicationListener

extends Object
implements SystemEventListener
Class Inheritance
  • java.lang.Object
  • com.sun.faces.application.ApplicationAssociate.PostConstructApplicationListener
All Implemented Interfaces
jakarta.faces.event.SystemEventListener, jakarta.faces.event.FacesListener, java.util.EventListener

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
isListenerForSource(Object
the source that is inquiring about the appropriateness of sending an event to this listener instance.
source
)

Implements jakarta.faces.event.SystemEventListener.isListenerForSource.

This method must return true if and only if this listener instance is interested in receiving events from the instance referenced by the source parameter.

public void
processEvent(SystemEvent
the SystemEvent instance that is being processed.
event
)

Implements jakarta.faces.event.SystemEventListener.processEvent.

When called, the listener can assume that any guarantees given in the javadoc for the specific SystemEvent subclass are true.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PostConstructApplicationListenerback to summary
private PostConstructApplicationListener()

Method Detail

isListenerForSourceback to summary
public boolean isListenerForSource(Object source)

Implements jakarta.faces.event.SystemEventListener.isListenerForSource.

Doc from jakarta.faces.event.SystemEventListener.isListenerForSource.

This method must return true if and only if this listener instance is interested in receiving events from the instance referenced by the source parameter.

Parameters
source:Object

the source that is inquiring about the appropriateness of sending an event to this listener instance.

Returns:boolean

the value as specified above

Annotations
@Override
processEventback to summary
public void processEvent(SystemEvent event)

Implements jakarta.faces.event.SystemEventListener.processEvent.

Doc from jakarta.faces.event.SystemEventListener.processEvent.

When called, the listener can assume that any guarantees given in the javadoc for the specific SystemEvent subclass are true.

Parameters
event:SystemEvent

the SystemEvent instance that is being processed.

Annotations
@Override