blob: cb1ef6417344343983e6dd5f45ad8eca5d09a1df [file] [log] [blame]
/*
* Copyright (c) 2005 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: LinkEndCreationData.java,v 1.2 2005/12/12 16:58:34 khussey Exp $
*/
package org.eclipse.uml2.uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Link End Creation Data</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* This class is required when using CreateLinkAction, to specify insertion points for ordered ends and for replacing all links at end. A link cannot be passed as a runtime value to or from an action. Instead, a link is identified by its end objects and qualifier values, as required. This requires more than one piece of data, namely, the statically-specified end in the user model, the object on the end, and the qualifier values for that end. These pieces are brought together around LinkEndData. Each association end is identified separately with an instance of the LinkEndData class.
*
*
*
* Qualifier values are used in CompleteActions to identify links to create.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.LinkEndCreationData#isReplaceAll <em>Is Replace All</em>}</li>
* <li>{@link org.eclipse.uml2.uml.LinkEndCreationData#getInsertAt <em>Insert At</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getLinkEndCreationData()
* @model
* @generated
*/
public interface LinkEndCreationData
extends LinkEndData {
/**
* Returns the value of the '<em><b>Is Replace All</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Specifies whether the existing links emanating from the object on this end should be destroyed before creating a new link.
* <!-- end-model-doc -->
* @return the value of the '<em>Is Replace All</em>' attribute.
* @see #setIsReplaceAll(boolean)
* @see org.eclipse.uml2.uml.UMLPackage#getLinkEndCreationData_IsReplaceAll()
* @model dataType="org.eclipse.uml2.uml.Boolean" required="true" ordered="false"
* @generated
*/
boolean isReplaceAll();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.LinkEndCreationData#isReplaceAll <em>Is Replace All</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Replace All</em>' attribute.
* @see #isReplaceAll()
* @generated
*/
void setIsReplaceAll(boolean value);
/**
* Returns the value of the '<em><b>Insert At</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Specifies where the new link should be inserted for ordered association ends, or where an existing link should be moved to. The type of the input is UnlimitedNatural, but the input cannot be zero. This pin is omitted for association ends that are not ordered.
* <!-- end-model-doc -->
* @return the value of the '<em>Insert At</em>' reference.
* @see #setInsertAt(InputPin)
* @see org.eclipse.uml2.uml.UMLPackage#getLinkEndCreationData_InsertAt()
* @model ordered="false"
* @generated
*/
InputPin getInsertAt();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.LinkEndCreationData#getInsertAt <em>Insert At</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Insert At</em>' reference.
* @see #getInsertAt()
* @generated
*/
void setInsertAt(InputPin value);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* LinkEndCreationData can only be end data for CreateLinkAction or one of its specializations.
* self.LinkAction.oclIsKindOf(CreateLinkAction)
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateCreateLinkAction(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Link end creation data for ordered association ends must have a single input pin for the insertion point with type UnlimitedNatural and multiplicity of 1..1, otherwise the action has no input pin for the insertion point.
* let insertAtPins : Collection = self.insertAt in
* if self.end.ordering = #unordered
* then insertAtPins->size() = 0
* else let insertAtPin : InputPin = insertAts->asSequence()->first() in
* insertAtPins->size() = 1
* and insertAtPin.type = UnlimitedNatural
* and insertAtPin.multiplicity.is(1,1))
* endif
*
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSingleInputPin(DiagnosticChain diagnostics, Map context);
} // LinkEndCreationData