| Method from com.sun.faces.application.ApplicationAssociate Detail: |
public void addNavigationCase(ConfigNavigationCase navigationCase) {
String fromViewId = navigationCase.getFromViewId();
List< ConfigNavigationCase > caseList = caseListMap.get(fromViewId);
if (caseList == null) {
//noinspection CollectionWithoutInitialCapacity
caseList = new ArrayList< ConfigNavigationCase >();
caseList.add(navigationCase);
caseListMap.put(fromViewId, caseList);
} else {
String key = navigationCase.getKey();
boolean foundIt = false;
for (int i = 0; i < caseList.size(); i++) {
ConfigNavigationCase navCase = caseList.get(i);
// if there already is a case existing for the
// fromviewid/fromaction.fromoutcome combination,
// replace it ... (last one wins).
//
if (key.equals(navCase.getKey())) {
caseList.set(i, navigationCase);
foundIt = true;
break;
}
}
if (!foundIt) {
caseList.add(navigationCase);
}
}
if (fromViewId.endsWith("*")) {
fromViewId =
fromViewId.substring(0, fromViewId.lastIndexOf('*"));
wildcardMatchList.add(fromViewId);
}
}
Add a navigation case to the internal case list. If a case list
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 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-idfrom-action
from-outcome combination. If there is suach an entry,
overwrite it with this new case. Otherwise, add the case to the list. |
public void addResourceBundle(String var,
ApplicationResourceBundle bundle) {
resourceBundles.put(var, bundle);
}
|
public static void clearInstance(ExternalContext externalContext) {
Map applicationMap = externalContext.getApplicationMap();
ApplicationAssociate me = (ApplicationAssociate) applicationMap.get(ASSOCIATE_KEY);
if (null != me) {
if (null != me.resourceBundles) {
me.resourceBundles.clear();
}
}
applicationMap.remove(ASSOCIATE_KEY);
}
|
public List getApplicationELResolvers() {
return app.getApplicationELResolvers();
}
|
public BeanManager getBeanManager() {
return beanManager;
}
|
public String getContextName() {
return contextName;
}
|
public static ApplicationAssociate getCurrentInstance() {
ApplicationAssociate associate = instance.get();
if (associate == null) {
// Fallback to ExternalContext lookup
FacesContext fc = FacesContext.getCurrentInstance();
if (fc != null) {
ExternalContext extContext = fc.getExternalContext();
if (extContext != null) {
return ApplicationAssociate.getInstance(extContext);
}
}
}
return associate;
}
|
public List getELResolversFromFacesConfig() {
return elResolversFromFacesConfig;
}
|
public ExpressionFactory getExpressionFactory() {
return this.expressionFactory;
}
|
public CompositeELResolver getFacesELResolverForJsp() {
return facesELResolverForJsp;
}
|
public GroovyHelper getGroovyHelper() {
return groovyHelper;
}
|
public InjectionProvider getInjectionProvider() {
return injectionProvider;
}
|
public static ApplicationAssociate getInstance(ExternalContext externalContext) {
if (externalContext == null) {
return null;
}
Map applicationMap = externalContext.getApplicationMap();
return ((ApplicationAssociate)
applicationMap.get(ASSOCIATE_KEY));
}
|
public static ApplicationAssociate getInstance(ServletContext context) {
if (context == null) {
return null;
}
return (ApplicationAssociate) context.getAttribute(ASSOCIATE_KEY);
}
|
public PropertyResolver getLegacyPRChainHead() {
return legacyPRChainHead;
}
|
public PropertyResolver getLegacyPropertyResolver() {
return legacyPropertyResolver;
}
|
public VariableResolver getLegacyVRChainHead() {
return legacyVRChainHead;
}
|
public VariableResolver getLegacyVariableResolver() {
return legacyVariableResolver;
}
|
public Map getNavigationCaseListMappings() {
if (caseListMap == null) {
return Collections.emptyMap();
}
return caseListMap;
}
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. |
public TreeSet getNavigationWildCardList() {
return wildcardMatchList;
}
Return all navigation mappings whose from-view-id
contained a trailing "*". |
public PropertyEditorHelper getPropertyEditorHelper() {
return propertyEditorHelper;
}
Obtain the PropertyEditorHelper instance for this app. |
public ResourceBundle getResourceBundle(FacesContext context,
String var) {
ApplicationResourceBundle bundle = resourceBundles.get(var);
if (bundle == null) {
return null;
}
UIViewRoot root;
// Start out with the default locale
Locale locale;
Locale defaultLocale = Locale.getDefault();
locale = defaultLocale;
// See if this FacesContext has a ViewRoot
if (null != (root = context.getViewRoot())) {
// If so, ask it for its Locale
if (null == (locale = root.getLocale())) {
// If the ViewRoot has no Locale, fall back to the default.
locale = defaultLocale;
}
}
assert (null != locale);
//ResourceBundleBean bean = resourceBundles.get(var);
return bundle.getResourceBundle(locale);
}
|
public Map getResourceBundles() {
return resourceBundles;
}
|
public boolean hasRequestBeenServiced() {
return requestServiced;
}
|
public boolean isDevModeEnabled() {
return devModeEnabled;
}
|
boolean isResponseRendered() {
return responseRendered;
}
|
void responseRendered() {
responseRendered = true;
}
|
public void setContextName(String contextName) {
this.contextName = contextName;
}
|
public static void setCurrentInstance(ApplicationAssociate associate) {
if (associate == null) {
instance.remove();
} else {
instance.set(associate);
}
}
|
public void setELResolversFromFacesConfig(List resolvers) {
this.elResolversFromFacesConfig = resolvers;
}
|
public void setExpressionFactory(ExpressionFactory expressionFactory) {
this.expressionFactory = expressionFactory;
}
|
public void setFacesELResolverForJsp(CompositeELResolver celr) {
facesELResolverForJsp = celr;
}
|
public void setLegacyPRChainHead(PropertyResolver resolver) {
this.legacyPRChainHead = resolver;
}
This method is called by ConfigureListener and will
contain any PropertyResolvers defined within
faces-config configuration files. |
public void setLegacyPropertyResolver(PropertyResolver resolver) {
this.legacyPropertyResolver = resolver;
}
Maintains the PropertyResolver called through
Application.setPropertyResolver() |
public void setLegacyVRChainHead(VariableResolver resolver) {
this.legacyVRChainHead = resolver;
}
This method is called by ConfigureListener and will
contain any VariableResolvers defined within
faces-config configuration files. |
public void setLegacyVariableResolver(VariableResolver resolver) {
this.legacyVariableResolver = resolver;
}
Maintains the PropertyResolver called through
Application.setVariableResolver() |
public void setRequestServiced() {
this.requestServiced = true;
}
Called by application code to indicate we've processed the
first request to the application. |