> Although I think the idea from Wouter was also not bad,
> just to add a resource bundle within the META-INF or so, which
> defines the stereotypes... So you can use stereotypes you want
> to use ;-)
>

I think Matthias should be involved here, to make sure all cartridges adhere
to this requirement

> Anyway, I would be thankful if any core developers of AndroMDA
> can give me a hint, what is the best way to do this *now* ;-)
> (instead of using <<PrimaryKey>> -> <<primaryKey>>, etc):
>
> - Change the core code and recompile AndroMDA
> - Extend with my own ScriptHelper? If yes, how?
>


easy, the scripthelper to be used by a cartridge can be overridden, take a
look at the bpm4struts cartridge in CVS, I am doing it right there in the
cartridge descriptor ( META-INF )

to write your own scripthelper you might consider any of these two solutions
:

1. overwriting the SimpleOOHelper (as you said). You should then write a new
helper extending the default scripthelper, specify the functionality by
overriding any feature you think necessary; personally I don't like this
approach because it's not really OO: java has no way to explicitely define
preconditions and postconditions, I try to stick to the Liskov substitution
principle which basically says any child class should be able to be
seemlessly used instead of its parent class, without changing behavior or
functionality. There is some discussion about this, but my experience shows
me this is a good guideline to follow, so I would not extend the default
scripthelper.

2. implement the interface yourself, and copy&paste the code you need from
the default scripthelper implementation, adapt it to your needs; better but
still not optimal

3. write a decorator class for the default scripthelper, wrapping it inside.
make sure your class also implements the scripthelper interface, I think
this is elegant since any changes to the default scripthelper will be
reflected in your code too (such as bugfixes or code improvements) *I am
doing this in the bpm4struts cartridge: I have one helper implementation
encapsulating both the scripthelpers for the static and the dynamic part of
the uml model* (although I expose these helpers using accessor methods for
easy of use in the templates and performance)

you will always put your scripthelper in your cartridge distribution (of
course :-) ), again, take a look at bpm4struts, I did it all there

HTH, and goodnight :)
Wouter.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to