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