Sparx Systems Forum

Enterprise Architect => Uml Process => Topic started by: j33@1 on January 06, 2006, 03:00:00 pm

Title: Interface modelling question
Post by: j33@1 on January 06, 2006, 03:00:00 pm
How do model a constraint that a (abstract) class can implement a subset of a particular set of interface?

I try to put a multiplicity on the realization connector but it does not show up. To even do this I have a marker interface, which I've read is bad practice, from which all the interface in the set inherit.
Title: Re: Interface modelling question
Post by: jeshaw2 on January 16, 2006, 08:18:15 pm
You need to rethnk what you're trying to do.  

If you really are trying to do what you say you are trying to do, you are in violation of many UML and OO axioms.

Otherwise, try restating your question more clearly.
Title: Re: Interface modelling question
Post by: j33@1 on January 17, 2006, 11:22:43 am
Which axioms?

I have distinct set of interfaces.
I was having all these interface inherit from a marker interface.
Both of these are to help in a factory pattern.

I need concrete implementations.
The concrete implementations must support 1 to many of these interfaces.

How do I show this in UML?

I had thought I could have an abstract class from which the concrete classes would derive. The abstract class would have a realization link to the base interface and then somehow show the 1 to many realizations. I see I can attach a textual constraint to a realization link.

This would be useful for a generic look. I would also imagine that each concrete class would have realization links to the specific interfaces.

--TIA
Title: Re: Interface modelling question
Post by: JohnWSaundersIII on January 17, 2006, 12:27:48 pm
You don't want to enumerate the interfaces which the concrete classes must implement.  You just want to specify that the concrete classes must implement the base interface, since that's all that the callers of the concrete classes can depend on.

John Saunders