/* * Copyright (c) 2005, 2007 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: ProtocolStateMachine.java,v 1.9 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; /** * * A representation of the model object 'Protocol State Machine'. * * * * A protocol state machine is always defined in the context of a classifier. It specifies which operations of the classifier can be called in which state and under which condition, thus specifying the allowed call sequences on the classifier's operations. A protocol state machine presents the possible and permitted transitions on the instances of its context classifier, together with the operations which carry the transitions. In this manner, an instance lifecycle can be created for a classifier, by specifying the order in which the operations can be activated and the states through which an instance progresses during its existence. * * *
* The following features are supported: *
* This feature subsets the following features: *
null
.
* @return The new {@link org.eclipse.uml2.uml.ProtocolConformance}.
* @see #getConformances()
* @generated
*/
ProtocolConformance createConformance(ProtocolStateMachine generalMachine);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.ProtocolConformance} with the specified 'General Machine' from the 'Conformance' containment reference list.
*
*
* @param generalMachine The 'General Machine' of the {@link org.eclipse.uml2.uml.ProtocolConformance} to retrieve, or null
.
* @return The first {@link org.eclipse.uml2.uml.ProtocolConformance} with the specified 'General Machine', or null
.
* @see #getConformances()
* @generated
*/
ProtocolConformance getConformance(ProtocolStateMachine generalMachine);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.ProtocolConformance} with the specified 'General Machine' from the 'Conformance' containment reference list.
*
*
* @param generalMachine The 'General Machine' of the {@link org.eclipse.uml2.uml.ProtocolConformance} to retrieve, or null
.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.ProtocolConformance} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.ProtocolConformance} with the specified 'General Machine', or null
.
* @see #getConformances()
* @generated
*/
ProtocolConformance getConformance(ProtocolStateMachine generalMachine,
boolean createOnDemand);
/**
*
*
*
* All transitions of a protocol state machine must be protocol transitions. (transitions as extended by the ProtocolStateMachines package)
* region->forAll(r | r.transition->forAll(t | t.oclIsTypeOf(ProtocolTransition)))
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
*
* @model
* @generated
*/
boolean validateProtocolTransitions(DiagnosticChain diagnostics,
Map