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