cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <craft...@fztig938.bank.dresdner.net>
Subject Re: Sitemap parameters object & Threads
Date Thu, 20 Dec 2001 20:12:01 GMT
Hi Vadim,

	Thanks for your response. :)

On Thu, Dec 20, 2001 at 01:19:19PM -0500, Vadim Gritsenko wrote:
> 
> This parameters object you are referring is read-only by semantics, but
> not by syntax. It is used as an optimization, instead of writing:
> 
> >   if (isSelected("userstatus", "permitted", listOfMaps,
> >                new Parameters(), objectModel)) {
> 
> sitemap uses static instance. The solution is to have unmodifiable
> wrapper parameters class available, as it is done in java collections
> library. Then, sitemap could be modified to use it:
> 
> >   /** An empty <code>Parameter</code> used to pass to the sitemap
> components
> > */
> >   private Parameters emptyParam =
> >       Parameters.unmodifiableParameters(new Parameters());
> 
> Hope this is clear enough,

	Yes, all clear.
	
	Currently, unmodifiableParameters doesn't exist in the
	Avalon Parameters class (I don't have a problem implementing
	it though), but I've attached a diff which does something
	similar, just via a constructor and the Parameters.makeReadOnly()
	method.

	What do you think ?

	Cheers,

	Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@managesoft.com
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:

Mime
View raw message