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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]