blob: 486fdb7c9e8e7d4e9b8914ed93ca107e9de89ba6 [file] [log] [blame]
/*
* Copyright (c) 2005, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - initial API and implementation
*
* $Id: Message.java,v 1.12 2006/05/12 20:38:03 khussey Exp $
*/
package org.eclipse.uml2.uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Message</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A message defines a particular communication between lifelines of an interaction.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.Message#getMessageKind <em>Message Kind</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Message#getMessageSort <em>Message Sort</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Message#getReceiveEvent <em>Receive Event</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Message#getSendEvent <em>Send Event</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Message#getConnector <em>Connector</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Message#getInteraction <em>Interaction</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Message#getArguments <em>Argument</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Message#getSignature <em>Signature</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getMessage()
* @model
* @generated
*/
public interface Message
extends NamedElement {
/**
* Returns the value of the '<em><b>Message Kind</b></em>' attribute.
* The default value is <code>"unknown"</code>.
* The literals are from the enumeration {@link org.eclipse.uml2.uml.MessageKind}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The derived kind of the Message (complete, lost, found or unknown)
* <!-- end-model-doc -->
* @return the value of the '<em>Message Kind</em>' attribute.
* @see org.eclipse.uml2.uml.MessageKind
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_MessageKind()
* @model default="unknown" required="true" transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
MessageKind getMessageKind();
/**
* Returns the value of the '<em><b>Message Sort</b></em>' attribute.
* The default value is <code>"synchCall"</code>.
* The literals are from the enumeration {@link org.eclipse.uml2.uml.MessageSort}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The sort of communication reflected by the Message
* <!-- end-model-doc -->
* @return the value of the '<em>Message Sort</em>' attribute.
* @see org.eclipse.uml2.uml.MessageSort
* @see #setMessageSort(MessageSort)
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_MessageSort()
* @model default="synchCall" required="true" ordered="false"
* @generated
*/
MessageSort getMessageSort();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Message#getMessageSort <em>Message Sort</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Message Sort</em>' attribute.
* @see org.eclipse.uml2.uml.MessageSort
* @see #getMessageSort()
* @generated
*/
void setMessageSort(MessageSort value);
/**
* Returns the value of the '<em><b>Receive Event</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* References the Receiving of the Message
* <!-- end-model-doc -->
* @return the value of the '<em>Receive Event</em>' reference.
* @see #setReceiveEvent(MessageEnd)
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_ReceiveEvent()
* @model ordered="false"
* @generated
*/
MessageEnd getReceiveEvent();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Message#getReceiveEvent <em>Receive Event</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Receive Event</em>' reference.
* @see #getReceiveEvent()
* @generated
*/
void setReceiveEvent(MessageEnd value);
/**
* Returns the value of the '<em><b>Send Event</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* References the Sending of the Message.
* <!-- end-model-doc -->
* @return the value of the '<em>Send Event</em>' reference.
* @see #setSendEvent(MessageEnd)
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_SendEvent()
* @model ordered="false"
* @generated
*/
MessageEnd getSendEvent();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Message#getSendEvent <em>Send Event</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Send Event</em>' reference.
* @see #getSendEvent()
* @generated
*/
void setSendEvent(MessageEnd value);
/**
* Returns the value of the '<em><b>Connector</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The Connector on which this Message is sent.
* <!-- end-model-doc -->
* @return the value of the '<em>Connector</em>' reference.
* @see #setConnector(Connector)
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_Connector()
* @model ordered="false"
* @generated
*/
Connector getConnector();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Message#getConnector <em>Connector</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Connector</em>' reference.
* @see #getConnector()
* @generated
*/
void setConnector(Connector value);
/**
* Returns the value of the '<em><b>Interaction</b></em>' container reference.
* It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Interaction#getMessages <em>Message</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The enclosing Interaction owning the Message
* <!-- end-model-doc -->
* @return the value of the '<em>Interaction</em>' container reference.
* @see #setInteraction(Interaction)
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_Interaction()
* @see org.eclipse.uml2.uml.Interaction#getMessages
* @model opposite="message" required="true" ordered="false"
* @generated
*/
Interaction getInteraction();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Message#getInteraction <em>Interaction</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Interaction</em>' container reference.
* @see #getInteraction()
* @generated
*/
void setInteraction(Interaction value);
/**
* Returns the value of the '<em><b>Argument</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.ValueSpecification}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The arguments of the Message
* <!-- end-model-doc -->
* @return the value of the '<em>Argument</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_Argument()
* @model type="org.eclipse.uml2.uml.ValueSpecification" containment="true"
* @generated
*/
EList getArguments();
/**
* Creates a new {@link org.eclipse.uml2.uml.ValueSpecification}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and appends it to the '<em><b>Argument</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or <code>null</code>.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.ValueSpecification} to create.
* @return The new {@link org.eclipse.uml2.uml.ValueSpecification}.
* @see #getArguments()
* @generated
*/
ValueSpecification createArgument(String name, Type type, EClass eClass);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.ValueSpecification} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Argument</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.ValueSpecification} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.ValueSpecification} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.ValueSpecification} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getArguments()
* @generated
*/
ValueSpecification getArgument(String name, Type type);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.ValueSpecification} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Argument</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.ValueSpecification} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.ValueSpecification} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.ValueSpecification} to retrieve, or <code>null</code>.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.ValueSpecification} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.ValueSpecification} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getArguments()
* @generated
*/
ValueSpecification getArgument(String name, Type type, boolean ignoreCase,
EClass eClass, boolean createOnDemand);
/**
* Returns the value of the '<em><b>Signature</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The definition of the type or signature of the Message (depending on its kind). The associated named element is derived from the message end that constitutes the sending or receiving message event. If both a sending event and a receiving message event are present, the signature is obtained from the sending event.
* <!-- end-model-doc -->
* @return the value of the '<em>Signature</em>' reference.
* @see org.eclipse.uml2.uml.UMLPackage#getMessage_Signature()
* @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
NamedElement getSignature();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the sending MessageEvent and the receiving MessageEvent of the same Message are on the same Lifeline, the sending MessageEvent must be ordered before the receiving MessageEvent.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSendingReceivingMessageEvent(DiagnosticChain diagnostics,
Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The signature must either refer an Operation (in which case messageSort is either synchCall or asynchCall) 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.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSignatureReferTo(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* In the case when the Message signature is an Operation, the arguments of the Message must correspond to the 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.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSignatureIsOperation(DiagnosticChain diagnostics,
Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* 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 Arguement is of the same Class or a specialization of that of the Attribute.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSignatureIsSignal(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* 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
*
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateArguments(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Messages cannot cross bounderies of CombinedFragments or their operands.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateCannotCrossBoundaries(DiagnosticChain diagnostics,
Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the MessageEnds are both OccurrenceSpecifications then the connector must go between the Parts represented by the Lifelines of the two MessageEnds.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateOccurrenceSpecifications(DiagnosticChain diagnostics,
Map context);
} // Message