3 * Copyright (C) 2009-2017 SonarSource SA
4 * mailto:info AT sonarsource DOT com
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 package org.sonar.server.computation.task.projectanalysis.step;
22 import java.util.Arrays;
23 import java.util.List;
24 import org.sonar.server.computation.task.container.TaskContainer;
25 import org.sonar.server.computation.task.projectanalysis.filemove.FileMoveDetectionStep;
26 import org.sonar.server.computation.task.step.ComputationStep;
29 * Ordered list of steps classes and instances to be executed for batch processing
31 public class ReportComputationSteps extends AbstractComputationSteps {
33 private static final List<Class<? extends ComputationStep>> STEPS = Arrays.asList(
34 ExtractReportStep.class,
35 PersistScannerContextStep.class,
36 GenerateAnalysisUuid.class,
38 // Builds Component tree
39 LoadReportAnalysisMetadataHolderStep.class,
40 VerifyBillingStep.class,
41 BuildComponentTreeStep.class,
42 ValidateProjectStep.class,
44 LoadQualityProfilesStep.class,
46 // copy data in the incremental mode
47 IncrementalMeasureTransitionStep.class,
49 // load project related stuffs
50 LoadQualityGateStep.class,
51 LoadPeriodsStep.class,
52 FileMoveDetectionStep.class,
54 // load duplications related stuff
55 LoadDuplicationsFromReportStep.class,
56 LoadCrossProjectDuplicationsRepositoryStep.class,
59 SizeMeasuresStep.class,
60 NewCoverageMeasuresStep.class,
61 CoverageMeasuresStep.class,
62 CommentMeasuresStep.class,
63 CustomMeasuresCopyStep.class,
64 DuplicationMeasuresStep.class,
65 DuplicationDataMeasuresStep.class,
66 NewSizeMeasuresStep.class,
67 LanguageDistributionMeasuresStep.class,
68 UnitTestMeasuresStep.class,
69 ComplexityMeasuresStep.class,
71 LoadMeasureComputersStep.class,
72 ExecuteVisitorsStep.class,
74 // Must be executed after computation of all measures
75 ComputeMeasureVariationsStep.class,
77 // Must be executed after computation of differential measures
78 QualityGateMeasuresStep.class,
79 // Must be executed after computation of language distribution
80 ComputeQProfileMeasureStep.class,
81 // Must be executed after computation of quality profile measure
82 QualityProfileEventsStep.class,
84 // Must be executed after computation of quality gate measure
85 QualityGateEventsStep.class,
88 PersistComponentsStep.class,
89 PersistAnalysisStep.class,
90 PersistMeasuresStep.class,
91 PersistIssuesStep.class,
92 PersistProjectLinksStep.class,
93 PersistEventsStep.class,
94 PersistFileSourcesStep.class,
95 PersistTestsStep.class,
96 PersistCrossProjectDuplicationIndexStep.class,
97 EnableAnalysisStep.class,
99 UpdateQualityProfilesLastUsedDateStep.class,
100 PurgeDatastoresStep.class,
101 IndexAnalysisStep.class,
103 // notifications are sent at the end, so that webapp displays up-to-date information
104 SendIssueNotificationsStep.class,
106 PublishTaskResultStep.class);
108 public ReportComputationSteps(TaskContainer taskContainer) {
109 super(taskContainer);
113 * List of all {@link ComputationStep},
114 * ordered by execution sequence.
117 public List<Class<? extends ComputationStep>> orderedStepClasses() {