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 [PreparePCMBlackboardPartionJob.java]

nameclass, %method, %block, %line, %
PreparePCMBlackboardPartionJob.java0%   (0/1)0%   (0/6)0%   (0/80)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PreparePCMBlackboardPartionJob0%   (0/1)0%   (0/6)0%   (0/80)0%   (0/24)
<static initializer> 0%   (0/1)0%   (0/10)0%   (0/4)
PreparePCMBlackboardPartionJob (): void 0%   (0/1)0%   (0/3)0%   (0/1)
execute (IProgressMonitor): void 0%   (0/1)0%   (0/48)0%   (0/13)
getName (): String 0%   (0/1)0%   (0/2)0%   (0/1)
rollback (IProgressMonitor): void 0%   (0/1)0%   (0/13)0%   (0/4)
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;
5import org.eclipse.emf.common.util.URI;
6 
7import de.uka.ipd.sdq.workflow.IBlackboardInteractingJob;
8import de.uka.ipd.sdq.workflow.IJob;
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.blackboard.PCMResourceSetPartition;
15import de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMWorkflowRunConfiguration;
16 
17public class PreparePCMBlackboardPartionJob 
18implements IJob, IBlackboardInteractingJob<MDSDBlackboard> {
19        
20        private static final Logger logger = Logger.getLogger(PreparePCMBlackboardPartionJob.class);
21        private MDSDBlackboard blackboard;
22 
23        static final URI PCM_PALLADIO_RESOURCE_TYPE_URI = URI.createURI("pathmap://PCM_MODELS/Palladio.resourcetype");
24        static final URI PCM_PALLADIO_PRIMITIVE_TYPE_REPOSITORY_URI = URI.createURI("pathmap://PCM_MODELS/PrimitiveTypes.repository");
25 
26        @Override
27        public void execute(IProgressMonitor monitor) throws JobFailedException,
28                        UserCanceledException {
29                // Create and add the PCM and middleware model partition
30                logger.debug("Creating PCM Model Partition");
31                PCMResourceSetPartition myPartion = new PCMResourceSetPartition();
32                this.blackboard.addPartition(LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID, myPartion);
33                
34                ResourceSetPartition middlewareRepositoryPartition = new ResourceSetPartition();
35                this.blackboard.addPartition(LoadPCMModelsIntoBlackboardJob.MIDDLEWARE_PARTITION_ID, middlewareRepositoryPartition);
36                
37                ResourceSetPartition eventMiddlewareRepositoryPartition = new ResourceSetPartition();
38                this.blackboard.addPartition(LoadPCMModelsIntoBlackboardJob.EVENT_MIDDLEWARE_PARTITION_ID, eventMiddlewareRepositoryPartition);
39                
40                logger.debug("Initialising PCM EPackages");
41                myPartion.initialiseResourceSetEPackages(AbstractPCMWorkflowRunConfiguration.PCM_EPACKAGES);
42                middlewareRepositoryPartition.initialiseResourceSetEPackages(AbstractPCMWorkflowRunConfiguration.PCM_EPACKAGES);
43                
44                myPartion.loadModel(PCM_PALLADIO_PRIMITIVE_TYPE_REPOSITORY_URI);
45                myPartion.loadModel(PCM_PALLADIO_RESOURCE_TYPE_URI);
46        }
47 
48        @Override
49        public String getName() {
50                return "Prepare PCM Blackboard Partions";
51        }
52 
53        @Override
54        public void rollback(IProgressMonitor monitor)
55                        throws RollbackFailedException {
56                this.blackboard.removePartition(LoadPCMModelsIntoBlackboardJob.EVENT_MIDDLEWARE_PARTITION_ID);
57                this.blackboard.removePartition(LoadPCMModelsIntoBlackboardJob.MIDDLEWARE_PARTITION_ID);
58                this.blackboard.removePartition(LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID);
59        }
60 
61        @Override
62        public void setBlackboard(MDSDBlackboard blackboard) {
63                this.blackboard = blackboard;
64        }
65 
66}

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