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