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