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