1
2
3
4
5
6
7
8 package org.apache.maven.continuum.model.project.v1_0_9;
9
10
11
12
13
14 import org.apache.maven.continuum.model.scm.v1_0_9.ChangeFile;
15 import org.apache.maven.continuum.model.scm.v1_0_9.ChangeSet;
16 import org.apache.maven.continuum.model.scm.v1_0_9.ScmResult;
17 import org.apache.maven.continuum.model.scm.v1_0_9.SuiteResult;
18 import org.apache.maven.continuum.model.scm.v1_0_9.TestCaseFailure;
19 import org.apache.maven.continuum.model.scm.v1_0_9.TestResult;
20 import org.apache.maven.continuum.model.system.v1_0_9.NotificationAddress;
21 import org.apache.maven.continuum.model.system.v1_0_9.SystemConfiguration;
22
23
24
25
26
27
28
29
30
31 @SuppressWarnings( "all" )
32 public class ProjectNotifier
33 implements java.io.Serializable
34 {
35
36
37
38
39
40
41
42
43 private int id = 0;
44
45
46
47
48 private String type = "mail";
49
50
51
52
53 private int from = 0;
54
55
56
57
58 private boolean enabled = true;
59
60
61
62
63 private int recipientType = 0;
64
65
66
67
68 private boolean sendOnSuccess = true;
69
70
71
72
73 private boolean sendOnFailure = true;
74
75
76
77
78 private boolean sendOnError = true;
79
80
81
82
83 private boolean sendOnWarning = true;
84
85
86
87
88 private java.util.Map configuration;
89
90
91
92
93
94
95
96
97
98
99
100
101 public void addConfiguration( Object key, String value )
102 {
103 getConfiguration().put( key, value );
104 }
105
106
107
108
109
110
111
112 public boolean equals( Object other )
113 {
114 if ( this == other )
115 {
116 return true;
117 }
118
119 if ( !( other instanceof ProjectNotifier ) )
120 {
121 return false;
122 }
123
124 ProjectNotifier that = (ProjectNotifier) other;
125 boolean result = true;
126
127 result = result && id == that.id;
128
129 return result;
130 }
131
132
133
134
135
136
137 public java.util.Map getConfiguration()
138 {
139 if ( this.configuration == null )
140 {
141 this.configuration = new java.util.HashMap();
142 }
143
144 return this.configuration;
145 }
146
147
148
149
150
151
152 public int getFrom()
153 {
154 return this.from;
155 }
156
157
158
159
160
161
162 public int getId()
163 {
164 return this.id;
165 }
166
167
168
169
170
171
172 public int getRecipientType()
173 {
174 return this.recipientType;
175 }
176
177
178
179
180
181
182 public String getType()
183 {
184 return this.type;
185 }
186
187
188
189
190
191
192 public int hashCode()
193 {
194 int result = 17;
195
196 result = 37 * result + (int) id;
197
198 return result;
199 }
200
201
202
203
204
205
206 public boolean isEnabled()
207 {
208 return this.enabled;
209 }
210
211
212
213
214
215
216 public boolean isSendOnError()
217 {
218 return this.sendOnError;
219 }
220
221
222
223
224
225
226 public boolean isSendOnFailure()
227 {
228 return this.sendOnFailure;
229 }
230
231
232
233
234
235
236 public boolean isSendOnSuccess()
237 {
238 return this.sendOnSuccess;
239 }
240
241
242
243
244
245
246 public boolean isSendOnWarning()
247 {
248 return this.sendOnWarning;
249 }
250
251
252
253
254
255
256
257 public void setConfiguration( java.util.Map configuration )
258 {
259 this.configuration = configuration;
260 }
261
262
263
264
265
266
267 public void setEnabled( boolean enabled )
268 {
269 this.enabled = enabled;
270 }
271
272
273
274
275
276
277 public void setFrom( int from )
278 {
279 this.from = from;
280 }
281
282
283
284
285
286
287 public void setId( int id )
288 {
289 this.id = id;
290 }
291
292
293
294
295
296
297 public void setRecipientType( int recipientType )
298 {
299 this.recipientType = recipientType;
300 }
301
302
303
304
305
306
307 public void setSendOnError( boolean sendOnError )
308 {
309 this.sendOnError = sendOnError;
310 }
311
312
313
314
315
316
317 public void setSendOnFailure( boolean sendOnFailure )
318 {
319 this.sendOnFailure = sendOnFailure;
320 }
321
322
323
324
325
326
327 public void setSendOnSuccess( boolean sendOnSuccess )
328 {
329 this.sendOnSuccess = sendOnSuccess;
330 }
331
332
333
334
335
336
337 public void setSendOnWarning( boolean sendOnWarning )
338 {
339 this.sendOnWarning = sendOnWarning;
340 }
341
342
343
344
345
346
347 public void setType( String type )
348 {
349 this.type = type;
350 }
351
352
353
354
355
356
357 public java.lang.String toString()
358 {
359 StringBuilder buf = new StringBuilder( 128 );
360
361 buf.append( "id = '" );
362 buf.append( getId() );
363 buf.append( "'" );
364
365 return buf.toString();
366 }
367
368
369
370 public static final int FROM_PROJECT = 1;
371
372 public static final int FROM_USER = 2;
373
374 public boolean isFromProject()
375 {
376 return from == FROM_PROJECT;
377 }
378
379 public boolean isFromUser()
380 {
381 return from == FROM_USER;
382 }
383
384 }