forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject svn commit: rev 30925 - in forrest/trunk: . src/core src/java/org/apache/forrest/conf
Date Thu, 29 Jul 2004 13:42:39 GMT
Author: brondsem
Date: Thu Jul 29 06:42:38 2004
New Revision: 30925

Modified:
   forrest/trunk/src/core/forrest.build.xml
   forrest/trunk/src/java/org/apache/forrest/conf/ForrestConfModule.java
   forrest/trunk/status.xml
Log:
skin alias in cocoon module

Modified: forrest/trunk/src/core/forrest.build.xml
==============================================================================
--- forrest/trunk/src/core/forrest.build.xml	(original)
+++ forrest/trunk/src/core/forrest.build.xml	Thu Jul 29 06:42:38 2004
@@ -150,6 +150,8 @@
         forrest-css => book-tab
         avalon-tigris => tigris-style-1_1
         tigris-style => tigris-style-1_1 
+        
+    This must be kept in sync with ForrestConfModule.java/aliasSkinProperties()
     -->
     <if>
         <equals arg1="${project.skin}" arg2="krysalis-site"/>

Modified: forrest/trunk/src/java/org/apache/forrest/conf/ForrestConfModule.java
==============================================================================
--- forrest/trunk/src/java/org/apache/forrest/conf/ForrestConfModule.java	(original)
+++ forrest/trunk/src/java/org/apache/forrest/conf/ForrestConfModule.java	Thu Jul 29 06:42:38
2004
@@ -153,15 +153,36 @@
         filteringProperties = 
             loadAntPropertiesFromURI(filteringProperties,defaultRorrestPropertiesStringURI);
 
+        aliasSkinProperties(filteringProperties);
         if (debugging()) debug("Loaded project forrest.properties:" + filteringProperties);
     }
 
     /**
-     * @param antPropertiesStringURI
-     * @throws MalformedURLException
-     * @throws IOException
-     * @throws SourceNotFoundException
+     * For backwards compatibility, alias old skin names to new ones. This must
+     * be kept in sync with aliasing in forrest.build.xml/init-props
+     * 
+     * @param properties to filter
      */
+    private void aliasSkinProperties(AntProperties props) {
+		// AntProperties.setProperty doesn't let you override, so we have to remove the property
then add it again
+		String skinName = props.getProperty("project.skin");
+		if (skinName.equals("krysalis-site") || skinName.equals("forrest-site")
+				|| skinName.equals("forrest-css")) {
+			props.remove("project.skin");
+			props.setProperty("project.skin", "book-tab");
+		} else if (skinName.equals("avalon-tigris")
+				|| skinName.equals("tigris-style")) {
+			props.remove("project.skin");
+			props.setProperty("project.skin", "tigris-style-1_1");
+		}
+	}
+
+	/**
+	 * @param antPropertiesStringURI
+	 * @throws MalformedURLException
+	 * @throws IOException
+	 * @throws SourceNotFoundException
+	 */
     private AntProperties loadAntPropertiesFromURI(AntProperties precedingProperties, String
antPropertiesStringURI) throws MalformedURLException, IOException, SourceNotFoundException
{
         
         Source source = null;

Modified: forrest/trunk/status.xml
==============================================================================
--- forrest/trunk/status.xml	(original)
+++ forrest/trunk/status.xml	Thu Jul 29 06:42:38 2004
@@ -50,7 +50,7 @@
         Added new document to facilitate
         <link href="site:upgrading_06">upgrading to v0.6</link>
       </action>
-      <action dev="DB" type="remove" context="skins">
+      <action dev="DB" type="remove" context="skins" fixes-bug="FOR-181">
         Skins forrest-css, forrest-site and avalon-tigris deleted; krysalis-site
         renamed to book-tab and tigris-style renamed to tigris-style-1_1.  Aliases
         set in place for backward-compatibility.

Mime
View raw message