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