1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ken.util;
17
18 import org.kuali.rice.ken.bo.NotificationProducerBo;
19 import org.kuali.rice.kew.api.KewApiConstants;
20
21
22
23
24
25 public final class NotificationConstants {
26
27
28
29
30
31
32 public static final class XML_MESSAGE_CONSTANTS {
33 public static final String MESSAGE_OPEN = "<message><![CDATA[";
34 public static final String MESSAGE_CLOSE = "]]></message>";
35 public static final String CONTENT_SIMPLE_OPEN = "<content xmlns=\"ns:notification/ContentTypeSimple\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"ns:notification/ContentTypeSimple resource:notification/ContentTypeSimple\">";
36 public static final String CONTENT_EVENT_OPEN = "<content xmlns=\"ns:notification/ContentTypeEvent\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"ns:notification/ContentTypeEvent resource:notification/ContentTypeEvent\">";
37 public static final String CONTENT_CLOSE = "</content>";
38
39 private XML_MESSAGE_CONSTANTS() {
40 throw new UnsupportedOperationException("do not call");
41 }
42 }
43
44
45
46
47
48 public static final class CONTENT_TYPES {
49 public static final String EVENT_CONTENT_TYPE = "Event";
50 public static final String SIMPLE_CONTENT_TYPE = "Simple";
51
52 private CONTENT_TYPES() {
53 throw new UnsupportedOperationException("do not call");
54 }
55 }
56
57
58
59
60
61
62
63 public static final class DELIVERY_TYPES {
64 public static final String FYI = "FYI";
65 public static final String ACK = "ACK";
66
67 private DELIVERY_TYPES() {
68 throw new UnsupportedOperationException("do not call");
69 }
70 }
71
72
73
74
75
76 public static final String AUTO_REMOVE_CAUSE = "autoremove";
77 public static final String ACK_CAUSE = "ack";
78 public static final String FYI_CAUSE = "fyi";
79
80
81
82
83
84
85
86 public static final class NOTIFICATION_DETAIL_VIEWS {
87 public static final String NORMAL_VIEW = "displayActionListView";
88 public static final String INLINE = "displayActionListInlineView";
89 public static final String DOC_SEARCH_VIEW = "displayDocSearchView";
90
91 private NOTIFICATION_DETAIL_VIEWS() {
92 throw new UnsupportedOperationException("do not call");
93 }
94 }
95
96
97
98
99
100 public static final class NOTIFICATION_CONTROLLER_CONSTANTS {
101 public static final String MSG_DELIVERY_ID = "messageDeliveryId";
102 public static final String DELIVERER_ID = "delivererId";
103 public static final String DOC_ID = "docId";
104 public static final String COMMAND = "command";
105 public static final String STANDALONE_WINDOW = "standaloneWindow";
106
107 private NOTIFICATION_CONTROLLER_CONSTANTS() {
108 throw new UnsupportedOperationException("do not call");
109 }
110 }
111
112
113
114
115
116
117
118
119
120 public static final class MESSAGE_DELIVERY_STATUS {
121 public static final String UNDELIVERED = "UNDELIVERED";
122 public static final String DELIVERED = "DELIVERED";
123 public static final String REMOVED = "REMOVED";
124 public static final String AUTO_REMOVED = "AUTO_REMOVED";
125
126 private MESSAGE_DELIVERY_STATUS() {
127 throw new UnsupportedOperationException("do not call");
128 }
129 }
130
131
132
133
134
135
136
137 public static final class MESSAGE_DELIVERY_TYPES {
138 public static final String KEW_ACTION_LIST_MESSAGE_DELIVERY_TYPE = "KEWActionList";
139 public static final String DEFAULT_MESSAGE_DELIVERY_TYPE = KEW_ACTION_LIST_MESSAGE_DELIVERY_TYPE;
140
141 private MESSAGE_DELIVERY_TYPES() {
142 throw new UnsupportedOperationException("do not call");
143 }
144 }
145
146
147
148
149
150
151
152 public static final class RECIPIENT_TYPES {
153 public static final String USER = "USER";
154 public static final String GROUP = "GROUP";
155
156 private RECIPIENT_TYPES() {
157 throw new UnsupportedOperationException("do not call");
158 }
159 }
160
161
162
163
164
165
166
167 public static final class PROCESSING_FLAGS {
168 public static final String RESOLVED = "RESOLVED";
169 public static final String UNRESOLVED = "UNRESOLVED";
170
171 private PROCESSING_FLAGS() {
172 throw new UnsupportedOperationException("do not call");
173 }
174 }
175
176
177
178
179
180 public static final class LOCKED_FLAG {
181 public static final String UNLOCKED = "U";
182 public static final String LOCKED = "L";
183
184 private LOCKED_FLAG() {
185 throw new UnsupportedOperationException("do not call");
186 }
187 }
188
189
190
191
192
193
194
195 public static final class RESPONSE_STATUSES {
196 public static final String SUCCESS = "Success";
197 public static final String FAILURE = "Failure";
198
199 private RESPONSE_STATUSES() {
200 throw new UnsupportedOperationException("do not call");
201 }
202 }
203
204
205
206
207
208 public static final class RESPONSE_MESSAGES {
209 public static final String SUCCESSFULLY_RECEIVED = "The notification message has been successfully received by the system and will be processed and delivered.";
210 public static final String PRODUCER_NOT_AUTHORIZED_FOR_CHANNEL = "The notification message was received by the system; however, " +
211 "we cannot process it because the Producer specified cannot send notifications for the Notification Channel specified.";
212 public static final String INVALID_RECIPIENT = "The notification message was received by the system; however, we cannot process it because one of " +
213 "the recipients that was specified was invalid and is not registered in the system.";
214 public static final String ERROR_SAVING_NOTIFICATION = "The notification message was received by the system; however, we cannot process it because " +
215 "there was a problem when trying to save the notification to the database.";
216 public static final String INVALID_DELIVERY_TYPE = "The notification message was received by the system; however, we cannot process it because " +
217 "the specified delivery type was invalid.";
218 public static final String INVALID_REMOVE_DATE = "The notification message was received by the system; however, we cannot process it because " +
219 "the specified auto-remove date is before the send date.";
220
221 private RESPONSE_MESSAGES() {
222 throw new UnsupportedOperationException("do not call");
223 }
224 }
225
226
227
228
229
230
231 public static final class BO_PROPERTY_NAMES {
232 public static final String ID = "id";
233 public static final String NAME = "name";
234 public static final String DESCRIPTION = "description";
235 public static final String NAMESPACE = "namespace";
236 public static final String CHANNEL_ID = "channel.id";
237 public static final String RECIPIENT_TYPE = "recipientType";
238 public static final String RECIPIENT_ID = "recipientId";
239 public static final String REVIEWER_ID = "reviewerId";
240 public static final String RECIPIENTS_RECIPIENT_ID = "recipients.recipientId";
241 public static final String PROPERTY = "property";
242 public static final String VALUE = "value";
243 public static final String USER_ID = "userId";
244 public static final String CONTENT = "content";
245 public static final String PRODUCER_ID = "producerId";
246 public static final String CONTENT_TYPE_ID = "contentType.id";
247 public static final String CONTENT_TYPE_NAME = "contentType.name";
248 public static final String PROCESSING_FLAG = "processingFlag";
249 public static final String SEND_DATE_TIME = "sendDateTimeValue";
250 public static final String NOTIFICATION_AUTO_REMOVE_DATE_TIME = "notification.autoRemoveDateTimeValue";
251 public static final String MESSAGE_DELIVERY_STATUS = "messageDeliveryStatus";
252 public static final String LOCKED_DATE = "lockedDateValue";
253
254 public static final String NOTIFICATION = "notification";
255 public static final String USER_RECIPIENT_ID = "userRecipientId";
256 public static final String DELIVERY_SYSTEM_ID = "deliverySystemId";
257
258 private BO_PROPERTY_NAMES() {
259 throw new UnsupportedOperationException("do not call");
260 }
261 }
262
263
264
265
266
267 public static final class KEW_CONSTANTS {
268 public static final String NOTIFICATION_DOC_TYPE = "KualiNotification";
269 public static final String NOTIFICATION_SYSTEM_USER = "notsys";
270 public static final String NOTIFICATION_SYSTEM_USER_NAME = "Notification System";
271 public static final String NOTIFICATION_SYSTEM_USER_PARAM = "ken.system.user";
272 public static final String FYI_AD_HOC_ROUTE = KewApiConstants.ACTION_REQUEST_FYI_REQ;
273 public static final String ACK_AD_HOC_ROUTE = KewApiConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ;
274 public static final String GENERIC_DELIVERY_ANNOTATION = "The notification message has been delivered by the Notification System.";
275 public static final String GENERIC_AUTO_REMOVE_ANNOTATION = "The notification message has been auto-removed by the Notification System.";
276 public static final String NOTIFICATION_ADMIN_GROUP_NAME = "NotificationAdmin";
277 public static final String SEND_NOTIFICATION_REQ_DOC_TYPE = "SendNotificationRequest";
278
279 private KEW_CONSTANTS() {
280 throw new UnsupportedOperationException("do not call");
281 }
282 }
283
284
285
286
287
288
289 public static final class NOTIFICATION_PRODUCERS {
290 public static final NotificationProducerBo NOTIFICATION_SYSTEM_PRODUCER = buildNotificationSystemProducer();
291
292 public static final String NOTIFICATION_SYSTEM_PRODUCER_NAME = "Notification System";
293 public static final String NOTIFICATION_SYSTEM_PRODUCER_DESCRIPTION = "This producer represents messages sent from the general message sending form.";
294 public static final String NOTIFICATION_SYSTEM_PRODUCER_CONTACT_INFO = "admins-notsys@cornell.edu";
295
296
297
298
299
300
301 private static final NotificationProducerBo buildNotificationSystemProducer() {
302 NotificationProducerBo producer = new NotificationProducerBo();
303 producer.setName(NOTIFICATION_SYSTEM_PRODUCER_NAME);
304 producer.setDescription(NOTIFICATION_SYSTEM_PRODUCER_DESCRIPTION);
305 producer.setContactInfo(NOTIFICATION_SYSTEM_PRODUCER_CONTACT_INFO);
306 return producer;
307 }
308
309 private NOTIFICATION_PRODUCERS() {
310 throw new UnsupportedOperationException("do not call");
311 }
312 }
313 }