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