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