cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [RT] Access to the object model
Date Tue, 20 May 2003 14:51:44 GMT
Vadim Gritsenko wrote:

> Sylvain Wallez wrote:
> ...
>
>> Another use case : in the CVSSource, user credentials are accessed 
>> using a sitemap-like expression allowing the use of input modules 
>> (see [1]). This avoids having a fixed scheme and also avoids to 
>> transmit these credentials all along the chain from the sitemap down 
>> to the source, which BTW is not always possible (e.g. XSLT URIResolver)
>>
>> But for this to function properly, there must be a way to access the 
>> object model since input modules use it. So the CVSSource uses the 
>> CocoonComponentManager.getCurrentEnvironment() hack.
>>
>> Now if the object model was accessible through the context, input 
>> modules using it (not all do) could access it directly avoiding the 
>> need for the CVSSource to care about it. Moreover this would allow to 
>> remove the object model from the InputModule interface, thus 
>> potentially broadening the use of modules not using the object model 
>> outside of Cocoon, or in places in Cocoon where the object model is 
>> not "naturally" available (e.g. expanding variables in xconf files, 
>> etc).
>>
>> Sylvain
>>
>> [1] http://www.cocoondev.org/projects/cvssource.html#N1005E 
>
>
>
> <commit-message-expr>{request-attr:cvs-message}</commit-message-expr>
>
> Ewww!!! Looks awful! Ain't there better way -- like pass info via URI? 
> Things like that must be controlled from the sitemap, not from 
> cocoon.xconf.


For this one, I admit it's awful. But look at the other ones also :
  <username-expr>{session-attr:cvs-user}</username-expr>
  <password-expr>{session-attr:cvs-passwd}</password-expr>

I used the same mechanism for the commit message because the mechanism 
was there and I lacked time to do something nicer.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Mime
View raw message