On Tue, 25 Sep 2001 23:40, Berin Loritsch wrote:
> Axis has a consept for options (equivalent to our parameters)
> that our existing Parameters object does not satisfy.  It is
> the concept of "locked" parameters.
>
> The approach is in between the two states our Parameters object
> can handle.  Currently we have completely modifiable or read only.
> The change would allow the markup to be changed to:
>
> <parameter name="foo" value="bar" locked="true"/>
> <parameter name="baz" value="vip"/>
>
> The additional parameter (if present) will lock a parameter no
> matter what state the object is in.
>
> That way, a run-time system can have parameters that are modified
> at specific times--but keep certain params from changing during
> the life of the system.

I am fairly sure I don't like this. If parts are read-only and parts are 
read-write then IMHO they should not be part of same Parameters object. A 
possible solution to get around this would be to allow Parameters to have a 
parent and make it possible to specify who to read properties from first. 
(This would mean that properties were always accessed from parent first and 
then from child or vice versa). So you would have something like 

Parameters parent = new Parameters();
...setup immutable variables here...
parent.makeReadOnly();

Parameters child1 = new Parameters( parent, false );
...setup non "locked" parameters here...

Then later on

Parameters child2 = new Parameters( parent, false );
child2.merge( child 1 );
...setup non "locked" parameters here for second time...

Actually this is what I partially do in quite a few of my apps. But I do it 
manually and instead of using term parent I use term defaults ;)

> There are two other things I would like to see:  A Reparameterizable
> interface (to compliment Reconfigurable), 

+1

> and a "fromConfiguration"
> method that allows you to specify the element name for a parameter.
> The attributes would be the same, but a project would be able to
> use the name "option" instead of "parameter" if it wanted to.

Seems kinda ugly to me.

-- 
Cheers,

Pete

---------------------------------------------------------
Clarke's Third Law: "Any technology distinguishable from 
magic is insufficiently advanced".
---------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to