Merge "Issue #1501 Route notification requests to datadelivery." into 13.2.1_delivery
Former-commit-id:77923b1cef
[formerly84b6f0217f
] [formerly77923b1cef
[formerly84b6f0217f
] [formerly26e72198b7
[formerly 9fb35681ebe6d17679cd26cc86a53aeb357bcd3b]]] Former-commit-id:26e72198b7
Former-commit-id:a83bc7ce7f
[formerly821572355e
] Former-commit-id:c3cfb16075
This commit is contained in:
commit
87a442717b
1 changed files with 9 additions and 8 deletions
|
@ -9,13 +9,13 @@ import com.raytheon.uf.common.datadelivery.event.notification.DeleteNotification
|
|||
import com.raytheon.uf.common.datadelivery.event.notification.DeleteNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.GetNotificationRequest;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.NotificationRecord;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
|
||||
import com.raytheon.uf.common.serialization.comm.RequestRouter;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.notification.INotificationObserver;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationException;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationMessage;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.uf.viz.datadelivery.notification.xml.MessageLoadXML;
|
||||
|
||||
/**
|
||||
|
@ -29,6 +29,7 @@ import com.raytheon.uf.viz.datadelivery.notification.xml.MessageLoadXML;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 12, 2012 jsanchez Initial creation
|
||||
* Jan 22, 2013 1501 djohnson Route requests to datadelivery.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -115,10 +116,10 @@ public class NotificationHandler implements INotificationObserver {
|
|||
request.setUsername(username);
|
||||
request.setHours(hours);
|
||||
request.setMaxResults(maxResults);
|
||||
ArrayList<NotificationRecord> response = (ArrayList<NotificationRecord>) ThriftClient
|
||||
.sendRequest(request);
|
||||
ArrayList<NotificationRecord> response = (ArrayList<NotificationRecord>) RequestRouter
|
||||
.route(request, DataDeliveryConstants.DATA_DELIVERY_SERVER);
|
||||
return response;
|
||||
} catch (VizException e) {
|
||||
} catch (Exception e) {
|
||||
statusHandler.error(
|
||||
"Error trying to retrieve notifications from database", e);
|
||||
}
|
||||
|
@ -139,10 +140,10 @@ public class NotificationHandler implements INotificationObserver {
|
|||
try {
|
||||
DeleteNotificationRequest request = new DeleteNotificationRequest();
|
||||
request.setIds(ids);
|
||||
DeleteNotificationResponse response = (DeleteNotificationResponse) ThriftClient
|
||||
.sendRequest(request);
|
||||
DeleteNotificationResponse response = (DeleteNotificationResponse) RequestRouter
|
||||
.route(request, DataDeliveryConstants.DATA_DELIVERY_SERVER);
|
||||
rowsDeleted = response.getRowsDeleted();
|
||||
} catch (VizException e) {
|
||||
} catch (Exception e) {
|
||||
statusHandler.error(
|
||||
"Error trying to delete notification(s) from database", e);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue