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