Fixed Final and Lock error
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-share-widget@100291 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
86d7e843c2
commit
8faccb6e46
|
@ -4,12 +4,15 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.share.Contacts;
|
import org.gcube.portlets.user.td.gwtservice.shared.share.Contacts;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.share.ShareInfo;
|
import org.gcube.portlets.user.td.gwtservice.shared.share.ShareInfo;
|
||||||
import org.gcube.portlets.user.td.sharewidget.client.util.InfoMessageBox;
|
import org.gcube.portlets.user.td.sharewidget.client.util.InfoMessageBox;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.WorkspaceSmartSharingController;
|
import org.gcube.portlets.widgets.workspacesharingwidget.client.WorkspaceSmartSharingController;
|
||||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.SmartShare;
|
import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.SmartShare;
|
||||||
|
@ -52,11 +55,15 @@ public class TRShare {
|
||||||
new AsyncCallback<ShareInfo>() {
|
new AsyncCallback<ShareInfo>() {
|
||||||
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
eventBus.fireEvent(new SessionExpiredEvent(
|
||||||
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
|
} else {
|
||||||
Log.debug("ShareInfo Error: "
|
Log.debug("ShareInfo Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
alert("Error retrienving share info",
|
alert("Error retrienving share info",
|
||||||
"Error retrieving share info");
|
"Error retrieving share info");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSuccess(ShareInfo result) {
|
public void onSuccess(ShareInfo result) {
|
||||||
|
@ -120,19 +127,23 @@ public class TRShare {
|
||||||
new AsyncCallback<Void>() {
|
new AsyncCallback<Void>() {
|
||||||
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
eventBus.fireEvent(new SessionExpiredEvent(
|
||||||
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
|
} else {
|
||||||
Log.debug("Share Error: "
|
Log.debug("Share Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
alert("Error sharing tabular resource",
|
alert("Error sharing tabular resource",
|
||||||
"Error sharing tabular resource: "+caught.getLocalizedMessage());
|
"Error sharing tabular resource: "
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSuccess(Void result) {
|
public void onSuccess(Void result) {
|
||||||
Log.debug("Tabular Resource Shared: "
|
Log.debug("Tabular Resource Shared: "
|
||||||
+ shareInfo.getTabResource().getTrId()
|
+ shareInfo.getTabResource().getTrId()
|
||||||
.toString());
|
.toString());
|
||||||
info("Shared",
|
info("Shared", "Tabular Resource is shared");
|
||||||
"Tabular Resource is shared");
|
|
||||||
|
|
||||||
ChangeTableWhy why = ChangeTableWhy.TABLEUPDATED;
|
ChangeTableWhy why = ChangeTableWhy.TABLEUPDATED;
|
||||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||||
|
|
Loading…
Reference in New Issue