Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: c3ccc2ea8fbbe48df7e928da7b1e37c6afb4bfdf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*****************************************************************************
 * Copyright (c) 2013 CEA LIST.
 *
 *    
 * 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:
 *  Ansgar Radermacher  ansgar.radermacher@cea.fr  
 *
 *****************************************************************************/

package org.eclipse.papyrus.qompass.designer.core.deployment;

import java.util.Stack;

import org.eclipse.papyrus.qompass.designer.core.transformations.Copy;
import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationException;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.Slot;

/**
 * Deploy an instance (on a certain node). This operation is specifically non recursive
 * 
 * @author ansgar
 * 
 */
public interface InstanceDeployer {

	/**
	 * Initialize the deployment
	 * 
	 * @param sat
	 *        information about source and target model
	 * @param bootloader
	 *        the bootloader generator, which will contain instance information
	 * @param node
	 *        the node onto which the allocation should be done.
	 */
	public void init(Copy sat, BootLoaderGen bootloader, InstanceSpecification node);

	/**
	 * Deploy an instance and copy the required classes into the target model.
	 * In case of a composite (assembly) class that is partially deployed on a target node
	 * (i.e. a subset of its parts is deployed on the target node, but not composite itself),
	 * this function may only partially copy the class or omit it completely.
	 * Parts and connections are not copied in the first place to take care of partially
	 * deployed composites and added when needed.
	 * Therefore, this function is also responsible for creating the part associated with the
	 * instance in the owning composite class and eventually complete connections within the
	 * composites.
	 * 
	 * @param is
	 *        an instance (UML instance specification) within the deployment plan
	 * @param slotPath
	 *        a list (stack) of slots starting from the main instance
	 * @return the classifier modified for deployment
	 * @throws TransformationException
	 */
	public InstanceSpecification deployInstance(InstanceSpecification is, Stack<Slot> slotPath) throws TransformationException;
}

Back to the top