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.*


what you did is correct, the cartridges extend the interfaces from the .uml package, not the .uml14 package (this allows us to change UML versions without needing the cartridges to update, since the stuff in .uml14 actually implements the stuff from .uml)


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 should work fine as long as your metafacade properly maps onto all packages


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


hmm .. that's strange, something must be wrong in your metafacademapping

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.


well, as far as I can see this is indeed the way to go


if you're really stuck with this you can send me your project and I'll do what I can to solve your problem



-- Wouter




------------------------------------------------------- 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