avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject MutableConfiguration interface
Date Thu, 22 Jan 2004 17:05:00 GMT
All,

I've done some experimentation with persisting a component's
configuration.
First, I started like this:

    interface Persistable {
        Configuration getConfiguration ();
    }

but then I came upon the little snag that the container may want to add
more
configuration information to the Configuration before it is stored. So I
did this:

    interface Persistable {
        DefaultConfiguration getConfiguration ();
    }

Then this:

    interface Persistable {
        void getConfiguration (DefaultConfiguration config);
    }

which allowed the component to fill in its attributes etc.

But that's quite ugly.

So I'd like to have an interface - MutableConfiguration that will
extend Configuration, but add the mutators from DefaultConfiguration -
setAttribute, addChild, etc. DefaultConfiguration would then implement
this interface.

What do you think?

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message