diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 2a3f9ff..16cc1af 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -8,9 +8,6 @@
uses
-
- uses
-
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 3fc476e..0d99b39 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -2,6 +2,7 @@
restyled checkbox for notifications
+ Removed depcreated TIBCO Pagebus library and replaces with Liferay's IPC Client Side
diff --git a/pom.xml b/pom.xml
index 9413b6b..771d0f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -190,11 +190,7 @@
htmlcleaner
2.2
-
- net.eliasbalasis
- tibcopagebus4gwt
- 1.2.0
-
+
commons-validator
commons-validator
diff --git a/src/main/java/org/gcube/portlets/user/shareupdates/client/ShareUpdates.java b/src/main/java/org/gcube/portlets/user/shareupdates/client/ShareUpdates.java
index 428d9db..4dd40d1 100644
--- a/src/main/java/org/gcube/portlets/user/shareupdates/client/ShareUpdates.java
+++ b/src/main/java/org/gcube/portlets/user/shareupdates/client/ShareUpdates.java
@@ -15,4 +15,14 @@ public class ShareUpdates implements EntryPoint {
public void onModuleLoad() {
RootPanel.get("shareUpdateDiv").add(new ShareUpdateForm());
}
+ /**
+ * fire the event to the News Feed portlet
+ * @param json
+ */
+ public static native void sendLiferayIPCEvent(String json) /*-{
+ $wnd.Liferay.fire('newPostCreated',{
+ payload: json
+ });
+ }-*/;
+
}
diff --git a/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java b/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java
index 856732e..8685891 100644
--- a/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java
+++ b/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java
@@ -10,6 +10,7 @@ import org.gcube.portal.databook.shared.PrivacyLevel;
import org.gcube.portal.databook.shared.UserInfo;
import org.gcube.portlets.user.shareupdates.client.ShareUpdateService;
import org.gcube.portlets.user.shareupdates.client.ShareUpdateServiceAsync;
+import org.gcube.portlets.user.shareupdates.client.ShareUpdates;
import org.gcube.portlets.user.shareupdates.shared.LinkPreview;
import org.gcube.portlets.user.shareupdates.shared.UploadedFile;
import org.gcube.portlets.user.shareupdates.shared.UserSettings;
@@ -20,7 +21,6 @@ import org.gcube.portlets.widgets.fileupload.client.events.FileUploadCompleteEve
import org.gcube.portlets.widgets.fileupload.client.view.FileSubmit;
import org.gcube.portlets.widgets.fileupload.client.view.UploadProgressPanel;
import org.gcube.portlets.widgets.switchbutton.client.SwitchButton;
-import org.jsonmaker.gwt.client.Jsonizer;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.ListBox;
@@ -52,9 +52,6 @@ import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment;
import com.google.gwt.user.client.ui.Widget;
-
-import net.eliasbalasis.tibcopagebus4gwt.client.PageBusAdapter;
-import net.eliasbalasis.tibcopagebus4gwt.client.PageBusAdapterException;
/**
* The main share update class.
* @author Massimiliano Assante at ISTI CNR
@@ -66,7 +63,6 @@ public class ShareUpdateForm extends Composite {
private final ShareUpdateServiceAsync shareupdateService = GWT
.create(ShareUpdateService.class);
- final PageBusAdapter pageBusAdapter = new PageBusAdapter();
// the label for all Vres/channels
private final static String ALL_VRES = "Share with: your Virtual Research Environments";
@@ -546,14 +542,9 @@ public class ShareUpdateForm extends Composite {
if (post == null)
Window.alert("Ops! we encountered some problems delivering your message, please try again in a short while.");
else {
- // publish a message with the refresh notification
- try {
-
- pageBusAdapter.PageBusPublish("org.gcube.portal.databook.shared", post, (Jsonizer)GWT.create(ClientFeedJsonizer.class));
-
- } catch (PageBusAdapterException ex) {
- GWT.log(ex.getMessage());
- }
+ ClientFeedJsonizer cJsonizer = (ClientFeedJsonizer) GWT.create(ClientFeedJsonizer.class);
+ String json = cJsonizer.asString(post);
+ ShareUpdates.sendLiferayIPCEvent(json);
}
//needed when posting long texts otherwise it stays with the current height
@@ -600,12 +591,15 @@ public class ShareUpdateForm extends Composite {
Window.alert("Ops! we encountered some problems delivering your message, please try again in a short while.");
else {
// publish a message with the refresh notification
- try {
- pageBusAdapter.PageBusPublish("org.gcube.portal.databook.shared", feed, (Jsonizer)GWT.create(ClientFeedJsonizer.class));
- GWT.log("SENT");
- } catch (PageBusAdapterException ex) {
- GWT.log(ex.getMessage());
- }
+// try {
+// pageBusAdapter.PageBusPublish("org.gcube.portal.databook.shared", feed, (Jsonizer)GWT.create(ClientFeedJsonizer.class));
+// GWT.log("SENT");
+// } catch (PageBusAdapterException ex) {
+// GWT.log(ex.getMessage());
+// }
+ ClientFeedJsonizer cJsonizer = (ClientFeedJsonizer) GWT.create(ClientFeedJsonizer.class);
+ String json = cJsonizer.asString(feed);
+ ShareUpdates.sendLiferayIPCEvent(json);
}
//needed when posting long texts otherwise it stays with the current height
diff --git a/src/main/resources/org/gcube/portlets/user/shareupdates/ShareUpdates.gwt.xml b/src/main/resources/org/gcube/portlets/user/shareupdates/ShareUpdates.gwt.xml
index c245926..ef15ea1 100644
--- a/src/main/resources/org/gcube/portlets/user/shareupdates/ShareUpdates.gwt.xml
+++ b/src/main/resources/org/gcube/portlets/user/shareupdates/ShareUpdates.gwt.xml
@@ -3,16 +3,12 @@
-
+
-
-
-