org.eclipse.uml2.uml
Interface Message

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, NamedElement, org.eclipse.emf.common.notify.Notifier

public interface Message
extends NamedElement

A representation of the model object 'Message'. A Message defines a particular communication between Lifelines of an Interaction.

From package UML::Interactions.

The following features are supported:

See Also:
UMLPackage.getMessage()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 ValueSpecification createArgument(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new ValueSpecification, with the specified 'Name', and 'Type', and appends it to the 'Argument' containment reference list
 ValueSpecification getArgument(java.lang.String name, Type type)
          Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list
 ValueSpecification getArgument(java.lang.String name, Type type, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list
 org.eclipse.emf.common.util.EList<ValueSpecification> getArguments()
          Returns the value of the 'Argument' containment reference list.
 Connector getConnector()
          Returns the value of the 'Connector' reference
 Interaction getInteraction()
          Returns the value of the 'Interaction' container reference.
 MessageKind getMessageKind()
          Returns the value of the 'Message Kind' attribute.
 MessageSort getMessageSort()
          Returns the value of the 'Message Sort' attribute.
 MessageEnd getReceiveEvent()
          Returns the value of the 'Receive Event' reference
 MessageEnd getSendEvent()
          Returns the value of the 'Send Event' reference
 NamedElement getSignature()
          Returns the value of the 'Signature' reference
 void setConnector(Connector value)
          Sets the value of the 'Connector' reference
 void setInteraction(Interaction value)
          Sets the value of the 'Interaction' container reference
 void setMessageSort(MessageSort value)
          Sets the value of the 'Message Sort' attribute
 void setReceiveEvent(MessageEnd value)
          Sets the value of the 'Receive Event' reference
 void setSendEvent(MessageEnd value)
          Sets the value of the 'Send Event' reference
 void setSignature(NamedElement value)
          Sets the value of the 'Signature' reference
 boolean validateArguments(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Arguments of a Message must only be: i) attributes of the sending lifeline, ii) constants, iii) symbolic values (which are wildcard values representing any legal value), iv) explicit parameters of the enclosing Interaction, v) attributes of the class owning the Interaction.
 boolean validateCannotCrossBoundaries(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Messages cannot cross boundaries of CombinedFragments or their operands.
 boolean validateOccurrenceSpecifications(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If the MessageEnds are both OccurrenceSpecifications, then the connector must go between the Parts represented by the Lifelines of the two MessageEnds.
 boolean validateSendingReceivingMessageEvent(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If the sendEvent and the receiveEvent of the same Message are on the same Lifeline, the sendEvent must be ordered before the receiveEvent.
 boolean validateSignatureIsOperationReply(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          In the case when a Message with messageSort reply has a non empty Operation signature, the arguments of the Message must correspond to the out, inout, and return parameters of the Operation.
 boolean validateSignatureIsOperationRequest(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          In the case when a Message with messageSort synchCall or asynchCall has a non empty Operation signature, the arguments of the Message must correspond to the in and inout parameters of the Operation.
 boolean validateSignatureIsSignal(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          In the case when the Message signature is a Signal, the arguments of the Message must correspond to the attributes of the Signal.
 boolean validateSignatureReferTo(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The signature must either refer an Operation (in which case messageSort is either synchCall or asynchCall or reply) or a Signal (in which case messageSort is asynchSignal).
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getMessageKind

MessageKind getMessageKind()
Returns the value of the 'Message Kind' attribute. The default value is "unknown". The literals are from the enumeration MessageKind. The derived kind of the Message (complete, lost, found, or unknown).

From package UML::Interactions.

Returns:
the value of the 'Message Kind' attribute.
See Also:
MessageKind, UMLPackage.getMessage_MessageKind()

getMessageSort

MessageSort getMessageSort()
Returns the value of the 'Message Sort' attribute. The default value is "synchCall". The literals are from the enumeration MessageSort. The sort of communication reflected by the Message.

From package UML::Interactions.

Returns:
the value of the 'Message Sort' attribute.
See Also:
MessageSort, setMessageSort(MessageSort), UMLPackage.getMessage_MessageSort()

setMessageSort

void setMessageSort(MessageSort value)
Sets the value of the 'Message Sort' attribute.

Parameters:
value - the new value of the 'Message Sort' attribute.
See Also:
MessageSort, getMessageSort()

getReceiveEvent

MessageEnd getReceiveEvent()
Returns the value of the 'Receive Event' reference. References the Receiving of the Message.

From package UML::Interactions.

Returns:
the value of the 'Receive Event' reference.
See Also:
setReceiveEvent(MessageEnd), UMLPackage.getMessage_ReceiveEvent()

setReceiveEvent

void setReceiveEvent(MessageEnd value)
Sets the value of the 'Receive Event' reference.

Parameters:
value - the new value of the 'Receive Event' reference.
See Also:
getReceiveEvent()

getSendEvent

MessageEnd getSendEvent()
Returns the value of the 'Send Event' reference. References the Sending of the Message.

From package UML::Interactions.

Returns:
the value of the 'Send Event' reference.
See Also:
setSendEvent(MessageEnd), UMLPackage.getMessage_SendEvent()

setSendEvent

void setSendEvent(MessageEnd value)
Sets the value of the 'Send Event' reference.

Parameters:
value - the new value of the 'Send Event' reference.
See Also:
getSendEvent()

getConnector

Connector getConnector()
Returns the value of the 'Connector' reference. The Connector on which this Message is sent.

From package UML::Interactions.

Returns:
the value of the 'Connector' reference.
See Also:
setConnector(Connector), UMLPackage.getMessage_Connector()

setConnector

void setConnector(Connector value)
Sets the value of the 'Connector' reference.

Parameters:
value - the new value of the 'Connector' reference.
See Also:
getConnector()

getInteraction

Interaction getInteraction()
Returns the value of the 'Interaction' container reference. It is bidirectional and its opposite is 'Message'.

This feature subsets the following features:

The enclosing Interaction owning the Message.

From package UML::Interactions.

Returns:
the value of the 'Interaction' container reference.
See Also:
setInteraction(Interaction), UMLPackage.getMessage_Interaction(), Interaction.getMessages()

setInteraction

void setInteraction(Interaction value)
Sets the value of the 'Interaction' container reference.

Parameters:
value - the new value of the 'Interaction' container reference.
See Also:
getInteraction()

getArguments

org.eclipse.emf.common.util.EList<ValueSpecification> getArguments()
Returns the value of the 'Argument' containment reference list. The list contents are of type ValueSpecification.

This feature subsets the following features:

The arguments of the Message.

From package UML::Interactions.

Returns:
the value of the 'Argument' containment reference list.
See Also:
UMLPackage.getMessage_Argument()

createArgument

ValueSpecification createArgument(java.lang.String name,
                                  Type type,
                                  org.eclipse.emf.ecore.EClass eClass)
Creates a new ValueSpecification, with the specified 'Name', and 'Type', and appends it to the 'Argument' containment reference list.

Parameters:
name - The 'Name' for the new ValueSpecification, or null.
type - The 'Type' for the new ValueSpecification, or null.
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getArguments()

getArgument

ValueSpecification getArgument(java.lang.String name,
                               Type type)
Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list.

Parameters:
name - The 'Name' of the ValueSpecification to retrieve, or null.
type - The 'Type' of the ValueSpecification to retrieve, or null.
Returns:
The first ValueSpecification with the specified 'Name', and 'Type', or null.
See Also:
getArguments()

getArgument

ValueSpecification getArgument(java.lang.String name,
                               Type type,
                               boolean ignoreCase,
                               org.eclipse.emf.ecore.EClass eClass,
                               boolean createOnDemand)
Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list.

Parameters:
name - The 'Name' of the ValueSpecification to retrieve, or null.
type - The 'Type' of the ValueSpecification to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the ValueSpecification to retrieve, or null.
createOnDemand - Whether to create a ValueSpecification on demand if not found.
Returns:
The first ValueSpecification with the specified 'Name', and 'Type', or null.
See Also:
getArguments()

getSignature

NamedElement getSignature()
Returns the value of the 'Signature' reference. The signature of the Message is the specification of its content. It refers either an Operation or a Signal.

From package UML::Interactions.

Returns:
the value of the 'Signature' reference.
See Also:
setSignature(NamedElement), UMLPackage.getMessage_Signature()

setSignature

void setSignature(NamedElement value)
Sets the value of the 'Signature' reference.

Parameters:
value - the new value of the 'Signature' reference.
See Also:
getSignature()

validateSendingReceivingMessageEvent

boolean validateSendingReceivingMessageEvent(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                             java.util.Map<java.lang.Object,java.lang.Object> context)
If the sendEvent and the receiveEvent of the same Message are on the same Lifeline, the sendEvent must be ordered before the receiveEvent. receiveEvent.oclIsKindOf(MessageOccurrenceSpecification) implies let f : Lifeline = sendEvent->select(oclIsKindOf(MessageOccurrenceSpecification)).oclAsType(MessageOccurrenceSpecification)->asOrderedSet()->first().covered in f = receiveEvent->select(oclIsKindOf(MessageOccurrenceSpecification)).oclAsType(MessageOccurrenceSpecification)->asOrderedSet()->first().covered implies f.events->indexOf(sendEvent.oclAsType(MessageOccurrenceSpecification)->asOrderedSet()->first() ) < f.events->indexOf(receiveEvent.oclAsType(MessageOccurrenceSpecification)->asOrderedSet()->first() )

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateSignatureReferTo

boolean validateSignatureReferTo(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)
The signature must either refer an Operation (in which case messageSort is either synchCall or asynchCall or reply) or a Signal (in which case messageSort is asynchSignal). The name of the NamedElement referenced by signature must be the same as that of the Message. signature->notEmpty() implies ((signature.oclIsKindOf(Operation) and (messageSort = MessageSort::asynchCall or messageSort = MessageSort::synchCall or messageSort = MessageSort::reply) ) or (signature.oclIsKindOf(Signal) and messageSort = MessageSort::asynchSignal ) ) and name = signature.name

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateSignatureIsOperationRequest

boolean validateSignatureIsOperationRequest(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                            java.util.Map<java.lang.Object,java.lang.Object> context)
In the case when a Message with messageSort synchCall or asynchCall has a non empty Operation signature, the arguments of the Message must correspond to the in and inout parameters of the Operation. A Parameter corresponds to an Argument if the Argument is of the same Class or a specialization of that of the Parameter. (messageSort = MessageSort::asynchCall or messageSort = MessageSort::synchCall) and signature.oclIsKindOf(Operation) implies let requestParms : OrderedSet(Parameter) = signature.oclAsType(Operation).ownedParameter-> select(direction = ParameterDirectionKind::inout or direction = ParameterDirectionKind::_'in' ) in requestParms->size() = self.argument->size() and self.argument->forAll( o: ValueSpecification | not (o.oclIsKindOf(Expression) and o.oclAsType(Expression).symbol->size()=0 and o.oclAsType(Expression).operand->isEmpty() ) implies let p : Parameter = requestParms->at(self.argument->indexOf(o)) in o.type.oclAsType(Classifier).conformsTo(p.type.oclAsType(Classifier)) )

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateSignatureIsOperationReply

boolean validateSignatureIsOperationReply(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)
In the case when a Message with messageSort reply has a non empty Operation signature, the arguments of the Message must correspond to the out, inout, and return parameters of the Operation. A Parameter corresponds to an Argument if the Argument is of the same Class or a specialization of that of the Parameter. (messageSort = MessageSort::reply) and signature.oclIsKindOf(Operation) implies let replyParms : OrderedSet(Parameter) = signature.oclAsType(Operation).ownedParameter-> select(direction = ParameterDirectionKind::inout or direction = ParameterDirectionKind::out or direction = ParameterDirectionKind::return) in replyParms->size() = self.argument->size() and self.argument->forAll( o: ValueSpecification | o.oclIsKindOf(Expression) and let e : Expression = o.oclAsType(Expression) in e.operand->notEmpty() implies let p : Parameter = replyParms->at(self.argument->indexOf(o)) in e.operand->asSequence()->first().type.oclAsType(Classifier).conformsTo(p.type.oclAsType(Classifier)) )

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateSignatureIsSignal

boolean validateSignatureIsSignal(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
In the case when the Message signature is a Signal, the arguments of the Message must correspond to the attributes of the Signal. A Message Argument corresponds to a Signal Attribute if the Argument is of the same Class or a specialization of that of the Attribute. (messageSort = MessageSort::asynchSignal ) and signature.oclIsKindOf(Signal) implies let signalAttributes : OrderedSet(Property) = signature.oclAsType(Signal).inheritedMember()-> select(n:NamedElement | n.oclIsTypeOf(Property))->collect(oclAsType(Property))->asOrderedSet() in signalAttributes->size() = self.argument->size() and self.argument->forAll( o: ValueSpecification | not (o.oclIsKindOf(Expression) and o.oclAsType(Expression).symbol->size()=0 and o.oclAsType(Expression).operand->isEmpty() ) implies let p : Property = signalAttributes->at(self.argument->indexOf(o)) in o.type.oclAsType(Classifier).conformsTo(p.type.oclAsType(Classifier)))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateArguments

boolean validateArguments(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                          java.util.Map<java.lang.Object,java.lang.Object> context)
Arguments of a Message must only be: i) attributes of the sending lifeline, ii) constants, iii) symbolic values (which are wildcard values representing any legal value), iv) explicit parameters of the enclosing Interaction, v) attributes of the class owning the Interaction.

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateCannotCrossBoundaries

boolean validateCannotCrossBoundaries(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                      java.util.Map<java.lang.Object,java.lang.Object> context)
Messages cannot cross boundaries of CombinedFragments or their operands. This is true if and only if both MessageEnds are enclosed within the same InteractionFragment (i.e., an InteractionOperand or an Interaction). sendEvent->notEmpty() and receiveEvent->notEmpty() implies let sendEnclosingFrag : Set(InteractionFragment) = sendEvent->asOrderedSet()->first().enclosingFragment() in let receiveEnclosingFrag : Set(InteractionFragment) = receiveEvent->asOrderedSet()->first().enclosingFragment() in sendEnclosingFrag = receiveEnclosingFrag

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateOccurrenceSpecifications

boolean validateOccurrenceSpecifications(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                         java.util.Map<java.lang.Object,java.lang.Object> context)
If the MessageEnds are both OccurrenceSpecifications, then the connector must go between the Parts represented by the Lifelines of the two MessageEnds.

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.