From: "Erik Hatcher" <[EMAIL PROTECTED]>
> Without delving deep into IntrospectionHelper, I'd like to bounce off an
> idea and see how its taken. Create an interface (named DynaTask? - I've
> been following commons-dev DynaBean discussions so can't think of anything
> more original) that has a method (setDynaAttribute?) with the signature
> setDynaAttribute(String name, String value). If no setter is found in the
> current process of finding one, if the class implements the "dynamic"
> interface then the interfaces method is called.
>
This comment may be good or bad for the acceptance of what you are proposing
(given my record of success of the list ;-) ). I am all for something like this.
I would go a step further and also require your dynamic interface to manage
elements (as well as attributes). So the interface would be something like:
interface DynamicConfigurator {
void setDynamicAttribute(String name, String value);
Object createDynamicElement(String name);
}
This will allow writing tasks that have their own dynamic subset of valid
elements, for example <ejb-jar> would not have to be modified every time
a new EJB container is supported, but instead the new plug-in will be declared
in some registry and the task will use createDynamicElement() to search for the
correct
plug-in element to instantiate.
The same is applicable to things like <conditional>, <mappers>, etc.
And it would finally allow to define a real useful <script> like task
in which we can define real useful <ScriptTasks> that can be used
in multiple places with different parameters.
To tell you the truth, the current <script> task is kind of useless in my
opinion.
Hope my comments dont kill your idea ;-)
Jose Alberto
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>