View Javadoc
1   package org.apache.maven.reporting.exec;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.ArrayList;
23  import java.util.Collections;
24  import java.util.List;
25  
26  import org.codehaus.plexus.configuration.PlexusConfiguration;
27  
28  /**
29   * Represents a reporting plugin and its execution configuration. It basically contains similar informations as a
30   * {@link org.apache.maven.model.Plugin}, but in order to decouple reporting stuff from core, some values are copied.
31   */
32  public class ReportPlugin
33  {
34      private String groupId = "org.apache.maven.plugins";
35  
36      private String artifactId;
37  
38      private String version;
39  
40      private PlexusConfiguration configuration;
41  
42      private List<ReportSet> reportSets;
43      
44      private List<String> reports;
45  
46      public String getGroupId()
47      {
48          return this.groupId;
49      }
50  
51      public void setGroupId( String groupId )
52      {
53          this.groupId = groupId;
54      }
55  
56      public String getArtifactId()
57      {
58          return this.artifactId;
59      }
60  
61      public void setArtifactId( String artifactId )
62      {
63          this.artifactId = artifactId;
64      }
65  
66      public String getVersion()
67      {
68          return this.version;
69      }
70  
71      public void setVersion( String version )
72      {
73          this.version = version;
74      }
75  
76      public PlexusConfiguration getConfiguration()
77      {
78          return this.configuration;
79      }
80  
81      public void setConfiguration( PlexusConfiguration configuration )
82      {
83          this.configuration = configuration;
84      }
85  
86      public List<ReportSet> getReportSets()
87      {
88          if ( this.reportSets == null )
89          {
90              this.reportSets = new ArrayList<ReportSet>();
91          }
92  
93          return this.reportSets;
94      }
95  
96      public void setReportSets( List<ReportSet> reportSets )
97      {
98          this.reportSets = reportSets;
99      }
100 
101     public List<String> getReports()
102     {
103         return reports == null ? Collections.<String>emptyList() : reports;
104     }
105 
106     public void setReports( List<String> reports )
107     {
108         this.reports = reports;
109     }
110 
111     @Override
112     public String toString()
113     {
114         return "ReportPlugin(" + artifactId + "){version='" + version + "', reports=" + reports
115             + ", reportSets=" + reportSets + "}";
116     }
117 }