blob: ebe6de586391e79f1bb32245477762f1cfb9c8da [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: AcceptEventAction.java,v 1.14 2007/10/23 15:54:22 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;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Accept Event Action</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A accept event action is an action that waits for the occurrence of an event meeting specified conditions.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.AcceptEventAction#isUnmarshall <em>Is Unmarshall</em>}</li>
* <li>{@link org.eclipse.uml2.uml.AcceptEventAction#getResults <em>Result</em>}</li>
* <li>{@link org.eclipse.uml2.uml.AcceptEventAction#getTriggers <em>Trigger</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getAcceptEventAction()
* @model
* @generated
*/
public interface AcceptEventAction
extends Action {
/**
* Returns the value of the '<em><b>Is Unmarshall</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Indicates whether there is a single output pin for the event, or multiple output pins for attributes of the event.
* <!-- end-model-doc -->
* @return the value of the '<em>Is Unmarshall</em>' attribute.
* @see #setIsUnmarshall(boolean)
* @see org.eclipse.uml2.uml.UMLPackage#getAcceptEventAction_IsUnmarshall()
* @model default="false" dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false"
* @generated
*/
boolean isUnmarshall();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.AcceptEventAction#isUnmarshall <em>Is Unmarshall</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Unmarshall</em>' attribute.
* @see #isUnmarshall()
* @generated
*/
void setIsUnmarshall(boolean value);
/**
* Returns the value of the '<em><b>Result</b></em>' containment 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.Action#getOutputs() <em>Output</em>}'</li>
* </ul>
* </p>
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved.
* <!-- end-model-doc -->
* @return the value of the '<em>Result</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getAcceptEventAction_Result()
* @model containment="true" resolveProxies="true" ordered="false"
* @generated
*/
EList<OutputPin> getResults();
/**
* Creates a new {@link org.eclipse.uml2.uml.OutputPin}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and appends it to the '<em><b>Result</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.OutputPin}, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' for the new {@link org.eclipse.uml2.uml.OutputPin}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.OutputPin}.
* @see #getResults()
* @generated
*/
OutputPin createResult(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>Result</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.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 #getResults()
* @generated
*/
OutputPin getResult(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>Result</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.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.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.OutputPin} on demand if not found.
* @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 #getResults()
* @generated
*/
OutputPin getResult(String name, Type type, boolean ignoreCase,
boolean createOnDemand);
/**
* 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>Result</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 #getResults()
* @generated NOT
*/
OutputPin getResult(String name, Type type, boolean ignoreCase);
/**
* Returns the value of the '<em><b>Trigger</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Trigger}.
* <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 -->
* The type of events accepted by the action, as specified by triggers. For triggers with signal events, a signal of the specified type or any subtype of the specified signal type is accepted.
* <!-- end-model-doc -->
* @return the value of the '<em>Trigger</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getAcceptEventAction_Trigger()
* @model containment="true" resolveProxies="true" required="true" ordered="false"
* @generated
*/
EList<Trigger> getTriggers();
/**
* Creates a new {@link org.eclipse.uml2.uml.Trigger}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Trigger</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.Trigger}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.Trigger}.
* @see #getTriggers()
* @generated
*/
Trigger createTrigger(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Trigger} with the specified '<em><b>Name</b></em>' from the '<em><b>Trigger</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.Trigger} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Trigger} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getTriggers()
* @generated
*/
Trigger getTrigger(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Trigger} with the specified '<em><b>Name</b></em>' from the '<em><b>Trigger</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.Trigger} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.Trigger} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.Trigger} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getTriggers()
* @generated
*/
Trigger getTrigger(String name, boolean ignoreCase, boolean createOnDemand);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* AcceptEventActions may have no input pins.
* 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 validateNoInputPins(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* There are no output pins if the trigger events are only ChangeEvents, or if they are only CallEvents when this action is an instance of AcceptEventAction and not an instance of a descendant of AcceptEventAction (such as AcceptCallAction).
* 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 validateNoOutputPins(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the trigger events are all TimeEvents, there is exactly one output pin.
* 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 validateTriggerEvents(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If isUnmarshall is true, there must be exactly one trigger for events of type SignalEvent. The number of result output pins must be the same as the number of attributes of the signal. The type and ordering of each result output pin must be the same as the corresponding attribute of the signal. The multiplicity of each result output pin must be compatible with the multiplicity of the corresponding attribute.
* 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 validateUnmarshallSignalEvents(DiagnosticChain diagnostics,
Map<Object, Object> context);
} // AcceptEventAction