Removed depcreated TIBCO Pagebus library and replaces with Liferay's IPC Client Side
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@164773 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c3187bfb7b
commit
d8c5513572
|
@ -8,9 +8,6 @@
|
||||||
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
<dependent-module archiveName="switch-button-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/switch-button-widget/switch-button-widget">
|
|
||||||
<dependency-type>uses</dependency-type>
|
|
||||||
</dependent-module>
|
|
||||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||||
<property name="context-root" value="share-updates"/>
|
<property name="context-root" value="share-updates"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<Changeset component="org.gcube.portlets-user.shareupdates.2-6-0"
|
<Changeset component="org.gcube.portlets-user.shareupdates.2-6-0"
|
||||||
date="2018-02-07">
|
date="2018-02-07">
|
||||||
<Change>restyled checkbox for notifications</Change>
|
<Change>restyled checkbox for notifications</Change>
|
||||||
|
<Change>Removed depcreated TIBCO Pagebus library and replaces with Liferay's IPC Client Side</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.shareupdates.2-5-0"
|
<Changeset component="org.gcube.portlets-user.shareupdates.2-5-0"
|
||||||
date="2017-12-07">
|
date="2017-12-07">
|
||||||
|
|
6
pom.xml
6
pom.xml
|
@ -190,11 +190,7 @@
|
||||||
<artifactId>htmlcleaner</artifactId>
|
<artifactId>htmlcleaner</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.eliasbalasis</groupId>
|
|
||||||
<artifactId>tibcopagebus4gwt</artifactId>
|
|
||||||
<version>1.2.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-validator</groupId>
|
<groupId>commons-validator</groupId>
|
||||||
<artifactId>commons-validator</artifactId>
|
<artifactId>commons-validator</artifactId>
|
||||||
|
|
|
@ -15,4 +15,14 @@ public class ShareUpdates implements EntryPoint {
|
||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
RootPanel.get("shareUpdateDiv").add(new ShareUpdateForm());
|
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
|
||||||
|
});
|
||||||
|
}-*/;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.gcube.portal.databook.shared.PrivacyLevel;
|
||||||
import org.gcube.portal.databook.shared.UserInfo;
|
import org.gcube.portal.databook.shared.UserInfo;
|
||||||
import org.gcube.portlets.user.shareupdates.client.ShareUpdateService;
|
import org.gcube.portlets.user.shareupdates.client.ShareUpdateService;
|
||||||
import org.gcube.portlets.user.shareupdates.client.ShareUpdateServiceAsync;
|
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.LinkPreview;
|
||||||
import org.gcube.portlets.user.shareupdates.shared.UploadedFile;
|
import org.gcube.portlets.user.shareupdates.shared.UploadedFile;
|
||||||
import org.gcube.portlets.user.shareupdates.shared.UserSettings;
|
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.FileSubmit;
|
||||||
import org.gcube.portlets.widgets.fileupload.client.view.UploadProgressPanel;
|
import org.gcube.portlets.widgets.fileupload.client.view.UploadProgressPanel;
|
||||||
import org.gcube.portlets.widgets.switchbutton.client.SwitchButton;
|
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.Button;
|
||||||
import com.github.gwtbootstrap.client.ui.ListBox;
|
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.Image;
|
||||||
import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment;
|
import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
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.
|
* The main share update class.
|
||||||
* @author Massimiliano Assante at ISTI CNR
|
* @author Massimiliano Assante at ISTI CNR
|
||||||
|
@ -66,7 +63,6 @@ public class ShareUpdateForm extends Composite {
|
||||||
private final ShareUpdateServiceAsync shareupdateService = GWT
|
private final ShareUpdateServiceAsync shareupdateService = GWT
|
||||||
.create(ShareUpdateService.class);
|
.create(ShareUpdateService.class);
|
||||||
|
|
||||||
final PageBusAdapter pageBusAdapter = new PageBusAdapter();
|
|
||||||
|
|
||||||
// the label for all Vres/channels
|
// the label for all Vres/channels
|
||||||
private final static String ALL_VRES = "Share with: your Virtual Research Environments";
|
private final static String ALL_VRES = "Share with: your Virtual Research Environments";
|
||||||
|
@ -546,14 +542,9 @@ public class ShareUpdateForm extends Composite {
|
||||||
if (post == null)
|
if (post == null)
|
||||||
Window.alert("Ops! we encountered some problems delivering your message, please try again in a short while.");
|
Window.alert("Ops! we encountered some problems delivering your message, please try again in a short while.");
|
||||||
else {
|
else {
|
||||||
// publish a message with the refresh notification
|
ClientFeedJsonizer cJsonizer = (ClientFeedJsonizer) GWT.create(ClientFeedJsonizer.class);
|
||||||
try {
|
String json = cJsonizer.asString(post);
|
||||||
|
ShareUpdates.sendLiferayIPCEvent(json);
|
||||||
pageBusAdapter.PageBusPublish("org.gcube.portal.databook.shared", post, (Jsonizer)GWT.create(ClientFeedJsonizer.class));
|
|
||||||
|
|
||||||
} catch (PageBusAdapterException ex) {
|
|
||||||
GWT.log(ex.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//needed when posting long texts otherwise it stays with the current height
|
//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.");
|
Window.alert("Ops! we encountered some problems delivering your message, please try again in a short while.");
|
||||||
else {
|
else {
|
||||||
// publish a message with the refresh notification
|
// publish a message with the refresh notification
|
||||||
try {
|
// try {
|
||||||
pageBusAdapter.PageBusPublish("org.gcube.portal.databook.shared", feed, (Jsonizer)GWT.create(ClientFeedJsonizer.class));
|
// pageBusAdapter.PageBusPublish("org.gcube.portal.databook.shared", feed, (Jsonizer)GWT.create(ClientFeedJsonizer.class));
|
||||||
GWT.log("SENT");
|
// GWT.log("SENT");
|
||||||
} catch (PageBusAdapterException ex) {
|
// } catch (PageBusAdapterException ex) {
|
||||||
GWT.log(ex.getMessage());
|
// 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
|
//needed when posting long texts otherwise it stays with the current height
|
||||||
|
|
|
@ -3,16 +3,12 @@
|
||||||
<!-- Inherit the core Web Toolkit stuff. -->
|
<!-- Inherit the core Web Toolkit stuff. -->
|
||||||
<inherits name='com.google.gwt.user.User' />
|
<inherits name='com.google.gwt.user.User' />
|
||||||
|
|
||||||
<inherits name="net.eliasbalasis.tibcopagebus4gwt.tibcopagebus4gwt" />
|
|
||||||
<inherits name="org.jsonmaker.gwt.Gwt_jsonmaker" />
|
<inherits name="org.jsonmaker.gwt.Gwt_jsonmaker" />
|
||||||
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
||||||
<!-- inherits GCUBE Widgets -->
|
<!-- inherits GCUBE Widgets -->
|
||||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||||
<inherits name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
<inherits name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
||||||
|
|
||||||
<inherits
|
|
||||||
name="net.eliasbalasis.tibcopagebus4gwt.testsubscriber.TestSubscriber" />
|
|
||||||
|
|
||||||
<!-- Responsive design -->
|
<!-- Responsive design -->
|
||||||
<set-property name="bootstrap.responsiveDesign" value="true" />
|
<set-property name="bootstrap.responsiveDesign" value="true" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue