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