blob: f0f925b89327eeef69dc4536490b1f78deea2de8 [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: InteractionUse.java,v 1.3 2006/01/11 18:13:44 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>Interaction Use</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* An InteractionUse refers to an Interaction. The InteractionUse is a shorthand for copying the contents of the referred Interaction where the InteractionUse is. To be accurate the copying must take into account substituting parameters with arguments and connect the formal gates with the actual ones.
*
*
*
* It is common to want to share portions of an interaction between several other interactions. An InteractionUse allows multiple interactions to reference an interaction that represents a common portion of their specification.
*
*
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.InteractionUse#getRefersTo <em>Refers To</em>}</li>
* <li>{@link org.eclipse.uml2.uml.InteractionUse#getActualGates <em>Actual Gate</em>}</li>
* <li>{@link org.eclipse.uml2.uml.InteractionUse#getArguments <em>Argument</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getInteractionUse()
* @model
* @generated
*/
public interface InteractionUse
extends InteractionFragment {
/**
* Returns the value of the '<em><b>Refers To</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Refers to the Interaction that defines its meaning
* <!-- end-model-doc -->
* @return the value of the '<em>Refers To</em>' reference.
* @see #setRefersTo(Interaction)
* @see org.eclipse.uml2.uml.UMLPackage#getInteractionUse_RefersTo()
* @model required="true" ordered="false"
* @generated
*/
Interaction getRefersTo();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.InteractionUse#getRefersTo <em>Refers To</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Refers To</em>' reference.
* @see #getRefersTo()
* @generated
*/
void setRefersTo(Interaction value);
/**
* Returns the value of the '<em><b>Actual Gate</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Gate}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The actual gates of the InteractionUse
* <!-- end-model-doc -->
* @return the value of the '<em>Actual Gate</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getInteractionUse_ActualGate()
* @model type="org.eclipse.uml2.uml.Gate" containment="true" resolveProxies="false" ordered="false"
* @generated
*/
EList getActualGates();
/**
* Creates a {@link org.eclipse.uml2.uml.Gate} and appends it to the '<em><b>Actual Gate</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return The new {@link org.eclipse.uml2.uml.Gate}.
* @see #getActualGates()
* @generated
*/
Gate createActualGate();
/**
* Retrieves the {@link org.eclipse.uml2.uml.Gate} with the specified '<em><b>Name</b></em>' from the '<em><b>Actual Gate</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.Gate} to retrieve.
* @return The {@link org.eclipse.uml2.uml.Gate} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getActualGates()
* @generated
*/
Gate getActualGate(String name);
/**
* Returns the value of the '<em><b>Argument</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Action}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The actual arguments of the Interaction
* <!-- end-model-doc -->
* @return the value of the '<em>Argument</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getInteractionUse_Argument()
* @model type="org.eclipse.uml2.uml.Action" containment="true" resolveProxies="false"
* @generated
*/
EList getArguments();
/**
* Creates a {@link org.eclipse.uml2.uml.Action} and appends it to the '<em><b>Argument</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.Action} to create.
* @return The new {@link org.eclipse.uml2.uml.Action}.
* @see #getArguments()
* @generated
*/
Action createArgument(EClass eClass);
/**
* Retrieves the {@link org.eclipse.uml2.uml.Action} with the specified '<em><b>Name</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.Action} to retrieve.
* @return The {@link org.eclipse.uml2.uml.Action} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getArguments()
* @generated
*/
Action getArgument(String name);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Actual Gates of the InteractionUse must match Formal Gates of the referred Interaction. Gates match when their names are equal.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateGatesMatch(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The InteractionUse must cover all Lifelines of the enclosing Interaction which appear within the referred Interaction.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateAllLifelines(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The arguments of the InteractionUse must correspond to parameters of the referred Interaction
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateArgumentsCorrespondToParameters(
DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The arguments must only be constants, parameters of the enclosing Interaction or attributes of the classifier owning the enclosing Interaction.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateArgumentsAreConstants(DiagnosticChain diagnostics,
Map context);
} // InteractionUse