blob: 3a8c2d21a45d077421b35c585eeb6432010e4db3 [file] [log] [blame]
/*
* Copyright (c) 2005, 2011 IBM Corporation, CEA, 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
* Kenn Hussey (CEA) - 327039
*
* $Id: Connector.java,v 1.17 2007/10/23 15:54:21 jbruck 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>Connector</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A delegation connector is a connector that links the external contract of a component (as specified by its ports) to the realization of that behavior. It represents the forwarding of events (operation requests and events): a signal that arrives at a port that has a delegation connector to one or more parts or ports on parts will be passed on to those targets for handling. An assembly connector is a connector between two or more parts or ports on parts that defines that one or more parts provide the services that other parts use.
* Specifies a link that enables communication between two or more instances. This link may be an instance of an association, or it may represent the possibility of the instances being able to communicate because their identities are known by virtue of being passed in as parameters, held in variables or slots, or because the communicating instances are the same instance. The link may be realized by something as simple as a pointer or by something as complex as a network connection. In contrast to associations, which specify links between any instance of the associated classifiers, connectors specify links between instances playing the connected parts only.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.Connector#getContracts <em>Contract</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Connector#getEnds <em>End</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Connector#getKind <em>Kind</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Connector#getRedefinedConnectors <em>Redefined Connector</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Connector#getType <em>Type</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getConnector()
* @model
* @generated
*/
public interface Connector
extends Feature {
/**
* Returns the value of the '<em><b>Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An optional association that specifies the link corresponding to this connector.
* <!-- end-model-doc -->
* @return the value of the '<em>Type</em>' reference.
* @see #setType(Association)
* @see org.eclipse.uml2.uml.UMLPackage#getConnector_Type()
* @model ordered="false"
* @generated
*/
Association getType();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Connector#getType <em>Type</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Type</em>' reference.
* @see #getType()
* @generated
*/
void setType(Association value);
/**
* Returns the value of the '<em><b>Redefined Connector</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Connector}.
* <p>
* This feature subsets the following features:
* <ul>
* <li>'{@link org.eclipse.uml2.uml.RedefinableElement#getRedefinedElements() <em>Redefined Element</em>}'</li>
* </ul>
* </p>
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A connector may be redefined when its containing classifier is specialized. The redefining connector may have a type that specializes the type of the redefined connector. The types of the connector ends of the redefining connector may specialize the types of the connector ends of the redefined connector. The properties of the connector ends of the redefining connector may be replaced.
* <!-- end-model-doc -->
* @return the value of the '<em>Redefined Connector</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getConnector_RedefinedConnector()
* @model ordered="false"
* @generated
*/
EList<Connector> getRedefinedConnectors();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Connector} with the specified '<em><b>Name</b></em>' from the '<em><b>Redefined Connector</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.Connector} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Connector} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRedefinedConnectors()
* @generated
*/
Connector getRedefinedConnector(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Connector} with the specified '<em><b>Name</b></em>' from the '<em><b>Redefined Connector</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.Connector} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @return The first {@link org.eclipse.uml2.uml.Connector} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRedefinedConnectors()
* @generated
*/
Connector getRedefinedConnector(String name, boolean ignoreCase);
/**
* Returns the value of the '<em><b>End</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.ConnectorEnd}.
* <p>
* This feature subsets the following features:
* <ul>
* <li>'{@link org.eclipse.uml2.uml.Element#getOwnedElements() <em>Owned Element</em>}'</li>
* </ul>
* </p>
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A connector consists of at least two connector ends, each representing the participation of instances of the classifiers typing the connectable elements attached to this end. The set of connector ends is ordered.
* <!-- end-model-doc -->
* @return the value of the '<em>End</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getConnector_End()
* @model containment="true" resolveProxies="true" lower="2"
* @generated
*/
EList<ConnectorEnd> getEnds();
/**
* Creates a new {@link org.eclipse.uml2.uml.ConnectorEnd} and appends it to the '<em><b>End</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return The new {@link org.eclipse.uml2.uml.ConnectorEnd}.
* @see #getEnds()
* @generated
*/
ConnectorEnd createEnd();
/**
* Returns the value of the '<em><b>Kind</b></em>' attribute.
* The literals are from the enumeration {@link org.eclipse.uml2.uml.ConnectorKind}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Indicates the kind of connector. This is derived: a connector with one or more ends connected to a Port which is not on a Part and which is not a behavior port is a delegation; otherwise it is an assembly.
* <!-- end-model-doc -->
* @return the value of the '<em>Kind</em>' attribute.
* @see org.eclipse.uml2.uml.ConnectorKind
* @see org.eclipse.uml2.uml.UMLPackage#getConnector_Kind()
* @model required="true" transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
ConnectorKind getKind();
/**
* Returns the value of the '<em><b>Contract</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Behavior}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The set of Behaviors that specify the valid interaction patterns across the connector.
* <!-- end-model-doc -->
* @return the value of the '<em>Contract</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getConnector_Contract()
* @model ordered="false"
* @generated
*/
EList<Behavior> getContracts();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Behavior} with the specified '<em><b>Name</b></em>' from the '<em><b>Contract</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.Behavior} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Behavior} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getContracts()
* @generated
*/
Behavior getContract(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Behavior} with the specified '<em><b>Name</b></em>' from the '<em><b>Contract</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.Behavior} 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.Behavior} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Behavior} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getContracts()
* @generated
*/
Behavior getContract(String name, boolean ignoreCase, EClass eClass);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The types of the connectable elements that the ends of a connector are attached to must conform to the types of the association ends of the association that types the connector, if any.
* true
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateTypes(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The connectable elements attached to the ends of a connector must be compatible.
* true
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateCompatible(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The ConnectableElements attached as roles to each ConnectorEnd owned by a Connector must be roles of the Classifier that owned the Connector, or they must be ports of such roles.
* true
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateRoles(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Each feature of each of the required interfaces of each Port or Part at the end of a connector must have at least one compatible feature among the features of the provided interfaces of Ports or Parts at the other ends, where the required set of (interface) features of a delegating port from the context of the delegating connector is the set of features that exist in the port's provided interfaces, and the provided set of (interface) features of a delegating port from the context of the delegating connector is the set of features that exist in the port's required interfaces.
* true
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateBetweenInterfacesPorts(DiagnosticChain diagnostics,
Map<Object, Object> context);
} // Connector