KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hudson > maven > MavenReporters


1 package hudson.maven;
2
3 import hudson.model.Descriptor;
4 import hudson.maven.reporters.MavenArtifactArchiver;
5 import hudson.maven.reporters.MavenFingerprinter;
6 import hudson.maven.reporters.MavenJavadocArchiver;
7 import hudson.maven.reporters.SurefireArchiver;
8 import hudson.maven.reporters.MavenMailer;
9
10 import java.util.List JavaDoc;
11 import java.util.ArrayList JavaDoc;
12
13 /**
14  * @author Kohsuke Kawaguchi
15  * @see MavenReporter
16  */

17 public final class MavenReporters {
18     /**
19      * List of all installed {@link MavenReporter}s.
20      */

21     public static final List JavaDoc<MavenReporterDescriptor> LIST = Descriptor.toList(
22         MavenArtifactArchiver.DescriptorImpl.DESCRIPTOR,
23         MavenFingerprinter.DescriptorImpl.DESCRIPTOR,
24         MavenJavadocArchiver.DescriptorImpl.DESCRIPTOR,
25         SurefireArchiver.DescriptorImpl.DESCRIPTOR,
26         MavenMailer.DescriptorImpl.DESCRIPTOR
27     );
28
29     /**
30      * Gets the subset of {@link #LIST} that has configuration screen.
31      */

32     public static List JavaDoc<MavenReporterDescriptor> getConfigurableList() {
33         List JavaDoc<MavenReporterDescriptor> r = new ArrayList JavaDoc<MavenReporterDescriptor>();
34         for (MavenReporterDescriptor d : LIST) {
35             if(d.hasConfigScreen())
36                 r.add(d);
37         }
38         return r;
39     }
40 }
41
Popular Tags