Nathan Coast wrote:

apologies if you receive this twice, but the first copy didn't seem to get through.

It went through ok.


Nathan Coast wrote:

Hi,

I have created a cartridge with its own metafacades which extend the following:

org.andromda.metafacades.uml.PackageFacade with HttpUnitPackageFacade
org.andromda.metafacades.uml.Entity with HttpUnitEntityFacade

First off, simple question, am I extending the correct classes? or should I be extending org.andromda.metafacades.uml14.*

No, you're doing it right, the uml14 classes should never be exposes to the cartridge metafacades.


My thinking was that within HttpUnitEntityFacadeLogicImpl, methods that previously would have returned PackageFacade instances would now return HttpUnitPackageFacade instances


e.g.

HttpUnitPackageFacade pack = (HttpUnitPackageFacade) getPackage();

this however throws a ClassCastException as getPackage() continues to return org.andromda.metafacades.uml14.PackageFacadeLogicImpl instances.

I was thinking that the following entry in my andromda-metafacades.xml would do what I needed, but I guess it doesn't :)

<metafacade class="com.codeczar.andromda.cartridges.httpunit.metafacades.HttpUnitPackageFacadeLogicImpl">

        <mapping class="org.omg.uml.modelmanagement.UmlPackage$Impl"/>
</metafacade>

Is my thinking correct, or have I just had too much coffee.

Yep, your thinking is correct, try adding this mapping as well and see if that works:

<metafacade class="com.codeczar.andromda.cartridges.httpunit.metafacades.HttpUnitPackageFacadeLogicImpl">

       <mapping class="org.omg.uml.modelmanagement.Model$Impl"/>
</metafacade>


thanks Nathan



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user




------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to