Previous UML Classes Table of Contents UML Packages Next


11.3.17 DestroyLinkAction

IntermediateActions


   DestroyLinkAction is a write link action that destroys links and link objects.

*Generalizations

   

    WriteLinkAction (from IntermediateActions ) on page 303.

*Description

   This action destroys a link or a link object. Link objects can also be destroyed with DestroyObjectAction . The link is specified in the same way as link creation, even for link objects. This allows actions to remain unchanged when their associations are transformed from ordinary ones to association classes and vice versa.

   DestroyLinkAction uses a specialization of LinkEndData , called LinkEndDestructionData , to support ordered non-unique associations. The position of the link to be destroyed is specified at runtime by an additional input pin, which is required for ordered non-unique association ends and omitted for other kinds of ends. This is a positive integer giving the position of the link to destroy.

   DestroyLinkAction also uses LinkEndDestructionData to support the destruction of duplicate links of the association on ends that are non-unique. This option is available on an end-by-end basis, and causes all duplicate links of the association emanating from the specified ends to be destroyed.

*Attributes

   No additional attributes

*Associations

   • endData : LinkEndDestructionData [2..*] Specifies ends of association and inputs. {Redefines LinkAction::endData}

*Constraints

   No additional constraints

*Semantics

   Destroying a link that does not exist has no effect. The semantics of DestroyObjectAction applies to destroying a link that has a link object with DestroyLinkAction .

   The semantics is undefined for destroying a link that has an association end with isReadOnly = true after initialization of the other end objects, unless the link being destroyed does not exist. Objects participating in the association across from a writeable end can have links destroyed as long as the objects across from all read only ends are still being initialized. This means objects participating in two or more readOnly ends cannot have links destroyed, unless all the linked objects are being initialized.

   Destroying links for non-unique ordered association ends requires identifying the position of the link using the input pin of LinkEndDestructionData . The pin is of type UnlimitedNatural with multiplicity 1..1. A pin value that is a positive integer less than or equal to the current number of links means to destroy the link at that position in the sequence of existing links, with the integer one meaning the first link in the sequence. The semantics is undefined for value of zero, for an integer greater than the number of existing links, and for unlimited. The destroyAt input pin only exists for ordered non-unique association ends.

*Notation

   No specific notation

   DestroyLinkAction is introduced for destroying links.

*Changes from previous UML

   DestroyLinkAction is unchanged from UML 1.5.