EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.workflow.pcm.jobs]

COVERAGE SUMMARY FOR SOURCE FILE [LoadPCMModelsJob.java]

nameclass, %method, %block, %line, %
LoadPCMModelsJob.java0%   (0/1)0%   (0/6)0%   (0/83)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class LoadPCMModelsJob0%   (0/1)0%   (0/6)0%   (0/83)0%   (0/24)
<static initializer> 0%   (0/1)0%   (0/4)0%   (0/2)
LoadPCMModelsJob (AbstractPCMWorkflowRunConfiguration): void 0%   (0/1)0%   (0/9)0%   (0/4)
execute (IProgressMonitor): void 0%   (0/1)0%   (0/63)0%   (0/14)
getName (): String 0%   (0/1)0%   (0/2)0%   (0/1)
rollback (IProgressMonitor): void 0%   (0/1)0%   (0/1)0%   (0/1)
setBlackboard (MDSDBlackboard): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package de.uka.ipd.sdq.workflow.pcm.jobs;
2 
3import org.apache.log4j.Logger;
4import org.eclipse.core.runtime.IProgressMonitor;
5 
6import de.uka.ipd.sdq.workflow.IBlackboardInteractingJob;
7import de.uka.ipd.sdq.workflow.IJob;
8import de.uka.ipd.sdq.workflow.OrderPreservingBlackboardCompositeJob;
9import de.uka.ipd.sdq.workflow.exceptions.JobFailedException;
10import de.uka.ipd.sdq.workflow.exceptions.RollbackFailedException;
11import de.uka.ipd.sdq.workflow.exceptions.UserCanceledException;
12import de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard;
13import de.uka.ipd.sdq.workflow.mdsd.blackboard.ResourceSetPartition;
14import de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMWorkflowRunConfiguration;
15 
16/**Loads the PCM models given in the configuration into a MDSD blackboard and store the models in a temporary eclipse project.
17 * The temporary storage allows to transform and modify input PCM models without a modification of the source models and
18 * can be accessed after the analysis to check the model used in the analysis.
19 * @author groenda
20 *
21 */
22public class LoadPCMModelsJob extends OrderPreservingBlackboardCompositeJob<MDSDBlackboard>
23implements IJob, IBlackboardInteractingJob<MDSDBlackboard> {
24        private static final Logger logger = Logger.getLogger(LoadPCMModelsJob.class);
25        private MDSDBlackboard blackboard;
26        private AbstractPCMWorkflowRunConfiguration configuration = null;
27 
28        public LoadPCMModelsJob(AbstractPCMWorkflowRunConfiguration configuration) {
29                super();
30                this.configuration = configuration;
31        }
32 
33        /* (non-Javadoc)
34         * @see de.uka.ipd.sdq.workflow.IBlackboardInteractingJob#setBlackboard(de.uka.ipd.sdq.workflow.Blackboard)
35         */
36        public void setBlackboard(MDSDBlackboard blackboard) {
37                this.blackboard = blackboard;
38        }
39 
40        @Override
41        public void execute(IProgressMonitor monitor) throws JobFailedException,
42                        UserCanceledException {
43                ResourceSetPartition pcmPartition = this.blackboard.getPartition(LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID);
44                ResourceSetPartition middlewarePartition = this.blackboard.getPartition(LoadPCMModelsIntoBlackboardJob.MIDDLEWARE_PARTITION_ID);
45                ResourceSetPartition eventMiddlewarePartition = this.blackboard.getPartition(LoadPCMModelsIntoBlackboardJob.EVENT_MIDDLEWARE_PARTITION_ID);
46 
47                // Load the PCM model itself
48                logger.info("Loading PCM models");
49                for (String modelFile : configuration.getPCMModelFiles()) {
50                        pcmPartition.loadModel(modelFile);
51                }
52                pcmPartition.resolveAllProxies();
53 
54                // load the middleware completion
55                logger.info("Loading middleware completion models");
56                middlewarePartition.loadModel(configuration.getMiddlewareFile());
57                middlewarePartition.resolveAllProxies();
58 
59                // load the event middleware repository
60                logger.info("Loading event middleware models");
61                eventMiddlewarePartition.loadModel(configuration.getEventMiddlewareFile());
62                eventMiddlewarePartition.resolveAllProxies();
63        }
64 
65        @Override
66        public String getName() {
67                return "Perform PCM Model Load";
68        }
69 
70        @Override
71        public void rollback(IProgressMonitor monitor)
72                        throws RollbackFailedException {
73        }
74}

[all classes][de.uka.ipd.sdq.workflow.pcm.jobs]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov