blob: b0a99ca813945dcfbffacca35deae5a39bb495ce [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.9 2006/12/14 15:49:27 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 interaction use refers to an interaction. The interaction use is a shorthand for copying the contents of the referenced interaction where the interaction use is. To be accurate the copying must take into account substituting parameters with arguments and connect the formal gates with the actual ones.
* <!-- 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="true" ordered="false"
* @generated
*/
EList<Gate> getActualGates();
/**
* Creates a new {@link org.eclipse.uml2.uml.Gate}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Actual Gate</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.Gate}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.Gate}.
* @see #getActualGates()
* @generated
*/
Gate createActualGate(String name);
/**
* Retrieves the first {@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, or <code>null</code>.
* @return The first {@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);
/**
* Retrieves the first {@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, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.Gate} on demand if not found.
* @return The first {@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, boolean ignoreCase, boolean createOnDemand);
/**
* 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="true"
* @generated
*/
EList<Action> getArguments();
/**
* Creates a new {@link org.eclipse.uml2.uml.Action}, with the specified '<em><b>Name</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.Action}, or <code>null</code>.
* @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(String name, EClass eClass);
/**
* Retrieves the first {@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, or <code>null</code>.
* @return The first {@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);
/**
* Retrieves the first {@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, 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.Action} to retrieve, or <code>null</code>.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.Action} on demand if not found.
* @return The first {@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, boolean ignoreCase, EClass eClass,
boolean createOnDemand);
/**
* <!-- 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<Object, Object> 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<Object, Object> 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<Object, Object> 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<Object, Object> context);
} // InteractionUse