blob: c0b26dd172829886efd670a7f56575f718331e07 [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: Lifeline.java,v 1.11 2006/06/07 21:39:13 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>Lifeline</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A lifeline represents an individual participant in the interaction. While parts and structural features may have multiplicity greater than 1, lifelines represent only one interacting entity.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.Lifeline#getRepresents <em>Represents</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Lifeline#getInteraction <em>Interaction</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Lifeline#getSelector <em>Selector</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Lifeline#getDecomposedAs <em>Decomposed As</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Lifeline#getCoveredBys <em>Covered By</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getLifeline()
* @model
* @generated
*/
public interface Lifeline
extends NamedElement {
/**
* Returns the value of the '<em><b>Represents</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* References the ConnectableElement within the classifier that contains the enclosing interaction.
* <!-- end-model-doc -->
* @return the value of the '<em>Represents</em>' reference.
* @see #setRepresents(ConnectableElement)
* @see org.eclipse.uml2.uml.UMLPackage#getLifeline_Represents()
* @model ordered="false"
* @generated
*/
ConnectableElement getRepresents();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#getRepresents <em>Represents</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Represents</em>' reference.
* @see #getRepresents()
* @generated
*/
void setRepresents(ConnectableElement 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#getLifelines <em>Lifeline</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* References the Interaction enclosing this Lifeline.
* <!-- end-model-doc -->
* @return the value of the '<em>Interaction</em>' container reference.
* @see #setInteraction(Interaction)
* @see org.eclipse.uml2.uml.UMLPackage#getLifeline_Interaction()
* @see org.eclipse.uml2.uml.Interaction#getLifelines
* @model opposite="lifeline" required="true" ordered="false"
* @generated
*/
Interaction getInteraction();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#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>Selector</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the referenced ConnectableElement is multivalued, then this specifies the specific individual part within that set.
* <!-- end-model-doc -->
* @return the value of the '<em>Selector</em>' containment reference.
* @see #setSelector(ValueSpecification)
* @see org.eclipse.uml2.uml.UMLPackage#getLifeline_Selector()
* @model containment="true" resolveProxies="true" ordered="false"
* @generated
*/
ValueSpecification getSelector();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#getSelector <em>Selector</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Selector</em>' containment reference.
* @see #getSelector()
* @generated
*/
void setSelector(ValueSpecification value);
/**
* Creates a new {@link org.eclipse.uml2.uml.ValueSpecification}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and sets the '<em><b>Selector</b></em>' containment reference.
* <!-- 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 #getSelector()
* @generated
*/
ValueSpecification createSelector(String name, Type type, EClass eClass);
/**
* Returns the value of the '<em><b>Decomposed As</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* References the Interaction that represents the decomposition.
* <!-- end-model-doc -->
* @return the value of the '<em>Decomposed As</em>' reference.
* @see #setDecomposedAs(PartDecomposition)
* @see org.eclipse.uml2.uml.UMLPackage#getLifeline_DecomposedAs()
* @model ordered="false"
* @generated
*/
PartDecomposition getDecomposedAs();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#getDecomposedAs <em>Decomposed As</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Decomposed As</em>' reference.
* @see #getDecomposedAs()
* @generated
*/
void setDecomposedAs(PartDecomposition value);
/**
* Returns the value of the '<em><b>Covered By</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.InteractionFragment}.
* It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.InteractionFragment#getCovereds <em>Covered</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* References the InteractionFragments in which this Lifeline takes part.
* <!-- end-model-doc -->
* @return the value of the '<em>Covered By</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getLifeline_CoveredBy()
* @see org.eclipse.uml2.uml.InteractionFragment#getCovereds
* @model type="org.eclipse.uml2.uml.InteractionFragment" opposite="covered" ordered="false"
* @generated
*/
EList getCoveredBys();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified '<em><b>Name</b></em>' from the '<em><b>Covered By</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.InteractionFragment} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getCoveredBys()
* @generated
*/
InteractionFragment getCoveredBy(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified '<em><b>Name</b></em>' from the '<em><b>Covered By</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.InteractionFragment} 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.InteractionFragment} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getCoveredBys()
* @generated
*/
InteractionFragment getCoveredBy(String name, boolean ignoreCase,
EClass eClass);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If two (or more) InteractionUses within one Interaction, refer to Interactions with 'common Lifelines,' those Lifelines must also appear in the Interaction with the InteractionUses. By common Lifelines we mean Lifelines with the same selector and represents associations.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateInteractionUsesShareLifeline(DiagnosticChain diagnostics,
Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The selector for a Lifeline must only be specified if the referenced Part is multivalued.
* (self.selector->isEmpty() implies not self.represents.isMultivalued()) or
* (not self.selector->isEmpty() implies self.represents.isMultivalued())
*
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSelectorSpecified(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The classifier containing the referenced ConnectableElement must be the same classifier, or an ancestor, of the classifier that contains the interaction enclosing this lifeline.
* if (represents->notEmpty()) then
* (if selector->notEmpty() then represents.isMultivalued() else not represents.isMultivalued())
*
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSameClassifier(DiagnosticChain diagnostics, Map context);
} // Lifeline