org.eclipse.uml2.uml
Interface Port

All Superinterfaces:
ConnectableElement, DeploymentTarget, Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, Feature, MultiplicityElement, NamedElement, org.eclipse.emf.common.notify.Notifier, ParameterableElement, Property, RedefinableElement, StructuralFeature, TypedElement

public interface Port
extends Property

A representation of the model object 'Port'. A Port is a property of an EncapsulatedClassifier that specifies a distinct interaction point between that EncapsulatedClassifier and its environment or between the (behavior of the) EncapsulatedClassifier and its internal parts. Ports are connected to Properties of the EncapsulatedClassifier by Connectors through which requests can be made to invoke BehavioralFeatures. A Port may specify the services an EncapsulatedClassifier provides (offers) to its environment as well as the services that an EncapsulatedClassifier expects (requires) of its environment. A Port may have an associated ProtocolStateMachine.

From package UML::StructuredClassifiers.

The following features are supported:

See Also:
UMLPackage.getPort()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 org.eclipse.emf.common.util.EList<Interface> basicProvided()
          The union of the sets of Interfaces realized by the type of the Port and its supertypes, or directly the type of the Port if the Port is typed by an Interface.
 org.eclipse.emf.common.util.EList<Interface> basicRequired()
          The union of the sets of Interfaces used by the type of the Port and its supertypes.
 ProtocolStateMachine getProtocol()
          Returns the value of the 'Protocol' reference
 Interface getProvided(java.lang.String name)
          Retrieves the first Interface with the specified 'Name' from the 'Provided' reference list
 Interface getProvided(java.lang.String name, boolean ignoreCase)
          Retrieves the first Interface with the specified 'Name' from the 'Provided' reference list
 org.eclipse.emf.common.util.EList<Interface> getProvideds()
          Returns the value of the 'Provided' reference list.
 Port getRedefinedPort(java.lang.String name, Type type)
          Retrieves the first Port with the specified 'Name', and 'Type' from the 'Redefined Port' reference list
 Port getRedefinedPort(java.lang.String name, Type type, boolean ignoreCase)
          Retrieves the first Port with the specified 'Name', and 'Type' from the 'Redefined Port' reference list
 org.eclipse.emf.common.util.EList<Port> getRedefinedPorts()
          Returns the value of the 'Redefined Port' reference list.
 Interface getRequired(java.lang.String name)
          Retrieves the first Interface with the specified 'Name' from the 'Required' reference list
 Interface getRequired(java.lang.String name, boolean ignoreCase)
          Retrieves the first Interface with the specified 'Name' from the 'Required' reference list
 org.eclipse.emf.common.util.EList<Interface> getRequireds()
          Returns the value of the 'Required' reference list.
 boolean isBehavior()
          Returns the value of the 'Is Behavior' attribute.
 boolean isConjugated()
          Returns the value of the 'Is Conjugated' attribute.
 boolean isService()
          Returns the value of the 'Is Service' attribute.
 void setIsBehavior(boolean value)
          Sets the value of the 'Is Behavior' attribute
 void setIsConjugated(boolean value)
          Sets the value of the 'Is Conjugated' attribute
 void setIsService(boolean value)
          Sets the value of the 'Is Service' attribute
 void setProtocol(ProtocolStateMachine value)
          Sets the value of the 'Protocol' reference
 boolean validateDefaultValue(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A defaultValue for port cannot be specified when the type of the Port is an Interface.
 boolean validateEncapsulatedOwner(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          All Ports are owned by an EncapsulatedClassifier.
 boolean validatePortAggregation(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Port.aggregation must be composite.
 
Methods inherited from interface org.eclipse.uml2.uml.Property
createDefaultValue, createQualifier, createQualifier, getAggregation, getAssociation, getAssociationEnd, getClass_, getDatatype, getDefault, getDefaultValue, getInterface, getOpposite, getOtherEnd, getOwningAssociation, getQualifier, getQualifier, getQualifiers, getRedefinedProperties, getRedefinedProperty, getRedefinedProperty, getSubsettedProperties, getSubsettedProperty, getSubsettedProperty, isAttribute, isComposite, isDerived, isDerivedUnion, isID, isNavigable, setAggregation, setAssociation, setAssociationEnd, setBooleanDefaultValue, setDatatype, setDefault, setDefaultValue, setIntegerDefaultValue, setInterface, setIsComposite, setIsDerived, setIsDerivedUnion, setIsID, setIsNavigable, setNullDefaultValue, setOpposite, setOwningAssociation, setRealDefaultValue, setStringDefaultValue, setUnlimitedNaturalDefaultValue, subsettingContext, validateBindingToAttribute, validateDeploymentTarget, validateDerivedUnionIsDerived, validateDerivedUnionIsReadOnly, validateMultiplicityOfComposite, validateQualifiedIsAssociationEnd, validateRedefinedPropertyInherited, validateSubsettedPropertyNames, validateSubsettingContextConforms, validateSubsettingRules, validateTypeOfOppositeEnd
 
Methods inherited from interface org.eclipse.uml2.uml.StructuralFeature
isReadOnly, setIsReadOnly
 
Methods inherited from interface org.eclipse.uml2.uml.Feature
getFeaturingClassifier, getFeaturingClassifier, getFeaturingClassifiers, isStatic, setIsStatic
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateNonLeafRedefinition, validateRedefinitionConsistent, validateRedefinitionContextValid
 
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
 
Methods inherited from interface org.eclipse.uml2.uml.MultiplicityElement
compatibleWith, createLowerValue, createUpperValue, getLower, getLowerValue, getUpper, getUpperValue, includesMultiplicity, is, isMultivalued, isOrdered, isUnique, lowerBound, setIsOrdered, setIsUnique, setLower, setLowerValue, setUpper, setUpperValue, upperBound, validateLowerGe0, validateLowerIsInteger, validateUpperGeLower, validateUpperIsUnlimitedNatural, validateValueSpecificationConstant, validateValueSpecificationNoSideEffects
 
Methods inherited from interface org.eclipse.uml2.uml.ConnectableElement
getEnds
 
Methods inherited from interface org.eclipse.uml2.uml.TypedElement
getType, setType
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.DeploymentTarget
createDeployment, getDeployedElement, getDeployedElement, getDeployedElements, getDeployment, getDeployment, getDeployments
 

Method Detail

isBehavior

boolean isBehavior()
Returns the value of the 'Is Behavior' attribute. The default value is "false". Specifies whether requests arriving at this Port are sent to the classifier behavior of this EncapsulatedClassifier. Such a Port is referred to as a behavior Port. Any invocation of a BehavioralFeature targeted at a behavior Port will be handled by the instance of the owning EncapsulatedClassifier itself, rather than by any instances that it may contain.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Is Behavior' attribute.
See Also:
setIsBehavior(boolean), UMLPackage.getPort_IsBehavior()

setIsBehavior

void setIsBehavior(boolean value)
Sets the value of the 'Is Behavior' attribute.

Parameters:
value - the new value of the 'Is Behavior' attribute.
See Also:
isBehavior()

isConjugated

boolean isConjugated()
Returns the value of the 'Is Conjugated' attribute. The default value is "false". Specifies the way that the provided and required Interfaces are derived from the Port’s Type.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Is Conjugated' attribute.
See Also:
setIsConjugated(boolean), UMLPackage.getPort_IsConjugated()

setIsConjugated

void setIsConjugated(boolean value)
Sets the value of the 'Is Conjugated' attribute.

Parameters:
value - the new value of the 'Is Conjugated' attribute.
See Also:
isConjugated()

isService

boolean isService()
Returns the value of the 'Is Service' attribute. The default value is "true". If true, indicates that this Port is used to provide the published functionality of an EncapsulatedClassifier. If false, this Port is used to implement the EncapsulatedClassifier but is not part of the essential externally-visible functionality of the EncapsulatedClassifier and can, therefore, be altered or deleted along with the internal implementation of the EncapsulatedClassifier and other properties that are considered part of its implementation.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Is Service' attribute.
See Also:
setIsService(boolean), UMLPackage.getPort_IsService()

setIsService

void setIsService(boolean value)
Sets the value of the 'Is Service' attribute.

Parameters:
value - the new value of the 'Is Service' attribute.
See Also:
isService()

getRequireds

org.eclipse.emf.common.util.EList<Interface> getRequireds()
Returns the value of the 'Required' reference list. The list contents are of type Interface. The Interfaces specifying the set of Operations and Receptions that the EncapsulatedCassifier expects its environment to handle via this port. This association is derived according to the value of isConjugated. If isConjugated is false, required is derived as the union of the sets of Interfaces used by the type of the Port and its supertypes. If isConjugated is true, it is derived as the union of the sets of Interfaces realized by the type of the Port and its supertypes, or directly from the type of the Port if the Port is typed by an Interface.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Required' reference list.
See Also:
UMLPackage.getPort_Required()

getRequired

Interface getRequired(java.lang.String name)
Retrieves the first Interface with the specified 'Name' from the 'Required' reference list.

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

getRequired

Interface getRequired(java.lang.String name,
                      boolean ignoreCase)
Retrieves the first Interface with the specified 'Name' from the 'Required' reference list.

Parameters:
name - The 'Name' of the Interface to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first Interface with the specified 'Name', or null.
See Also:
getRequireds()

getRedefinedPorts

org.eclipse.emf.common.util.EList<Port> getRedefinedPorts()
Returns the value of the 'Redefined Port' reference list. The list contents are of type Port.

This feature subsets the following features:

A Port may be redefined when its containing EncapsulatedClassifier is specialized. The redefining Port may have additional Interfaces to those that are associated with the redefined Port or it may replace an Interface by one of its subtypes.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Redefined Port' reference list.
See Also:
UMLPackage.getPort_RedefinedPort()

getRedefinedPort

Port getRedefinedPort(java.lang.String name,
                      Type type)
Retrieves the first Port with the specified 'Name', and 'Type' from the 'Redefined Port' reference list.

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

getRedefinedPort

Port getRedefinedPort(java.lang.String name,
                      Type type,
                      boolean ignoreCase)
Retrieves the first Port with the specified 'Name', and 'Type' from the 'Redefined Port' reference list.

Parameters:
name - The 'Name' of the Port to retrieve, or null.
type - The 'Type' of the Port to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first Port with the specified 'Name', and 'Type', or null.
See Also:
getRedefinedPorts()

getProvideds

org.eclipse.emf.common.util.EList<Interface> getProvideds()
Returns the value of the 'Provided' reference list. The list contents are of type Interface. The Interfaces specifying the set of Operations and Receptions that the EncapsulatedCclassifier offers to its environment via this Port, and which it will handle either directly or by forwarding it to a part of its internal structure. This association is derived according to the value of isConjugated. If isConjugated is false, provided is derived as the union of the sets of Interfaces realized by the type of the port and its supertypes, or directly from the type of the Port if the Port is typed by an Interface. If isConjugated is true, it is derived as the union of the sets of Interfaces used by the type of the Port and its supertypes.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Provided' reference list.
See Also:
UMLPackage.getPort_Provided()

getProvided

Interface getProvided(java.lang.String name)
Retrieves the first Interface with the specified 'Name' from the 'Provided' reference list.

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

getProvided

Interface getProvided(java.lang.String name,
                      boolean ignoreCase)
Retrieves the first Interface with the specified 'Name' from the 'Provided' reference list.

Parameters:
name - The 'Name' of the Interface to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first Interface with the specified 'Name', or null.
See Also:
getProvideds()

getProtocol

ProtocolStateMachine getProtocol()
Returns the value of the 'Protocol' reference. An optional ProtocolStateMachine which describes valid interactions at this interaction point.

From package UML::StructuredClassifiers.

Returns:
the value of the 'Protocol' reference.
See Also:
setProtocol(ProtocolStateMachine), UMLPackage.getPort_Protocol()

setProtocol

void setProtocol(ProtocolStateMachine value)
Sets the value of the 'Protocol' reference.

Parameters:
value - the new value of the 'Protocol' reference.
See Also:
getProtocol()

validatePortAggregation

boolean validatePortAggregation(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)
Port.aggregation must be composite. aggregation = AggregationKind::composite

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

validateDefaultValue

boolean validateDefaultValue(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)
A defaultValue for port cannot be specified when the type of the Port is an Interface. type.oclIsKindOf(Interface) implies defaultValue->isEmpty()

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

validateEncapsulatedOwner

boolean validateEncapsulatedOwner(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
All Ports are owned by an EncapsulatedClassifier. owner = encapsulatedClassifier

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

basicProvided

org.eclipse.emf.common.util.EList<Interface> basicProvided()
The union of the sets of Interfaces realized by the type of the Port and its supertypes, or directly the type of the Port if the Port is typed by an Interface. result = (if type.oclIsKindOf(Interface) then type.oclAsType(Interface)->asSet() else type.oclAsType(Classifier).allRealizedInterfaces() endif)

From package UML::StructuredClassifiers.


basicRequired

org.eclipse.emf.common.util.EList<Interface> basicRequired()
The union of the sets of Interfaces used by the type of the Port and its supertypes. result = ( type.oclAsType(Classifier).allUsedInterfaces() )

From package UML::StructuredClassifiers.


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