1 | package de.uka.ipd.sdq.workflow.pcm.jobs; |
2 | |
3 | import de.uka.ipd.sdq.workflow.IBlackboardInteractingJob; |
4 | import de.uka.ipd.sdq.workflow.IJob; |
5 | import de.uka.ipd.sdq.workflow.OrderPreservingBlackboardCompositeJob; |
6 | import de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard; |
7 | import de.uka.ipd.sdq.workflow.pcm.blackboard.PCMResourceSetPartition; |
8 | import de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMWorkflowRunConfiguration; |
9 | |
10 | /** |
11 | * A job to be used in the SDQ workflow engine which fully loads a PCM model instance into two MDSDBlackboard partitions. |
12 | * The first partition contains the plain PCM model instance, the second one contains parametric middleware completion |
13 | * components. |
14 | * |
15 | * @author Steffen Becker |
16 | */ |
17 | public class LoadPCMModelsIntoBlackboardJob |
18 | extends OrderPreservingBlackboardCompositeJob<MDSDBlackboard> |
19 | implements IJob, IBlackboardInteractingJob<MDSDBlackboard> { |
20 | |
21 | /** |
22 | * ID of the blackboard partition containing the fully loaded PCM instance. The blackboard partition is |
23 | * ensured to be of type {@link PCMResourceSetPartition} |
24 | */ |
25 | public static final String PCM_MODELS_PARTITION_ID = "de.uka.ipd.sdq.pcmmodels.partition"; |
26 | |
27 | /** |
28 | * ID of the blackboard partition containing the fully loaded parametric middleware completions. The blackboard partition is |
29 | * ensured to be of type {@link PCMResourceSetPartition} |
30 | */ |
31 | public static final String MIDDLEWARE_PARTITION_ID = "de.uka.ipd.sdq.pcmmodels.partition.middleware"; |
32 | |
33 | /** |
34 | * ID of the blackboard partition containing the fully loaded parametric event middleware completions. |
35 | * The blackboard partition is ensured to be of type {@link PCMResourceSetPartition} |
36 | */ |
37 | public static final String EVENT_MIDDLEWARE_PARTITION_ID = "de.uka.ipd.sdq.pcmmodels.partition.eventmiddleware"; |
38 | |
39 | /** |
40 | * Constructor of the PCM loader job |
41 | * @param config A PCM workflow configuration containing the list of URIs where to find the PCM model files |
42 | */ |
43 | public LoadPCMModelsIntoBlackboardJob(AbstractPCMWorkflowRunConfiguration config) { |
44 | super(); |
45 | this.add(new PreparePCMBlackboardPartionJob()); |
46 | this.add(new LoadPCMModelsJob(config)); |
47 | // store models in temporary eclipse plug-in |
48 | this.add(new CreatePluginProjectJob(config)); |
49 | this.add(new CreateWorkingCopyOfModelsJob(config)); |
50 | } |
51 | } |