public FacesConfig parse(InputStream inputStream, FacesConfig facesConfig) throws IOException { List<ConfiguredElement> configuredApplicationExtensions = facesConfig.getConfiguredApplicationExtensions(); this.configuredApplicationExtensions = new ArrayList<ConfiguredElement>(configuredApplicationExtensions); List<ConfiguredElement> configuredFactoryExtensions = facesConfig.getConfiguredFactoryExtensions(); this.configuredFactoryExtensions = new ArrayList<ConfiguredElement>(configuredFactoryExtensions); List<ConfiguredManagedBean> configuredManagedBeans = facesConfig.getConfiguredManagedBeans(); this.configuredManagedBeans = new ArrayList<ConfiguredManagedBean>(configuredManagedBeans); // Note: Assume that the configured FacesServlet mappings have already been discovered. There is no need to // make a copy of the list since this parser does not "discover" new servlet mappings. this.configuredFacesServletMappings = facesConfig.getConfiguredFacesServletMappings(); // Note: Assume that the configured suffixes have already been discovered. There is no need to make a copy of // the list since this parser does not "discover" new suffixes. this.configuredSuffixes = facesConfig.getConfiguredSuffixes(); List<ConfiguredSystemEventListener> configuredSystemEventListeners = facesConfig.getConfiguredSystemEventListeners(); this.configuredSystemEventListeners = new ArrayList<ConfiguredSystemEventListener>( configuredSystemEventListeners); try { saxParser.parse(inputStream, this); facesConfig = new FacesConfigImpl(this.configuredApplicationExtensions, this.configuredFactoryExtensions, this.configuredFacesServletMappings, this.configuredManagedBeans, this.configuredSuffixes, this.configuredSystemEventListeners); saxParser.reset(); return facesConfig; } catch (SAXException e) { logger.error(e); throw new IOException(e.getMessage()); } }
FacesConfig facesConfig = applicationConfig.getFacesConfig(); bridgeConfigAttributeMap.put(BridgeConfigAttributeMap.CONFIGURED_FACES_SERVLET_MAPPINGS, facesConfig.getConfiguredFacesServletMappings()); facesConfig.getConfiguredSystemEventListeners()); bridgeConfigAttributeMap.put(BridgeConfigAttributeMap.CONFIGURED_SUFFIXES, facesConfig.getConfiguredSuffixes()); List<ConfiguredElement> configuredApplicationExtensions = facesConfig.getConfiguredApplicationExtensions();
protected List<ConfiguredServletMapping> getConfiguredFacesServletMappings() { String appConfigAttrName = ApplicationConfig.class.getName(); ExternalContext externalContext = facesContext.getExternalContext(); Map<String, Object> applicationMap = externalContext.getApplicationMap(); ApplicationConfig applicationConfig = (ApplicationConfig) applicationMap.get(appConfigAttrName); FacesConfig facesConfig = applicationConfig.getFacesConfig(); return facesConfig.getConfiguredFacesServletMappings(); }
@Override public BeanManager getBeanManager(FacesConfig facesConfig) { return new BeanManagerImpl(facesConfig.getConfiguredManagedBeans()); }
List<ConfiguredElement> configuredFactoryExtensions = facesConfig.getConfiguredFactoryExtensions();
FacesConfig facesConfig = applicationConfig.getFacesConfig(); bridgeConfigAttributeMap.put(BridgeConfigAttributeMap.CONFIGURED_FACES_SERVLET_MAPPINGS, facesConfig.getConfiguredFacesServletMappings()); facesConfig.getConfiguredSystemEventListeners()); bridgeConfigAttributeMap.put(BridgeConfigAttributeMap.CONFIGURED_SUFFIXES, facesConfig.getConfiguredSuffixes()); List<ConfiguredElement> configuredApplicationExtensions = facesConfig.getConfiguredApplicationExtensions();
protected List<ConfiguredServletMapping> getConfiguredFacesServletMappings() { String appConfigAttrName = ApplicationConfig.class.getName(); ExternalContext externalContext = facesContext.getExternalContext(); Map<String, Object> applicationMap = externalContext.getApplicationMap(); ApplicationConfig applicationConfig = (ApplicationConfig) applicationMap.get(appConfigAttrName); FacesConfig facesConfig = applicationConfig.getFacesConfig(); return facesConfig.getConfiguredFacesServletMappings(); }
@Override public BeanManager getBeanManager(FacesConfig facesConfig) { return new BeanManagerImpl(facesConfig.getConfiguredManagedBeans()); }
List<ConfiguredElement> configuredFactoryExtensions = facesConfig.getConfiguredFactoryExtensions();
public FacesConfig parse(InputStream inputStream, FacesConfig facesConfig) throws IOException { List<ConfiguredElement> configuredApplicationExtensions = facesConfig.getConfiguredApplicationExtensions(); this.configuredApplicationExtensions = new ArrayList<ConfiguredElement>(configuredApplicationExtensions); List<ConfiguredElement> configuredFactoryExtensions = facesConfig.getConfiguredFactoryExtensions(); this.configuredFactoryExtensions = new ArrayList<ConfiguredElement>(configuredFactoryExtensions); List<ConfiguredManagedBean> configuredManagedBeans = facesConfig.getConfiguredManagedBeans(); this.configuredManagedBeans = new ArrayList<ConfiguredManagedBean>(configuredManagedBeans); // Note: Assume that the configured FacesServlet mappings have already been discovered. There is no need to // make a copy of the list since this parser does not "discover" new servlet mappings. this.configuredFacesServletMappings = facesConfig.getConfiguredFacesServletMappings(); // Note: Assume that the configured suffixes have already been discovered. There is no need to make a copy of // the list since this parser does not "discover" new suffixes. this.configuredSuffixes = facesConfig.getConfiguredSuffixes(); List<ConfiguredSystemEventListener> configuredSystemEventListeners = facesConfig.getConfiguredSystemEventListeners(); this.configuredSystemEventListeners = new ArrayList<ConfiguredSystemEventListener>( configuredSystemEventListeners); try { saxParser.parse(inputStream, this); facesConfig = new FacesConfigImpl(this.configuredApplicationExtensions, this.configuredFactoryExtensions, this.configuredFacesServletMappings, this.configuredManagedBeans, this.configuredSuffixes, this.configuredSystemEventListeners); saxParser.reset(); return facesConfig; } catch (SAXException e) { logger.error(e); throw new IOException(e.getMessage()); } }
FacesConfig facesConfig = applicationConfig.getFacesConfig(); List<ConfiguredServletMapping> configuredFacesServletMappings = facesConfig.getConfiguredFacesServletMappings();
List<ConfiguredElement> configuredFactoryExtensions = facesConfig.getConfiguredFactoryExtensions();
public FacesConfig parse(InputStream inputStream, FacesConfig facesConfig) throws IOException { List<ConfiguredElement> configuredApplicationExtensions = facesConfig.getConfiguredApplicationExtensions(); this.configuredApplicationExtensions = new ArrayList<ConfiguredElement>(configuredApplicationExtensions); List<ConfiguredElement> configuredFactoryExtensions = facesConfig.getConfiguredFactoryExtensions(); this.configuredFactoryExtensions = new ArrayList<ConfiguredElement>(configuredFactoryExtensions); List<ConfiguredManagedBean> configuredManagedBeans = facesConfig.getConfiguredManagedBeans(); this.configuredManagedBeans = new ArrayList<ConfiguredManagedBean>(configuredManagedBeans); // Note: Assume that the configured FacesServlet mappings have already been discovered. There is no need to // make a copy of the list since this parser does not "discover" new servlet mappings. this.configuredFacesServletMappings = facesConfig.getConfiguredFacesServletMappings(); // Note: Assume that the configured suffixes have already been discovered. There is no need to make a copy of // the list since this parser does not "discover" new suffixes. this.configuredSuffixes = facesConfig.getConfiguredSuffixes(); List<ConfiguredSystemEventListener> configuredSystemEventListeners = facesConfig.getConfiguredSystemEventListeners(); this.configuredSystemEventListeners = new ArrayList<ConfiguredSystemEventListener>( configuredSystemEventListeners); try { saxParser.parse(inputStream, this); facesConfig = new FacesConfigImpl(this.configuredApplicationExtensions, this.configuredFactoryExtensions, this.configuredFacesServletMappings, this.configuredManagedBeans, this.configuredSuffixes, this.configuredSystemEventListeners); saxParser.reset(); return facesConfig; } catch (SAXException e) { logger.error(e); throw new IOException(e.getMessage()); } }