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;
27 import org.sonar.server.computation.task.step.ExecuteStatelessInitExtensionsStep;
30 * Ordered list of steps classes and instances to be executed for batch processing
32 public class ReportComputationSteps extends AbstractComputationSteps {
34 private static final List<Class<? extends ComputationStep>> STEPS = Arrays.asList(
35 ExtractReportStep.class,
36 PersistScannerContextStep.class,
37 GenerateAnalysisUuid.class,
39 // Builds Component tree
40 LoadReportAnalysisMetadataHolderStep.class,
41 ExecuteStatelessInitExtensionsStep.class,
42 VerifyBillingStep.class,
43 BuildComponentTreeStep.class,
44 ValidateProjectStep.class,
46 LoadQualityProfilesStep.class,
48 // load project related stuffs
49 LoadQualityGateStep.class,
50 LoadPeriodsStep.class,
51 FileMoveDetectionStep.class,
53 // load duplications related stuff
54 LoadDuplicationsFromReportStep.class,
55 LoadCrossProjectDuplicationsRepositoryStep.class,
58 SizeMeasuresStep.class,
59 NewCoverageMeasuresStep.class,
60 CoverageMeasuresStep.class,
61 CommentMeasuresStep.class,
62 CustomMeasuresCopyStep.class,
63 DuplicationMeasuresStep.class,
64 DuplicationDataMeasuresStep.class,
65 NewSizeMeasuresStep.class,
66 LanguageDistributionMeasuresStep.class,
67 UnitTestMeasuresStep.class,
68 ComplexityMeasuresStep.class,
70 LoadMeasureComputersStep.class,
71 ExecuteVisitorsStep.class,
73 // Must be executed after computation of all measures
74 ComputeMeasureVariationsStep.class,
76 // Must be executed after computation of differential measures
77 QualityGateMeasuresStep.class,
78 // Must be executed after computation of language distribution
79 ComputeQProfileMeasureStep.class,
80 // Must be executed after computation of quality profile measure
81 QualityProfileEventsStep.class,
83 // Must be executed after computation of quality gate measure
84 QualityGateEventsStep.class,
87 PersistComponentsStep.class,
88 PersistAnalysisStep.class,
89 PersistAnalysisPropertiesStep.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() {