org.eclipse.uml2.uml
Interface InteractionUse

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, InteractionFragment, NamedElement, org.eclipse.emf.common.notify.Notifier
All Known Subinterfaces:
PartDecomposition

public interface InteractionUse
extends InteractionFragment

A representation of the model object 'Interaction Use'. An InteractionUse refers to an Interaction. The InteractionUse is a shorthand for copying the contents of the referenced Interaction where the InteractionUse is. To be accurate the copying must take into account substituting parameters with arguments and connect the formal Gates with the actual ones.

From package UML::Interactions.

The following features are supported:

See Also:
UMLPackage.getInteractionUse()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 Gate createActualGate(java.lang.String name)
          Creates a new Gate, with the specified 'Name', and appends it to the 'Actual Gate' containment reference list
 ValueSpecification createArgument(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new ValueSpecification, with the specified 'Name', and 'Type', and appends it to the 'Argument' containment reference list
 ValueSpecification createReturnValue(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Return Value' containment reference
 Gate getActualGate(java.lang.String name)
          Retrieves the first Gate with the specified 'Name' from the 'Actual Gate' containment reference list
 Gate getActualGate(java.lang.String name, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first Gate with the specified 'Name' from the 'Actual Gate' containment reference list
 org.eclipse.emf.common.util.EList<Gate> getActualGates()
          Returns the value of the 'Actual Gate' containment reference list.
 ValueSpecification getArgument(java.lang.String name, Type type)
          Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list
 ValueSpecification getArgument(java.lang.String name, Type type, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list
 org.eclipse.emf.common.util.EList<ValueSpecification> getArguments()
          Returns the value of the 'Argument' containment reference list.
 Interaction getRefersTo()
          Returns the value of the 'Refers To' reference
 ValueSpecification getReturnValue()
          Returns the value of the 'Return Value' containment reference.
 Property getReturnValueRecipient()
          Returns the value of the 'Return Value Recipient' reference
 void setRefersTo(Interaction value)
          Sets the value of the 'Refers To' reference
 void setReturnValue(ValueSpecification value)
          Sets the value of the 'Return Value' containment reference
 void setReturnValueRecipient(Property value)
          Sets the value of the 'Return Value Recipient' reference
 boolean validateAllLifelines(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The InteractionUse must cover all Lifelines of the enclosing Interaction that are common with the lifelines covered by the referred Interaction.
 boolean validateArgumentsAreConstants(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The arguments must only be constants, parameters of the enclosing Interaction or attributes of the classifier owning the enclosing Interaction.
 boolean validateArgumentsCorrespondToParameters(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The arguments of the InteractionUse must correspond to parameters of the referred Interaction.
 boolean validateGatesMatch(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Actual Gates of the InteractionUse must match Formal Gates of the referred Interaction.
 boolean validateReturnValueRecipientCoverage(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The returnValueRecipient must be a Property of a ConnectableElement that is represented by a Lifeline covered by this InteractionUse.
 boolean validateReturnValueTypeRecipientCorrespondence(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The type of the returnValue must correspond to the type of the returnValueRecipient.
 
Methods inherited from interface org.eclipse.uml2.uml.InteractionFragment
createGeneralOrdering, getCovered, getCovered, getCovereds, getEnclosingInteraction, getEnclosingOperand, getGeneralOrdering, getGeneralOrdering, getGeneralOrderings, setEnclosingInteraction, setEnclosingOperand
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getRefersTo

Interaction getRefersTo()
Returns the value of the 'Refers To' reference. Refers to the Interaction that defines its meaning.

From package UML::Interactions.

Returns:
the value of the 'Refers To' reference.
See Also:
setRefersTo(Interaction), UMLPackage.getInteractionUse_RefersTo()

setRefersTo

void setRefersTo(Interaction value)
Sets the value of the 'Refers To' reference.

Parameters:
value - the new value of the 'Refers To' reference.
See Also:
getRefersTo()

getReturnValue

ValueSpecification getReturnValue()
Returns the value of the 'Return Value' containment reference.

This feature subsets the following features:

The value of the executed Interaction.

From package UML::Interactions.

Returns:
the value of the 'Return Value' containment reference.
See Also:
setReturnValue(ValueSpecification), UMLPackage.getInteractionUse_ReturnValue()

setReturnValue

void setReturnValue(ValueSpecification value)
Sets the value of the 'Return Value' containment reference.

Parameters:
value - the new value of the 'Return Value' containment reference.
See Also:
getReturnValue()

createReturnValue

ValueSpecification createReturnValue(java.lang.String name,
                                     Type type,
                                     org.eclipse.emf.ecore.EClass eClass)
Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Return Value' containment reference.

Parameters:
name - The 'Name' for the new ValueSpecification, or null.
type - The 'Type' for the new ValueSpecification, or null.
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getReturnValue()

getReturnValueRecipient

Property getReturnValueRecipient()
Returns the value of the 'Return Value Recipient' reference. The recipient of the return value.

From package UML::Interactions.

Returns:
the value of the 'Return Value Recipient' reference.
See Also:
setReturnValueRecipient(Property), UMLPackage.getInteractionUse_ReturnValueRecipient()

setReturnValueRecipient

void setReturnValueRecipient(Property value)
Sets the value of the 'Return Value Recipient' reference.

Parameters:
value - the new value of the 'Return Value Recipient' reference.
See Also:
getReturnValueRecipient()

getActualGates

org.eclipse.emf.common.util.EList<Gate> getActualGates()
Returns the value of the 'Actual Gate' containment reference list. The list contents are of type Gate.

This feature subsets the following features:

The actual gates of the InteractionUse.

From package UML::Interactions.

Returns:
the value of the 'Actual Gate' containment reference list.
See Also:
UMLPackage.getInteractionUse_ActualGate()

createActualGate

Gate createActualGate(java.lang.String name)
Creates a new Gate, with the specified 'Name', and appends it to the 'Actual Gate' containment reference list.

Parameters:
name - The 'Name' for the new Gate, or null.
Returns:
The new Gate.
See Also:
getActualGates()

getActualGate

Gate getActualGate(java.lang.String name)
Retrieves the first Gate with the specified 'Name' from the 'Actual Gate' containment reference list.

Parameters:
name - The 'Name' of the Gate to retrieve, or null.
Returns:
The first Gate with the specified 'Name', or null.
See Also:
getActualGates()

getActualGate

Gate getActualGate(java.lang.String name,
                   boolean ignoreCase,
                   boolean createOnDemand)
Retrieves the first Gate with the specified 'Name' from the 'Actual Gate' containment reference list.

Parameters:
name - The 'Name' of the Gate to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a Gate on demand if not found.
Returns:
The first Gate with the specified 'Name', or null.
See Also:
getActualGates()

getArguments

org.eclipse.emf.common.util.EList<ValueSpecification> getArguments()
Returns the value of the 'Argument' containment reference list. The list contents are of type ValueSpecification.

This feature subsets the following features:

The actual arguments of the Interaction.

From package UML::Interactions.

Returns:
the value of the 'Argument' containment reference list.
See Also:
UMLPackage.getInteractionUse_Argument()

createArgument

ValueSpecification createArgument(java.lang.String name,
                                  Type type,
                                  org.eclipse.emf.ecore.EClass eClass)
Creates a new ValueSpecification, with the specified 'Name', and 'Type', and appends it to the 'Argument' containment reference list.

Parameters:
name - The 'Name' for the new ValueSpecification, or null.
type - The 'Type' for the new ValueSpecification, or null.
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getArguments()

getArgument

ValueSpecification getArgument(java.lang.String name,
                               Type type)
Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list.

Parameters:
name - The 'Name' of the ValueSpecification to retrieve, or null.
type - The 'Type' of the ValueSpecification to retrieve, or null.
Returns:
The first ValueSpecification with the specified 'Name', and 'Type', or null.
See Also:
getArguments()

getArgument

ValueSpecification getArgument(java.lang.String name,
                               Type type,
                               boolean ignoreCase,
                               org.eclipse.emf.ecore.EClass eClass,
                               boolean createOnDemand)
Retrieves the first ValueSpecification with the specified 'Name', and 'Type' from the 'Argument' containment reference list.

Parameters:
name - The 'Name' of the ValueSpecification to retrieve, or null.
type - The 'Type' of the ValueSpecification to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the ValueSpecification to retrieve, or null.
createOnDemand - Whether to create a ValueSpecification on demand if not found.
Returns:
The first ValueSpecification with the specified 'Name', and 'Type', or null.
See Also:
getArguments()

validateGatesMatch

boolean validateGatesMatch(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                           java.util.Map<java.lang.Object,java.lang.Object> context)
Actual Gates of the InteractionUse must match Formal Gates of the referred Interaction. Gates match when their names are equal and their messages correspond. actualGate->notEmpty() implies refersTo.formalGate->forAll( fg : Gate | self.actualGate->select(matches(fg))->size()=1) and self.actualGate->forAll(ag : Gate | refersTo.formalGate->select(matches(ag))->size()=1)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateAllLifelines

boolean validateAllLifelines(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)
The InteractionUse must cover all Lifelines of the enclosing Interaction that are common with the lifelines covered by the referred Interaction. Lifelines are common if they have the same selector and represents associationEnd values. let parentInteraction : Set(Interaction) = enclosingInteraction->asSet()-> union(enclosingOperand.combinedFragment->closure(enclosingOperand.combinedFragment)-> collect(enclosingInteraction).oclAsType(Interaction)->asSet()) in parentInteraction->size()=1 and let refInteraction : Interaction = refersTo in parentInteraction.covered-> forAll(intLifeline : Lifeline | refInteraction.covered-> forAll( refLifeline : Lifeline | refLifeline.represents = intLifeline.represents and ( ( refLifeline.selector.oclIsKindOf(LiteralString) implies intLifeline.selector.oclIsKindOf(LiteralString) and refLifeline.selector.oclAsType(LiteralString).value = intLifeline.selector.oclAsType(LiteralString).value ) and ( refLifeline.selector.oclIsKindOf(LiteralInteger) implies intLifeline.selector.oclIsKindOf(LiteralInteger) and refLifeline.selector.oclAsType(LiteralInteger).value = intLifeline.selector.oclAsType(LiteralInteger).value ) ) implies self.covered->asSet()->includes(intLifeline)))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateArgumentsCorrespondToParameters

boolean validateArgumentsCorrespondToParameters(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                java.util.Map<java.lang.Object,java.lang.Object> context)
The arguments of the InteractionUse must correspond to parameters of the referred Interaction.

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateReturnValueTypeRecipientCorrespondence

boolean validateReturnValueTypeRecipientCorrespondence(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                       java.util.Map<java.lang.Object,java.lang.Object> context)
The type of the returnValue must correspond to the type of the returnValueRecipient. returnValue.type->asSequence()->notEmpty() implies returnValue.type->asSequence()->first() = returnValueRecipient.type->asSequence()->first()

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateArgumentsAreConstants

boolean validateArgumentsAreConstants(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                      java.util.Map<java.lang.Object,java.lang.Object> context)
The arguments must only be constants, parameters of the enclosing Interaction or attributes of the classifier owning the enclosing Interaction.

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateReturnValueRecipientCoverage

boolean validateReturnValueRecipientCoverage(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                             java.util.Map<java.lang.Object,java.lang.Object> context)
The returnValueRecipient must be a Property of a ConnectableElement that is represented by a Lifeline covered by this InteractionUse. returnValueRecipient->asSet()->notEmpty() implies let covCE : Set(ConnectableElement) = covered.represents->asSet() in covCE->notEmpty() and let classes:Set(Classifier) = covCE.type.oclIsKindOf(Classifier).oclAsType(Classifier)->asSet() in let allProps : Set(Property) = classes.attribute->union(classes.allParents().attribute)->asSet() in allProps->includes(returnValueRecipient)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.