blob: a6cf937f23c93cb6ac2afcb120a4fef0e3b03112 [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: LinkEndCreationData.java,v 1.6 2006/12/14 15:49:28 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 -->
* A link end creation data is not an action. It is an element that identifies links. It identifies one end of a link to be created by a create link action.
* <!-- 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.
* The default value is <code>"false"</code>.
* <!-- 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 default="false" 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<Object, Object> 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<Object, Object> context);
} // LinkEndCreationData