forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [headsup] skin aliases
Date Thu, 29 Jul 2004 07:32:51 GMT
Dave Brondsema wrote:
> On Wed, 28 Jul 2004, Dave Brondsema wrote:
> 
> 
>>I just renamed and deleted old skins.  Aliasing is in place in
>>forrest.build.xml
>>
>>        0.5 => 0.6
>>        krysalis-site => book-tab
>>        forrest-site => book-tab
>>        forrest-css => book-tab
>>        avalon-tigris => tigris-style-1_1
>>        tigris-style => tigris-style-1_1
>>
> 
> 
> If you specify a property on the commandline (-Dproject.skin=forrest-site)
> cocoon gets the aliased value.  But if the project's forrest.properties
> specifies an old skin name, it does not get aliased.
> 
> I'm not too familiar with how this works... does it have something to do
> with ForrestConfModule?

I really don't have time to do it, here are some easy indications.

In ForrestConfModule, at the end of method initialize(), you will find 
these lines, that load the properties from the default forrest properties:

         filteringProperties = 
loadAntPropertiesFromURI(filteringProperties,defaultRorrestPropertiesStringURI);

         if (debugging()) debug("Loaded project forrest.properties:" +
                                                    filteringProperties);

The variable filteringProperties contains the values that are used, and 
is of type AntProperties (extends Properties).

You just have to search in this if there is a forrest.skin property and 
change it if it refers to an old skin.

OTOH code:

String forrestHome = filteringProperties.getProperty("forrest.home");
if(forrestHome !=null){
   if(forrestHome.equals("krysalis-site")||forrestHome.equals(...)||...){
       filteringProperties.setProperty("forrest.home", "boot-tab");
   }else if...[other aliases]
  }

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message