cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <Ralph.Go...@dslextreme.com>
Subject Re: [RT] A Unified Environment Model?
Date Thu, 03 Mar 2005 15:33:18 GMT
Carsten Ziegeler wrote: 

> interface Module {
>   String ROLE = Module.class.getName();
>
>    Object getObject();
> }
>
> Hmm, I can't help myself but this interface looks a little bit too 
> simple for me :)
>
> Carsten
>
I guess I still don't see why this is needed.  Why would we implement this:

Request request = 
((Module)this.manager.lookup(Module.ROLE)).getObject(ObjectModelHelper.REQUEST_OBJECT);

(I'm assuming you meant to pass a parm to getObject?) when I can already 
code:

((Map)ContextMap.getCurrentContext().get("objectModel")).get(ObjectModelHelper.REQUEST_OBJECT);

or

Request request = 
ObjectModelHelper.getRequest((Map)ContextMap.getCurrentContext().get("objectModel"));

What exactly is this interface buying us again?

Ralph


Mime
View raw message