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

COVERAGE SUMMARY FOR SOURCE FILE [CompletionJob.java]

nameclass, %method, %block, %line, %
CompletionJob.java0%   (0/1)0%   (0/3)0%   (0/112)0%   (0/22)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CompletionJob0%   (0/1)0%   (0/3)0%   (0/112)0%   (0/22)
$SWITCH_TABLE$de$uka$ipd$sdq$cip$configuration$Transformation$TransformationQ... 0%   (0/1)0%   (0/34)0%   (0/1)
CompletionJob (CompletionConfiguration): void 0%   (0/1)0%   (0/73)0%   (0/19)
CompletionJob (CompletionConfigurationProvider): void 0%   (0/1)0%   (0/5)0%   (0/2)

1package de.uka.ipd.sdq.cip.workflow.jobs;
2 
3import de.uka.ipd.sdq.cip.configuration.CompletionConfiguration;
4import de.uka.ipd.sdq.cip.configuration.CompletionConfigurationProvider;
5import de.uka.ipd.sdq.cip.configuration.Transformation;
6import de.uka.ipd.sdq.cip.workflow.jobs.builder.QVTOCompletionBuilder;
7import de.uka.ipd.sdq.cip.workflow.jobs.builder.QVTRCompletionBuilder;
8import de.uka.ipd.sdq.workflow.IBlackboardInteractingJob;
9import de.uka.ipd.sdq.workflow.OrderPreservingBlackboardCompositeJob;
10import de.uka.ipd.sdq.workflow.exceptions.JobFailedException;
11import de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard;
12 
13/**
14 * CompletionJob iterates over all configured completions and creates the required jobs
15 * 
16 * @author Thomas Schuischel
17 * 
18 */
19public class CompletionJob extends
20                OrderPreservingBlackboardCompositeJob<MDSDBlackboard> implements
21                IBlackboardInteractingJob<MDSDBlackboard> {
22        
23        /**
24         * Creates a composite job for completions from a {@link CompletionConfigurationProvider}
25         * 
26         * @param configurationProvider                A class providing a {@link CompletionConfiguration} through 
27         *                                                                         the interface {@link CompletionConfigurationProvider}
28         */
29        public CompletionJob(CompletionConfigurationProvider configurationProvider) {
30                this(configurationProvider.getCompletionConfiguration());
31        }
32 
33        /**
34         * Creates a composite job for completions from a {@link CompletionConfiguration}
35         * 
36         * @param configuration                                The configuration for all completions
37         */
38        public CompletionJob(CompletionConfiguration configuration) {
39                super();
40                
41                // only continue if there is a configuration and 
42                // at least one transformation configured
43                if(configuration == null || configuration.getTransformations().size() < 1)
44                        return;
45                
46                // Prepare the necessary preconditions for completions
47                add(new PrepareTransformationsJob(configuration));
48                
49                for(Transformation transformation : configuration.getTransformations()) {
50                        switch(transformation.getQVTType()) {
51                        
52                        // Handle QVTR completions
53                        case QVTR:
54                                addAll(new QVTRCompletionBuilder(
55                                                configuration, 
56                                                transformation)
57                                .buildJobs());
58                        break;
59 
60                        // Handle QVTO completions
61                        case QVTO:
62                                addAll(new QVTOCompletionBuilder( 
63                                                configuration, 
64                                                transformation)
65                                .buildJobs());
66                                break;
67                                
68                        // Handle wrong completion type
69                        default:
70                                JobFailedException e = new JobFailedException("Unable to create ComplitionJob");
71                                logger.error("unknown QVT type: " + transformation.getQVTType(), e);
72                        }
73                                
74                }
75                
76        }
77}

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