|
|
Choosing A Webhost: |
svn commit: r511848 - /lenya/branches/trunk-rework-pubconf/src/impl/java/or: msg#00148cms.lenya.cvs
Author: nettings Date: Mon Feb 26 07:19:22 2007 New Revision: 511848 URL: http://svn.apache.org/viewvc?view=rev&rev=511848 Log: fixed handling of proxy configuration (now nested!) Modified: lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java Modified: lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java?view=diff&rev=511848&r1=511847&r2=511848 ============================================================================== --- lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java (original) +++ lenya/branches/trunk-rework-pubconf/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java Mon Feb 26 07:19:22 2007 @@ -176,29 +176,24 @@ this.siteManagerName = siteManagerConfiguration.getAttribute(ATTRIBUTE_NAME); } - Configuration[] proxyConfigs = config.getChild(ELEMENT_PROXIES).getChildren(ELEMENT_PROXY); - // backwards-compatibility. rip out for lenya releases post 1.4.x: - if (proxyConfigs.length == 0) { - proxyConfigs = config.getChildren(ELEMENT_PROXY); - if (proxyConfigs.length > 0) - getLogger().warn("Deprecated configuration: <proxy> elements in " + configFile - + " must be grouped in a <proxies>...</proxies> element." - + " See webapp/lenya/resources/schemas/publication.xconf."); - } - for (int i = 0; i < proxyConfigs.length; i++) { - String url = proxyConfigs[i].getAttribute(ATTRIBUTE_URL); - String ssl = proxyConfigs[i].getAttribute(ATTRIBUTE_SSL); - String area = proxyConfigs[i].getAttribute(ATTRIBUTE_AREA); - - Proxy proxy = new Proxy(); - proxy.setUrl(url); - - Object key = getProxyKey(area, Boolean.valueOf(ssl).booleanValue()); - this.areaSsl2proxy.put(key, proxy); - if (getLogger().isDebugEnabled()) { - getLogger().debug( - "Adding proxy: [" + proxy + "] for area=[" + area + "] SSL=[" + ssl - + "]"); + Configuration proxyConfig = config.getChild(ELEMENT_PROXIES); + if (proxyConfig != null) { + Configuration[] proxyConfigs = proxyConfig.getChildren(ELEMENT_PROXY); + for (int i = 0; i < proxyConfigs.length; i++) { + String url = proxyConfigs[i].getAttribute(ATTRIBUTE_URL); + String ssl = proxyConfigs[i].getAttribute(ATTRIBUTE_SSL); + String area = proxyConfigs[i].getAttribute(ATTRIBUTE_AREA); + + Proxy proxy = new Proxy(); + proxy.setUrl(url); + + Object key = getProxyKey(area, Boolean.valueOf(ssl).booleanValue()); + this.areaSsl2proxy.put(key, proxy); + if (getLogger().isDebugEnabled()) { + getLogger().debug( + "Adding proxy: [" + proxy + "] for area=[" + area + "] SSL=[" + ssl + + "]"); + } } } @@ -228,14 +223,17 @@ getLogger().info("No content directory specified within pub configuration!"); } - Configuration[] resourceTypeConfigs = config.getChildren(ELEMENT_RESOURCE_TYPE); - for (int i = 0; i < resourceTypeConfigs.length; i++) { - String name = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_NAME); - this.resourceTypes.add(name); - - String workflow = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_WORKFLOW, null); - if (workflow != null) { - this.resourceType2workflow.put(name, workflow); + Configuration resourceTypeConfig = config.getChild(ELEMENT_RESOURCE_TYPES); + if (resourceTypeConfig != null) { + Configuration[] resourceTypeConfigs = resourceTypeConfig.getChildren(ELEMENT_RESOURCE_TYPE); + for (int i = 0; i < resourceTypeConfigs.length; i++) { + String name = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_NAME); + this.resourceTypes.add(name); + + String workflow = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_WORKFLOW, null); + if (workflow != null) { + this.resourceType2workflow.put(name, workflow); + } } }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r511847 - /lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl, nettings |
|---|---|
| Next by Date: | svn commit: r511857 - /lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl, nettings |
| Previous by Thread: | svn commit: r511847 - /lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl, nettings |
| Next by Thread: | svn commit: r511857 - /lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/modules/modules2xinclude.xsl, nettings |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |