cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: [Corona] PIpeline API
Date Thu, 17 Jul 2008 07:46:38 GMT
Ralph Goers wrote:
>>
> Can you show an example?
> 
> Can they be declared as Spring beans and wired with the appropriate 
> parameters, or at least beans that know how to dynamically obtain the 
> correct information and then be referenced in the sitemap?
> 
Ok, this all depends on what you consider configuration vs execution 
information. If you look at the current Cocoon sitemap components 
they've only a little configuration (everything that can be configured 
in the "components" section of the sitemap). Most information is passed 
in as execution information like the source to read from or any 
additional paramter.

The component configuration can be easily done by a spring bean 
configuration. The execution information is the interesting part as this 
is different between each pipeline run.

So, some pseudo code could look like this:

// read configuration of pipeline from "somewhere"
String type = // the component type
Map m = // the execution information

Transformer t = springContext.getBean(type);
t.setup(m);

Now, my configuration of the pipeline is actually stored in a JCR :) but 
this is comparable with using the sitemap.xmap. Of course it should 
contain a "src" information for the transformer to work.

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Mime
View raw message