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