forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r391173 - /forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java
Date Mon, 03 Apr 2006 23:18:49 GMT
Author: thorsten
Date: Mon Apr  3 16:18:47 2006
New Revision: 391173

URL: http://svn.apache.org/viewcvs?rev=391173&view=rev
Log:
Extracting helper method.

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/viewcvs/forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java?rev=391173&r1=391172&r2=391173&view=diff
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java (original)
+++ forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Mon Apr  3 16:18:47
2006
@@ -115,16 +115,8 @@
 
 	public void initialize() throws Exception {
 
-		forrestHome = ForrestConfUtils.getForrestHome();
-		projectHome = ForrestConfUtils.getProjectHome();
-		contextHome = ForrestConfUtils.getContextHome();
-
-		filteringProperties = new AntProperties();
-
-		// add forrest.home and project.home to properties
-		filteringProperties.setProperty("forrest.home", forrestHome);
-		filteringProperties.setProperty("project.home", projectHome);
-		filteringProperties.setProperty("context.home", contextHome);
+        // add all homes important to forrest to the properties
+		setHomes();
 
 		// NOTE: the first values set get precedence, as in AntProperties
 
@@ -208,6 +200,25 @@
 		if (debugging())
 			debug("Loaded project forrest.properties:" + filteringProperties);
 	}
+
+    /**
+     * Sets all forrest related home locations such as
+     * - forrestHome
+     * - projectHome
+     * - contextHome
+     * @throws Exception
+     */
+    private void setHomes() throws Exception {
+        forrestHome = ForrestConfUtils.getForrestHome();
+		projectHome = ForrestConfUtils.getProjectHome();
+		contextHome = ForrestConfUtils.getContextHome();
+
+		filteringProperties = new AntProperties();
+
+		filteringProperties.setProperty("forrest.home", forrestHome);
+		filteringProperties.setProperty("project.home", projectHome);
+		filteringProperties.setProperty("context.home", contextHome);
+    }
 
 	/**
 	 * Override any properties for which a system property exists



Mime
View raw message