From d00572c12201a167503a99bcc9a2c7e82074a490 Mon Sep 17 00:00:00 2001 From: Ben Steffensmeier Date: Tue, 14 Feb 2012 12:59:42 -0600 Subject: [PATCH] Issue #176 remove id from dataURI notifications Change-Id: I418de45a0daf13c9656161cc4ef67b755052ea58 Issue #342 - edex_com, edex_notify, and awips2-notification updates. Change-Id: Iba95d0fac10f40c76db4a46924f93cbbe40da4a2 Former-commit-id: 944e59e9899fa00e2509fb6354022052bcdd1e9d [formerly 518db101f2ec18afa31a5b12fbaab3bbb903013b] Former-commit-id: f65d86a06ac59c5e5a0d841a0191d41f62504cc2 --- .../edex/msg/DataURINotificationMessage.java | 15 --- .../PracticeDataURINotificationMessage.java | 15 --- .../uf/edex/esb/camel/DataUriAggregator.java | 22 +--- .../raytheon/uf/edex/esb/camel/ToDataURI.java | 4 +- nativeLib/edex_com/.cproject | 1 + nativeLib/edex_com/src/EdexNotification.cpp | 2 +- nativeLib/edex_com/src/EdexNotification.h | 2 +- .../edex_com/src/Notification_constants.cpp | 40 +------ .../edex_com/src/Notification_constants.h | 40 +------ nativeLib/edex_com/src/Notification_types.cpp | 101 +++--------------- nativeLib/edex_com/src/Notification_types.h | 79 ++++---------- .../Installer.notification/component.spec | 19 +++- .../src/edex_com.tar.bz2 | Bin 0 -> 13209600 bytes 13 files changed, 64 insertions(+), 276 deletions(-) create mode 100644 rpms/awips2.core/Installer.notification/src/edex_com.tar.bz2 diff --git a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/DataURINotificationMessage.java b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/DataURINotificationMessage.java index 7187c0e360..4bd687cbea 100644 --- a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/DataURINotificationMessage.java +++ b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/DataURINotificationMessage.java @@ -42,9 +42,6 @@ public class DataURINotificationMessage implements ISerializableObject { @DynamicSerializeElement private String[] dataURIs; - @DynamicSerializeElement - private int[] ids; - /** * @return the dataURIs */ @@ -52,18 +49,6 @@ public class DataURINotificationMessage implements ISerializableObject { return dataURIs; } - public int[] getIds() { - return ids; - } - - /** - * @param ids - * The ids to set - */ - public void setIds(int[] ids) { - this.ids = ids; - } - /** * @param dataURIs * the dataURIs to set diff --git a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/PracticeDataURINotificationMessage.java b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/PracticeDataURINotificationMessage.java index cd80f1d55a..f5dbb9ad8a 100644 --- a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/PracticeDataURINotificationMessage.java +++ b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/PracticeDataURINotificationMessage.java @@ -42,9 +42,6 @@ public class PracticeDataURINotificationMessage implements ISerializableObject { @DynamicSerializeElement private String[] dataURIs; - @DynamicSerializeElement - private int[] ids; - /** * @return the dataURIs */ @@ -52,18 +49,6 @@ public class PracticeDataURINotificationMessage implements ISerializableObject { return dataURIs; } - public int[] getIds() { - return ids; - } - - /** - * @param ids - * The ids to set - */ - public void setIds(int[] ids) { - this.ids = ids; - } - /** * @param dataURIs * the dataURIs to set diff --git a/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/DataUriAggregator.java b/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/DataUriAggregator.java index 92e935966f..c55f79d785 100644 --- a/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/DataUriAggregator.java +++ b/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/DataUriAggregator.java @@ -44,8 +44,6 @@ public class DataUriAggregator { private List dataUris = new ArrayList(); - private List ids = new ArrayList(); - /** * Add data uris to the queue * @@ -55,11 +53,7 @@ public class DataUriAggregator { synchronized (this) { for (String uri : uris) { if (uri != null) { - int idx = uri.lastIndexOf('/'); - Integer id = Integer.valueOf(uri.substring(idx + 1)); - uri = uri.substring(0, idx); dataUris.add(uri); - ids.add(id); } } } @@ -73,7 +67,7 @@ public class DataUriAggregator { */ public boolean hasUris(Object obj) { synchronized (this) { - return dataUris.size() > 0 || ids.size() > 0; + return dataUris.size() > 0; } } @@ -85,16 +79,9 @@ public class DataUriAggregator { public DataURINotificationMessage sendQueuedUris() { synchronized (this) { String[] uris = dataUris.toArray(new String[dataUris.size()]); - int[] ids = new int[this.ids.size()]; - int idx = 0; - for (Integer i : this.ids) { - ids[idx++] = i.intValue(); - } dataUris.clear(); - this.ids.clear(); DataURINotificationMessage msg = new DataURINotificationMessage(); msg.setDataURIs(uris); - msg.setIds(ids); return msg; } } @@ -107,16 +94,9 @@ public class DataUriAggregator { public PracticeDataURINotificationMessage sendPracticeQueuedUris() { synchronized (this) { String[] uris = dataUris.toArray(new String[dataUris.size()]); - int[] ids = new int[this.ids.size()]; - int idx = 0; - for (Integer i : this.ids) { - ids[idx++] = i.intValue(); - } dataUris.clear(); - this.ids.clear(); PracticeDataURINotificationMessage msg = new PracticeDataURINotificationMessage(); msg.setDataURIs(uris); - msg.setIds(ids); return msg; } } diff --git a/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ToDataURI.java b/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ToDataURI.java index 685b29bf46..d47fbbbe02 100644 --- a/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ToDataURI.java +++ b/edexOsgi/com.raytheon.uf.edex.esb.camel/src/com/raytheon/uf/edex/esb/camel/ToDataURI.java @@ -42,13 +42,13 @@ public class ToDataURI { public String[] toDataURI(PluginDataObject[] pdo) { String[] strs = new String[pdo.length]; for (int i = 0; i < strs.length; i++) { - strs[i] = pdo[i].getDataURI() + '/' + pdo[i].getId(); + strs[i] = pdo[i].getDataURI(); } return strs; } public String toDataURI(PluginDataObject pdo) { - return pdo.getDataURI() + '/' + pdo.getId(); + return pdo.getDataURI(); } } diff --git a/nativeLib/edex_com/.cproject b/nativeLib/edex_com/.cproject index f34df1438c..c74c136ad4 100644 --- a/nativeLib/edex_com/.cproject +++ b/nativeLib/edex_com/.cproject @@ -67,6 +67,7 @@