cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: How to configure a producer
Date Thu, 17 Aug 2000 16:40:47 GMT
Ricardo Rocha <ricardo@apache.org> wrote:
>Jochen Wiedmann wrote:
> >
> > Hi,
> >
> > how do I access the cocoon.properties from within a producer?
> > Sorry, if this is something I should know, but I really didn't
> > get it from reading the sources.
>
>Given:
>
>   public class MyProducer extends AbstractProducer
>     String fileExtension = null;
>     . . .
>     public void init(Configurations conf)
>       throws InitializationException {
>       this.fileExtension =
>         (String) conf.get("fileExtension");
>     }
>     . . .
>   }
>
>your cocoon.properties should contain:
>
>   producer.type.xxx = MyProducer
>   producer.xxx.fileExtension = html
>
>
>Hope this helps,
>
>Ricardo


Er.... 'fraid that won't work.

public interface Producer extends Actor, Changeable
{...}

public interface Actor
{...}

public interface Changeable {...}

No mention of implementing Configurable. Producer should definitely 
implement Configurable, IMO.


--
Robin Green
i-tao Ltd.
4 Skyline Village
Limeharbour
London E14 9TS
United Kingdom
Phone +44 20 7537 2233  Fax +44 70 8081 5118
http://www.i-tao.com


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message