blob: 713f04ea4f22e8d87d3340c9040af0d8fa6487c1 [file] [log] [blame]
/*
* Copyright (c) 2005, 2008 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: DecisionNode.java,v 1.5 2008/10/02 20:56:23 jbruck Exp $
*/
package org.eclipse.uml2.uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Decision Node</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A decision node is a control node that chooses between outgoing flows.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInput <em>Decision Input</em>}</li>
* <li>{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInputFlow <em>Decision Input Flow</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getDecisionNode()
* @model
* @generated
*/
public interface DecisionNode
extends ControlNode {
/**
* Returns the value of the '<em><b>Decision Input</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Provides input to guard specifications on edges outgoing from the decision node.
* <!-- end-model-doc -->
* @return the value of the '<em>Decision Input</em>' reference.
* @see #setDecisionInput(Behavior)
* @see org.eclipse.uml2.uml.UMLPackage#getDecisionNode_DecisionInput()
* @model ordered="false"
* @generated
*/
Behavior getDecisionInput();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInput <em>Decision Input</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Decision Input</em>' reference.
* @see #getDecisionInput()
* @generated
*/
void setDecisionInput(Behavior value);
/**
* Returns the value of the '<em><b>Decision Input Flow</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An additional edge incoming to the decision node that provides a decision input value.
* <!-- end-model-doc -->
* @return the value of the '<em>Decision Input Flow</em>' reference.
* @see #setDecisionInputFlow(ObjectFlow)
* @see org.eclipse.uml2.uml.UMLPackage#getDecisionNode_DecisionInputFlow()
* @model ordered="false"
* @generated
*/
ObjectFlow getDecisionInputFlow();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInputFlow <em>Decision Input Flow</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Decision Input Flow</em>' reference.
* @see #getDecisionInputFlow()
* @generated
*/
void setDecisionInputFlow(ObjectFlow value);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A decision node has one or two incoming edges and at least one outgoing edge.
* 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 validateIncomingOutgoingEdges(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The edges coming into and out of a decision node, other than the decision input flow (if any), must be either all object flows or all control flows.
* 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 validateEdges(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The decisionInputFlow of a decision node must be an incoming edge of the decision node.
* 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 validateDecisionInputFlowIncoming(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A decision input behavior has no output parameters, no in-out parameters and one return parameter.
* 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 validateParameters(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the decision node has no decision input flow and an incoming control flow, then a decision input behavior has zero input parameters.
* 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 validateZeroInputParameters(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the decision node has no decision input flow and an incoming object flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the incoming edge.
* 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 validateIncomingObjectOneInputParameter(
DiagnosticChain diagnostics, Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the decision node has a decision input flow and an incoming control flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the decision input flow.
* 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 validateIncomingControlOneInputParameter(
DiagnosticChain diagnostics, Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If the decision node has a decision input flow and an second incoming object flow, then a decision input behavior has two input parameters, the first of which has a type that is the same as or a supertype of the type of the type of object tokens offered on the nondecision input flow and the second of which has a type that is the same as or a supertype of the type of object tokens offered on the decision input flow.
* 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 validateTwoInputParameters(DiagnosticChain diagnostics,
Map<Object, Object> context);
} // DecisionNode