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