org.argouml.model
Interface UmlHelper

All Known Implementing Classes:
AbstractUmlHelperDecorator

public interface UmlHelper

The interface for the Helper for Uml.

Created from the old UmlHelper.


Method Summary
 void addListenersToModel(Object model)
          Ensures that all of the elements in a model are registered to the UmlModelListener.
 void deleteCollection(Collection col)
          Utility method to quickly delete a collection of modelelements.
 Object getDestination(Object relationShip)
          Returns the destination of some relationship.
 Object getOwner(Object handle)
          Deprecated. for 0.21 by tfmorris - use getModelElementContainer - this was never implemented for MDR, so any use would throw a run time exception. Will be removed quickly because of this.
 Object getSource(Object relationShip)
          Returns the source of some relationship.
 

Method Detail

addListenersToModel

public void addListenersToModel(Object model)
Ensures that all of the elements in a model are registered to the UmlModelListener. This is useful when the MModel is not created by the UmlFactory.

Parameters:
model - the UML model

getOwner

public Object getOwner(Object handle)
Deprecated. for 0.21 by tfmorris - use getModelElementContainer - this was never implemented for MDR, so any use would throw a run time exception. Will be removed quickly because of this.

Returns the owner of some modelelement object. In most cases this will be the owning namespace but in some cases it will be null (the root model) or for instance the owning class with an attribute.

Parameters:
handle - the modelelement
Returns:
Object the owner
See Also:
Facade.getModelElementContainer(Object)

deleteCollection

public void deleteCollection(Collection col)
Utility method to quickly delete a collection of modelelements. This method should only be called from within the model component. The only reason it is public is that the other helpers/factories are in other packages and therefore cannot see this method if it is not public.

Parameters:
col - a collection of modelelements

getSource

public Object getSource(Object relationShip)
Returns the source of some relationship. This is the element in binary relations from which a relation 'departs'.

Parameters:
relationShip - the relationship to be tested
Returns:
the source of the relationship

getDestination

public Object getDestination(Object relationShip)
Returns the destination of some relationship. This is the element in binary relations at which a relation 'arrives'.

Parameters:
relationShip - the relationship to be tested
Returns:
the destination of the relationship


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook