Peter Donald wrote:
>
> ie Phoenix has a BlockContext via which it exports extra information
> to blocks (if they want it) and also will support extra functionality
> in the future.
>
> Note that I haven't read your proposal yet but my guess would be
> something like the following would work
>
> interface CocoonContext extend Context
> {
> InstrumentPoint getPoint(String name);
> CocoonSession getSession();
> File getWorkDirectory();
> ///insert whatever actual parameters you need
> }
>
> Then your instrumentable component just does something like
>
> abstract class AbstractCocoonInstrumentable
> implements Intrumentable, COntextualizable
>
> void context( Context c )
> {
> CocoonContext cc = (CocoonContext)c;
> setPoints( cc.getPoints() ); //Or however instrumnentable works
> }
Given this approach you may want to checkout ContextFactory in the Merlin
CVS. It provides support for the declaration along the lines of:
<context class="CocoonContext">
<entry name="point"
type="Instrementer?"
value="some-test-string-that-makes-sence-to-a-string-constructor" />
<entry name="session"
type="CocoonSession"
value="whatever"/>
</context>
Cheers, Steve.
--
Stephen J. McConnell
OSM SARL
digital products for a global economy
mailto:[EMAIL PROTECTED]
http://www.osm.net
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>