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

COVERAGE SUMMARY FOR SOURCE FILE [SimuComWorkflowConfiguration.java]

nameclass, %method, %block, %line, %
SimuComWorkflowConfiguration.java0%   (0/1)0%   (0/12)0%   (0/134)0%   (0/42)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SimuComWorkflowConfiguration0%   (0/1)0%   (0/12)0%   (0/134)0%   (0/42)
<static initializer> 0%   (0/1)0%   (0/4)0%   (0/2)
SimuComWorkflowConfiguration (Map): void 0%   (0/1)0%   (0/7)0%   (0/3)
clone (): Object 0%   (0/1)0%   (0/23)0%   (0/6)
copy (List): SimuComWorkflowConfiguration 0%   (0/1)0%   (0/33)0%   (0/10)
getClone (): SimuComWorkflowConfiguration 0%   (0/1)0%   (0/14)0%   (0/5)
getErrorMessage (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getSimulateFailures (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
getSimulationConfiguration (): AbstractSimulationConfig 0%   (0/1)0%   (0/3)0%   (0/1)
setAccuracyInfluenceAnalysisState (AccuracyInfluenceAnalysisState): void 0%   (0/1)0%   (0/20)0%   (0/4)
setDefaults (): void 0%   (0/1)0%   (0/5)0%   (0/1)
setSimuComConfiguration (SimuComConfig): void 0%   (0/1)0%   (0/14)0%   (0/5)
setSimulateFailures (boolean): void 0%   (0/1)0%   (0/6)0%   (0/3)

1package de.uka.ipd.sdq.codegen.simucontroller.runconfig;
2 
3import java.util.List;
4import java.util.Map;
5 
6import org.apache.log4j.Logger;
7 
8import de.uka.ipd.sdq.simucomframework.SimuComConfig;
9import de.uka.ipd.sdq.simulation.AbstractSimulationConfig;
10import de.uka.ipd.sdq.workflow.pcm.runconfig.AccuracyInfluenceAnalysisState;
11import de.uka.ipd.sdq.workflow.pcm.runconfig.ExperimentRunDescriptor;
12import de.uka.ipd.sdq.workflow.pcm.runconfig.SensitivityAnalysisConfiguration;
13 
14/**
15 */
16public class SimuComWorkflowConfiguration extends AbstractSimulationWorkflowConfiguration {
17        /** Logger for this class. */
18        private static final Logger logger = Logger.getLogger(SimuComWorkflowConfiguration.class);
19 
20        private SimuComConfig simuComConfig = null;
21        
22        private boolean simulateFailures;
23        
24        
25        /**
26         * Constructor requiring to set the ILaunchConfiguration and mode this configuration is running in.
27         * This is necessary to realize the extendability of the simucom workflow with additional jobs
28         * using the extension points provided by the palladio workflow engine.
29         * 
30         * @param launchConfiguration The launch configuration object to be provided to the extending jobs.
31         * @param mode The mode of the workflow currently runs in (run/debug)
32         */
33        public SimuComWorkflowConfiguration(Map<String, Object> attributes) {
34            super(attributes);
35        }
36        
37        
38 
39        public AbstractSimulationConfig getSimulationConfiguration() {
40                return simuComConfig;
41        }
42 
43        public void setSimuComConfiguration(SimuComConfig simuComConfig) {
44                checkFixed();
45                this.simuComConfig = simuComConfig;
46                this.simulateFailures = simuComConfig.getSimulateFailures();
47        this.setSimulateLinkingResources(simuComConfig.getSimulateLinkingResources());
48        }
49 
50        @Override
51        public void setAccuracyInfluenceAnalysisState(
52                        AccuracyInfluenceAnalysisState accuracyInfluenceAnalysisState) {
53                super.setAccuracyInfluenceAnalysisState(accuracyInfluenceAnalysisState);
54                if (isAccuracyInfluenceAnalysisEnabled()) {
55                        simuComConfig.setAdditionalExperimentRunDescription(" (" + getAccuracyInfluenceAnalysisState() + ")");
56                }
57        }
58 
59        public boolean getSimulateFailures() {
60                return simulateFailures;
61        }
62 
63        public void setSimulateFailures(boolean simulateFailures) {
64                checkFixed();
65                this.simulateFailures = simulateFailures;
66        }
67 
68        public String getErrorMessage() {
69                // must be null; otherwise a non-empty error message will result in
70                // a workflow config being considered invalid
71                return null;
72        }
73 
74        public void setDefaults() {
75                throw new RuntimeException("Not implemented. No defaults defined.");
76        }
77 
78        public SimuComWorkflowConfiguration copy(
79                        List<SensitivityAnalysisConfiguration> sconfList) {
80                SimuComWorkflowConfiguration result;
81                try {
82                        result = (SimuComWorkflowConfiguration) clone();
83                } catch (CloneNotSupportedException e) {
84                        logger.fatal("Could not clone configuration.", e);
85                        result = null;
86                }
87 
88                String name = this.simuComConfig.getNameBase();
89                ExperimentRunDescriptor descriptor = new ExperimentRunDescriptor(name,
90                                sconfList);
91                result.simuComConfig = this.simuComConfig.copy(descriptor);
92                result.sensitivityAnalysisConfigurationList = sconfList;
93                return result;
94        }
95 
96        @Override
97        protected Object clone() throws CloneNotSupportedException {
98                SimuComWorkflowConfiguration config = (SimuComWorkflowConfiguration) super.clone();
99                config.setFeatureConfigFile(this.getFeatureConfigFile());
100                config.simuComConfig = this.simuComConfig.getClone();
101                config.simulateFailures = this.simulateFailures;
102        config.setSimulateLinkingResources(this.getSimulateLinkingResources());
103                return config;
104        }
105 
106        /**
107         * @return A clone of this instance.
108         */
109        public SimuComWorkflowConfiguration getClone() {
110                SimuComWorkflowConfiguration config;
111                try {
112                        config = (SimuComWorkflowConfiguration) this.clone();
113                } catch (CloneNotSupportedException e) {
114                        logger.fatal("Could not clone configuration.", e);
115                        config = null;
116                }
117                return config;
118        }
119 
120}

[all classes][de.uka.ipd.sdq.codegen.simucontroller.runconfig]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov