1
2
3
4
5
6 package org.apache.maven.model;
7
8
9
10
11
12
13
14
15
16
17
18 @SuppressWarnings( "all" )
19 public class ReportPlugin
20 extends ConfigurationContainer
21 implements java.io.Serializable, java.lang.Cloneable
22 {
23
24
25
26
27
28
29
30
31 private String groupId = "org.apache.maven.plugins";
32
33
34
35
36 private String artifactId;
37
38
39
40
41
42
43
44
45
46
47
48
49 private String version;
50
51
52
53
54 private java.util.List<ReportSet> reportSets;
55
56
57
58
59
60
61
62
63
64
65
66 public void addReportSet( ReportSet reportSet )
67 {
68 getReportSets().add( reportSet );
69 }
70
71
72
73
74
75
76 public ReportPlugin clone()
77 {
78 try
79 {
80 ReportPlugin copy = (ReportPlugin) super.clone();
81
82 if ( this.reportSets != null )
83 {
84 copy.reportSets = new java.util.ArrayList<ReportSet>();
85 for ( ReportSet item : this.reportSets )
86 {
87 copy.reportSets.add( ( (ReportSet) item).clone() );
88 }
89 }
90
91 return copy;
92 }
93 catch ( java.lang.Exception ex )
94 {
95 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
96 + " does not support clone()" ).initCause( ex );
97 }
98 }
99
100
101
102
103
104
105
106 public String getArtifactId()
107 {
108 return this.artifactId;
109 }
110
111
112
113
114
115
116 public String getGroupId()
117 {
118 return this.groupId;
119 }
120
121
122
123
124
125
126 public java.util.List<ReportSet> getReportSets()
127 {
128 if ( this.reportSets == null )
129 {
130 this.reportSets = new java.util.ArrayList<ReportSet>();
131 }
132
133 return this.reportSets;
134 }
135
136
137
138
139
140
141
142
143
144
145 public String getVersion()
146 {
147 return this.version;
148 }
149
150
151
152
153
154
155 public void removeReportSet( ReportSet reportSet )
156 {
157 getReportSets().remove( reportSet );
158 }
159
160
161
162
163
164
165
166 public void setArtifactId( String artifactId )
167 {
168 this.artifactId = artifactId;
169 }
170
171
172
173
174
175
176 public void setGroupId( String groupId )
177 {
178 this.groupId = groupId;
179 }
180
181
182
183
184
185
186
187
188
189 public void setReportSets( java.util.List<ReportSet> reportSets )
190 {
191 this.reportSets = reportSets;
192 }
193
194
195
196
197
198
199
200
201
202
203 public void setVersion( String version )
204 {
205 this.version = version;
206 }
207
208
209
210 private java.util.Map<String, ReportSet> reportSetMap = null;
211
212
213
214
215 public void flushReportSetMap()
216 {
217 this.reportSetMap = null;
218 }
219
220
221
222
223
224 public java.util.Map<String, ReportSet> getReportSetsAsMap()
225 {
226 if ( reportSetMap == null )
227 {
228 reportSetMap = new java.util.LinkedHashMap<String, ReportSet>();
229 if ( getReportSets() != null )
230 {
231 for ( java.util.Iterator<ReportSet> i = getReportSets().iterator(); i.hasNext(); )
232 {
233 ReportSet reportSet = (ReportSet) i.next();
234 reportSetMap.put( reportSet.getId(), reportSet );
235 }
236 }
237 }
238
239 return reportSetMap;
240 }
241
242
243
244
245 public String getKey()
246 {
247 return constructKey( groupId, artifactId );
248 }
249
250
251
252
253
254
255 public static String constructKey( String groupId, String artifactId )
256 {
257 return groupId + ":" + artifactId;
258 }
259
260
261 }