com.sodius.mdw.core.eval
Interface TransientLinkManager


public interface TransientLinkManager

Provides services to create transient links between pairs of elements. A transient link is a named virtual link between two objects of any kind. These links do not exist before the evaluation and are automatically garbaged at the end of the evaluation process.

Theses links are virtual, have no restriction on the type of objects to connect and do never alter the models, while modeling link are reserved to model elements and will modify the related objects.

Transient links are particularly useful to add traceability between a source model element and a target model element.

This interface is not intended to be implemented by clients.


Method Summary
 void clear()
          Removes all registered transient links.
 boolean containsKey(String name, Object source)
          Determines whether there are transient links from the specified source object of the specified name.
 TransientLinkList<Object> get(String name, Object source)
          Returns the list a target objects connected to the source object through a transient link of specified name.
 boolean isEmpty()
          Returns true if this manager contains no transient link.
 void remove(String name)
          Removes any transient link of the specified name, whatever the source objects are.
 void remove(String name, Object source)
          Removes any transient link of the specified name with the specified source object.
 

Method Detail

clear

void clear()
Removes all registered transient links.


isEmpty

boolean isEmpty()
Returns true if this manager contains no transient link.

Returns:
true if this manager contains no transient link, false otherwise.

containsKey

boolean containsKey(String name,
                    Object source)
Determines whether there are transient links from the specified source object of the specified name.

Parameters:
name - the name of the transient link.
source - the source object of the transient link.
Returns:
true if the source objects has any transient links of that name, false otherwise.

get

TransientLinkList<Object> get(String name,
                              Object source)
Returns the list a target objects connected to the source object through a transient link of specified name.

The returned list may be empty, when no target object is connected. This list is modifiable, you can add or remove target objects directly from this list.

Parameters:
name - the name of the transient link.
source - the source object of the transient link.
Returns:
a modifiable list of objects connected to the source object through the specified transient link.

remove

void remove(String name)
Removes any transient link of the specified name, whatever the source objects are.

Parameters:
name - the name of the transient links to remove.

remove

void remove(String name,
            Object source)
Removes any transient link of the specified name with the specified source object.

Parameters:
name - the name of the transient link to remove.
source - the source object of the transient link.