blob: 2c8c81adfc8d512d54831f4602ace3bb54e9fb9e [file] [log] [blame]
/*
* Copyright (c) 2005, 2014 IBM Corporation, Embarcadero Technologies, 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 (Embarcadero Technologies) - 205188
* Kenn Hussey (CEA) - 327039, 351774, 418466
* Christian W. Damus (CEA) - 251963
*
*/
package org.eclipse.uml2.uml;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Action</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* An Action is the fundamental unit of executable functionality. The execution of an Action represents some transformation or processing in the modeled system. Actions provide the ExecutableNodes within Activities and may also be used within Interactions.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.Action#getContext <em>Context</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Action#getInputs <em>Input</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Action#isLocallyReentrant <em>Is Locally Reentrant</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Action#getLocalPostconditions <em>Local Postcondition</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Action#getLocalPreconditions <em>Local Precondition</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Action#getOutputs <em>Output</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getAction()
* @model abstract="true"
* @generated
*/
public interface Action
extends ExecutableNode {
/**
* Returns the value of the '<em><b>Output</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.OutputPin}.
* <p>
* This feature subsets the following features:
* <ul>
* <li>'{@link org.eclipse.uml2.uml.Element#getOwnedElements() <em>Owned Element</em>}'</li>
* </ul>
* </p>
* This feature is a derived union.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The ordered set of OutputPins representing outputs from the Action.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Output</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getAction_Output()
* @model transient="true" changeable="false" volatile="true" derived="true"
* @generated
*/
EList<OutputPin> getOutputs();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Output</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.OutputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.OutputPin} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getOutputs()
* @generated
*/
OutputPin getOutput(String name, Type type);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Output</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.OutputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.OutputPin} 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.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getOutputs()
* @generated
*/
OutputPin getOutput(String name, Type type, boolean ignoreCase);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Return this Action and all Actions contained directly or indirectly in it. By default only the Action itself is returned, but the operation is overridden for StructuredActivityNodes.
* result = (self->asSet())
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @model ordered="false"
* @generated
*/
EList<Action> allActions();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Returns all the ActivityNodes directly or indirectly owned by this Action. This includes at least all the Pins of the Action.
* result = (input.oclAsType(Pin)->asSet()->union(output->asSet()))
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @model ordered="false"
* @generated
*/
EList<ActivityNode> allOwnedNodes();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* result = (if inStructuredNode<>null then inStructuredNode.containingBehavior()
* else if activity<>null then activity
* else interaction
* endif
* endif
* )
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @model ordered="false"
* @generated
*/
Behavior containingBehavior();
/**
* Returns the value of the '<em><b>Input</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.InputPin}.
* <p>
* This feature subsets the following features:
* <ul>
* <li>'{@link org.eclipse.uml2.uml.Element#getOwnedElements() <em>Owned Element</em>}'</li>
* </ul>
* </p>
* This feature is a derived union.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The ordered set of InputPins representing the inputs to the Action.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Input</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getAction_Input()
* @model transient="true" changeable="false" volatile="true" derived="true"
* @generated
*/
EList<InputPin> getInputs();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Input</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.InputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.InputPin} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getInputs()
* @generated
*/
InputPin getInput(String name, Type type);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Input</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.InputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.InputPin} 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.InputPin} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getInputs()
* @generated
*/
InputPin getInput(String name, Type type, boolean ignoreCase, EClass eClass);
/**
* Returns the value of the '<em><b>Is Locally Reentrant</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If true, the Action can begin a new, concurrent execution, even if there is already another execution of the Action ongoing. If false, the Action cannot begin a new execution until any previous execution has completed.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Is Locally Reentrant</em>' attribute.
* @see #setIsLocallyReentrant(boolean)
* @see org.eclipse.uml2.uml.UMLPackage#getAction_IsLocallyReentrant()
* @model default="false" dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false"
* @generated
*/
boolean isLocallyReentrant();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Action#isLocallyReentrant <em>Is Locally Reentrant</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Locally Reentrant</em>' attribute.
* @see #isLocallyReentrant()
* @generated
*/
void setIsLocallyReentrant(boolean value);
/**
* Returns the value of the '<em><b>Context</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The context Classifier of the Behavior that contains this Action, or the Behavior itself if it has no context.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Context</em>' reference.
* @see org.eclipse.uml2.uml.UMLPackage#getAction_Context()
* @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
Classifier getContext();
/**
* Returns the value of the '<em><b>Local Precondition</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Constraint}.
* <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 Constraint that must be satisfied when execution of the Action is started.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Local Precondition</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getAction_LocalPrecondition()
* @model containment="true" resolveProxies="true" ordered="false"
* @generated
*/
EList<Constraint> getLocalPreconditions();
/**
* Creates a new {@link org.eclipse.uml2.uml.Constraint}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Local Precondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.Constraint}, or <code>null</code>.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.Constraint} to create.
* @return The new {@link org.eclipse.uml2.uml.Constraint}.
* @see #getLocalPreconditions()
* @generated
*/
Constraint createLocalPrecondition(String name, EClass eClass);
/**
* Creates a new {@link org.eclipse.uml2.uml.Constraint}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Local Precondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.Constraint}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.Constraint}.
* @see #getLocalPreconditions()
* @generated
*/
Constraint createLocalPrecondition(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>' from the '<em><b>Local Precondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Constraint} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getLocalPreconditions()
* @generated
*/
Constraint getLocalPrecondition(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>' from the '<em><b>Local Precondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Constraint} 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.Constraint} to retrieve, or <code>null</code>.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.Constraint} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getLocalPreconditions()
* @generated
*/
Constraint getLocalPrecondition(String name, boolean ignoreCase,
EClass eClass, boolean createOnDemand);
/**
* Returns the value of the '<em><b>Local Postcondition</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Constraint}.
* <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 Constraint that must be satisfied when execution of the Action is completed.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Local Postcondition</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getAction_LocalPostcondition()
* @model containment="true" resolveProxies="true" ordered="false"
* @generated
*/
EList<Constraint> getLocalPostconditions();
/**
* Creates a new {@link org.eclipse.uml2.uml.Constraint}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Local Postcondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.Constraint}, or <code>null</code>.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.Constraint} to create.
* @return The new {@link org.eclipse.uml2.uml.Constraint}.
* @see #getLocalPostconditions()
* @generated
*/
Constraint createLocalPostcondition(String name, EClass eClass);
/**
* Creates a new {@link org.eclipse.uml2.uml.Constraint}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Local Postcondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.Constraint}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.Constraint}.
* @see #getLocalPostconditions()
* @generated
*/
Constraint createLocalPostcondition(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>' from the '<em><b>Local Postcondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Constraint} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getLocalPostconditions()
* @generated
*/
Constraint getLocalPostcondition(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>' from the '<em><b>Local Postcondition</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Constraint} 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.Constraint} to retrieve, or <code>null</code>.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.Constraint} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.Constraint} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getLocalPostconditions()
* @generated
*/
Constraint getLocalPostcondition(String name, boolean ignoreCase,
EClass eClass, boolean createOnDemand);
} // Action