File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\maven-plugin\src\main\java\hudson\maven\MavenAggregatedReport.java.html

1 /*
2 * The MIT License
3 *
4 * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24 package hudson.maven;
25
26 import hudson.model.Action;
27 import hudson.tasks.BuildStep;
28
29 import java.util.List;
30 import java.util.Map;
31
32 /**
33 * {@link Action} to be associated with {@link MavenModuleSetBuild},
34 * which usually displays some aspect of the aggregated results
35 * of the module builds (such as aggregated test result, aggregated
36 * coverage report, etc.)
37 *
38 * <p>
39 * When a module build is completed, {@link MavenBuild#getModuleSetBuild()
40 * its governing MavenModuleSetBuild} tries to create an instane of
41 * {@link MavenAggregatedReport} from each kind of {@link MavenReporterDescriptor}
42 * whose {@link MavenReporter}s are used on module builds.
43 *
44 * <p>
45 * The obtained instance is then persisted with {@link MavenModuleSetBuild}.
46 *
47 * @author Kohsuke Kawaguchi
48 * @since 1.99
49 * @see AggregatableAction
50 */
51 public interface MavenAggregatedReport extends Action {
52 /**
53 * Called whenever a new module build is completed, to update the
54 * aggregated report. When multiple builds complete simultaneously,
55 * Hudson serializes the execution of this method, so this method
56 * needs not be concurrency-safe.
57 *
58 * @param moduleBuilds
59 * Same as <tt>MavenModuleSet.getModuleBuilds()</tt> but provided for convenience and efficiency.
60 * @param newBuild
61 * Newly completed build.
62 */
63 void update(Map<MavenModule,List<MavenBuild>> moduleBuilds, MavenBuild newBuild);
64
65 /**
66 * Returns the implementation class of {@link AggregatableAction} that
67 * produces this {@link MavenAggregatedReport}. Hudson uses this method
68 * to determine which {@link AggregatableAction} is aggregated to
69 * which {@link MavenAggregatedReport}.
70 */
71 Class<? extends AggregatableAction> getIndividualActionType();
72
73 /**
74 * Equivalent of {@link BuildStep#getProjectAction(AbstractProject)}
75 * for {@link MavenAggregatedReport}.
76 */
77 Action getProjectAction(MavenModuleSet moduleSet);
78 }
79