1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.grubusiness.business.notification;
35
36 import com.fasterxml.jackson.annotation.JsonInclude;
37 import com.fasterxml.jackson.annotation.JsonInclude.Include;
38 import com.fasterxml.jackson.annotation.JsonProperty;
39 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
40 import com.fasterxml.jackson.annotation.JsonRootName;
41
42 import java.util.ArrayList;
43 import java.util.List;
44
45
46
47
48
49
50
51
52
53
54
55 @JsonRootName( value = "broadcast_email" )
56 @JsonPropertyOrder( {
57 "message", "bcc", "subject", "sender_email", "sender_name", "recipient", "cc"
58 } )
59 public class BroadcastNotification
60 {
61
62 private String _strSenderName;
63 private String _strSenderEmail;
64 private List<EmailAddress> _lstRecipient;
65 private String _strSubject;
66 private String _strMessage;
67 private List<EmailAddress> _lstCc;
68 private List<EmailAddress> _lstBcc;
69
70
71
72
73
74
75 @JsonProperty( "sender_name" )
76 public String getSenderName( )
77 {
78 return _strSenderName;
79 }
80
81
82
83
84
85
86
87 @JsonProperty( "sender_name" )
88 public void setSenderName( String strSenderName )
89 {
90 _strSenderName = strSenderName;
91 }
92
93
94
95
96
97
98 @JsonProperty( "sender_email" )
99 public String getSenderEmail( )
100 {
101 return _strSenderEmail;
102 }
103
104
105
106
107
108
109
110 @JsonProperty( "sender_email" )
111 public void setSenderEmail( String strSenderEmail )
112 {
113 _strSenderEmail = strSenderEmail;
114 }
115
116
117
118
119
120
121 @JsonProperty( "recipient" )
122 public List<EmailAddress> getRecipient( )
123 {
124 return _lstRecipient;
125 }
126
127
128
129
130
131
132
133 @JsonProperty( "recipient" )
134 public void setRecipient( List<EmailAddress> lstRecipient )
135 {
136 _lstRecipient = lstRecipient;
137 }
138
139
140
141
142
143
144
145 public void addRecipient( EmailAddress recipient )
146 {
147 if ( this._lstRecipient == null )
148 {
149 this._lstRecipient = new ArrayList<EmailAddress>( );
150 }
151
152 this._lstRecipient.add( recipient );
153 }
154
155
156
157
158
159
160 @JsonProperty( "subject" )
161 public String getSubject( )
162 {
163 return _strSubject;
164 }
165
166
167
168
169
170
171
172 @JsonProperty( "subject" )
173 public void setSubject( String strSubject )
174 {
175 _strSubject = strSubject;
176 }
177
178
179
180
181
182
183 @JsonProperty( "message" )
184 public String getMessage( )
185 {
186 return _strMessage;
187 }
188
189
190
191
192
193
194
195 @JsonProperty( "message" )
196 public void setMessage( String strMessage )
197 {
198 _strMessage = strMessage;
199 }
200
201
202
203
204
205
206 @JsonProperty( "cc" )
207 @JsonInclude( Include.NON_NULL )
208 public List<EmailAddress> getCc( )
209 {
210 return _lstCc;
211 }
212
213
214
215
216
217
218
219 @JsonProperty( "cc" )
220 public void setCc( List<EmailAddress> lstCc )
221 {
222 _lstCc = lstCc;
223 }
224
225
226
227
228
229
230
231 public void addCc( EmailAddress recipient )
232 {
233 if ( this._lstCc == null )
234 {
235 this._lstCc = new ArrayList<EmailAddress>( );
236 }
237
238 this._lstCc.add( recipient );
239 }
240
241
242
243
244
245
246 @JsonProperty( "bcc" )
247 @JsonInclude( Include.NON_NULL )
248 public List<EmailAddress> getBcc( )
249 {
250 return _lstBcc;
251 }
252
253
254
255
256
257
258
259 @JsonProperty( "bcc" )
260 public void setBcc( List<EmailAddress> lstBcc )
261 {
262 _lstBcc = lstBcc;
263 }
264
265
266
267
268
269
270
271 public void addBcc( EmailAddress recipient )
272 {
273 if ( this._lstBcc == null )
274 {
275 this._lstBcc = new ArrayList<EmailAddress>( );
276 }
277
278 this._lstBcc.add( recipient );
279 }
280 }