blob: bc37a54ac15a034a6c39cad2ff491fe3bf0e575c [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: Connector.java,v 1.14 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>Connector</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* 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.
* A delegation connector is a connector that links the external contract of a component (as specified by its ports) to the internal realization of that behavior by the component's parts. It represents the forwarding of signals (operation requests and events): a signal that arrives at a port that has a delegation connector to a part or to another port will be passed on to that target for handling.
* An assembly connector is a connector between two components that defines that one component provides the services that another component requires. An assembly connector is a connector that is defined from a required interface or port to a provided interface or port.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.Connector#getType <em>Type</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Connector#getRedefinedConnectors <em>Redefined Connector</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#getContracts <em>Contract</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}.
* <!-- 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 type="org.eclipse.uml2.uml.Connector" 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}.
* <!-- 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 type="org.eclipse.uml2.uml.ConnectorEnd" 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.
* <!-- end-model-doc -->
* @return the value of the '<em>Kind</em>' attribute.
* @see org.eclipse.uml2.uml.ConnectorKind
* @see #isSetKind()
* @see #unsetKind()
* @see #setKind(ConnectorKind)
* @see org.eclipse.uml2.uml.UMLPackage#getConnector_Kind()
* @model unsettable="true" ordered="false"
* @generated
*/
ConnectorKind getKind();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Connector#getKind <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Kind</em>' attribute.
* @see org.eclipse.uml2.uml.ConnectorKind
* @see #isSetKind()
* @see #unsetKind()
* @see #getKind()
* @generated
*/
void setKind(ConnectorKind value);
/**
* Unsets the value of the '{@link org.eclipse.uml2.uml.Connector#getKind <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetKind()
* @see #getKind()
* @see #setKind(ConnectorKind)
* @generated
*/
void unsetKind();
/**
* Returns whether the value of the '{@link org.eclipse.uml2.uml.Connector#getKind <em>Kind</em>}' attribute is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Kind</em>' attribute is set.
* @see #unsetKind()
* @see #getKind()
* @see #setKind(ConnectorKind)
* @generated
*/
boolean isSetKind();
/**
* 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 type="org.eclipse.uml2.uml.Behavior" 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
* <!-- 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
* <!-- 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
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateRoles(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A delegation connector must only be defined between used Interfaces or Ports of the same kind, e.g. between two provided Ports or between two required Ports.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateBetweenInterfacesPorts(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If a delegation connector is defined between a used Interface or Port and an internal Part Classifier, then that Classifier must have an 'implements' relationship to the Interface type of that Port.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateBetweenInterfacePortImplements(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If a delegation connector is defined between a source Interface or Port and a target Interface or Port, then the target Interface must support a signature compatible subset of Operations of the source Interface or Port.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateBetweenInterfacePortSignature(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* In a complete model, if a source Port has delegation connectors to a set of delegated target Ports, then the union of the Interfaces of these target Ports must be signature compatible with the Interface that types the source Port.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateUnionSignatureCompatible(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An assembly connector must only be defined from a required Interface or Ports to a provided Interface or Port.
* true
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateAssemblyConnector(DiagnosticChain diagnostics,
Map<Object, Object> context);
} // Connector