Return-Path: Delivered-To: apmail-forrest-svn-archive@www.apache.org Received: (qmail 95291 invoked from network); 18 Sep 2006 07:44:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 07:44:51 -0000 Received: (qmail 99245 invoked by uid 500); 18 Sep 2006 07:44:50 -0000 Delivered-To: apmail-forrest-svn-archive@forrest.apache.org Received: (qmail 99165 invoked by uid 500); 18 Sep 2006 07:44:49 -0000 Mailing-List: contact svn-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Forrest Developers List" List-Id: Delivered-To: mailing list svn@forrest.apache.org Received: (qmail 99144 invoked by uid 99); 18 Sep 2006 07:44:48 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 00:44:48 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C7E5E1A981A; Mon, 18 Sep 2006 00:43:57 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r447308 - /forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Date: Mon, 18 Sep 2006 07:43:57 -0000 To: svn@forrest.apache.org From: thorsten@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060918074357.C7E5E1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: thorsten Date: Mon Sep 18 00:43:57 2006 New Revision: 447308 URL: http://svn.apache.org/viewvc?view=rev&rev=447308 Log: white noise - formating changes Modified: forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Modified: forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java URL: http://svn.apache.org/viewvc/forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java?view=diff&rev=447308&r1=447307&r2=447308 ============================================================================== --- forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java (original) +++ forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Mon Sep 18 00:43:57 2006 @@ -62,16 +62,16 @@ private SourceResolver m_resolver; - public Object getAttribute(String name, Configuration modeConf, Map objectModel) - throws ConfigurationException { + public Object getAttribute(String name, Configuration modeConf, + Map objectModel) throws ConfigurationException { String original; String attributeValue; try { original = super.getAttributeValues(name, modeConf, objectModel)[0] .toString(); - attributeValue = this.getAttributeValues(name, modeConf, objectModel)[0] - .toString(); + attributeValue = this.getAttributeValues(name, modeConf, + objectModel)[0].toString(); } catch (NullPointerException npe) { original = "(not defined in forrest.xconf)"; attributeValue = filteringProperties.getProperty(name); @@ -105,11 +105,12 @@ Object[] attributeValues = super.getAttributeValues(name, modeConf, objectModel); for (int i = 0; i < attributeValues.length; i++) { - if (null!=attributeValues[i]) - attributeValues[i] = filteringProperties.filter(attributeValues[i] - .toString()); + if (null != attributeValues[i]) + attributeValues[i] = filteringProperties + .filter(attributeValues[i].toString()); else - attributeValues[i] = filteringProperties.filter(filteringProperties.getProperty(name)); + attributeValues[i] = filteringProperties + .filter(filteringProperties.getProperty(name)); } return attributeValues; @@ -143,24 +144,25 @@ try { // get the values from local.forrest.properties.xml - forrestPropertiesStringURI = projectHome + SystemUtils.FILE_SEPARATOR + forrestPropertiesStringURI = projectHome + + SystemUtils.FILE_SEPARATOR + "local.forrest.properties.xml"; filteringProperties = loadXMLPropertiesFromURI(filteringProperties, forrestPropertiesStringURI); // get the values from project forrest.properties.xml - forrestPropertiesStringURI = projectHome + SystemUtils.FILE_SEPARATOR - + "forrest.properties.xml"; + forrestPropertiesStringURI = projectHome + + SystemUtils.FILE_SEPARATOR + "forrest.properties.xml"; filteringProperties = loadXMLPropertiesFromURI(filteringProperties, forrestPropertiesStringURI); // get the values from user forrest.properties.xml String userHome = filteringProperties.getProperty("user.home"); if (userHome != null) { - forrestPropertiesStringURI = userHome + SystemUtils.FILE_SEPARATOR - + "forrest.properties.xml"; - filteringProperties = loadXMLPropertiesFromURI(filteringProperties, - forrestPropertiesStringURI); + forrestPropertiesStringURI = userHome + + SystemUtils.FILE_SEPARATOR + "forrest.properties.xml"; + filteringProperties = loadXMLPropertiesFromURI( + filteringProperties, forrestPropertiesStringURI); } // get the values from global forrest.properties.xml @@ -168,12 +170,13 @@ if (globalHome != null) { forrestPropertiesStringURI = globalHome + SystemUtils.FILE_SEPARATOR + "forrest.properties.xml"; - filteringProperties = loadXMLPropertiesFromURI(filteringProperties, - forrestPropertiesStringURI); + filteringProperties = loadXMLPropertiesFromURI( + filteringProperties, forrestPropertiesStringURI); } // get the values from default.forrest.properties.xml - forrestPropertiesStringURI = contextHome + SystemUtils.FILE_SEPARATOR + forrestPropertiesStringURI = contextHome + + SystemUtils.FILE_SEPARATOR + "default.forrest.properties.xml"; filteringProperties = loadXMLPropertiesFromURI(filteringProperties, forrestPropertiesStringURI); @@ -184,8 +187,8 @@ if (strPluginList != null) { StringTokenizer st = new StringTokenizer(strPluginList, ","); while (st.hasMoreTokens()) { - forrestPropertiesStringURI = ForrestConfUtils.getPluginDir(st - .nextToken().trim()); + forrestPropertiesStringURI = ForrestConfUtils + .getPluginDir(st.nextToken().trim()); forrestPropertiesStringURI = forrestPropertiesStringURI + SystemUtils.FILE_SEPARATOR + "default.plugin.properties.xml"; @@ -225,7 +228,8 @@ for (Enumeration e = System.getProperties().propertyNames(); e .hasMoreElements();) { String propName = (String) e.nextElement(); - if (propName.startsWith("forrest.") || propName.startsWith("project.") + if (propName.startsWith("forrest.") + || propName.startsWith("project.") || propName.endsWith(".home")) { String systemPropValue = System.getProperty(propName); if (systemPropValue != null) { @@ -255,7 +259,8 @@ try { source = m_resolver.resolveURI(propertiesStringURI); if (debugging()) - debug("Searching for forrest.properties.xml in " + source.getURI()); + debug("Searching for forrest.properties.xml in " + + source.getURI()); if (source.exists()) { DocumentBuilderFactory factory = DocumentBuilderFactory @@ -267,8 +272,9 @@ if (nl != null && nl.getLength() > 0) { for (int i = 0; i < nl.getLength(); i++) { Element el = (Element) nl.item(i); - filteringProperties.setProperty(el.getAttribute("name"), el - .getAttribute("value")); + filteringProperties.setProperty( + el.getAttribute("name"), el + .getAttribute("value")); } }