ref 9056:TabMan - Improve resource management in TabMan

https://support.d4science.org/issues/9056

Improve resources management

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-resources-widget@150916 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-07-07 13:45:47 +00:00
parent 989187bf59
commit 0909055093
2 changed files with 2 additions and 31 deletions

View File

@ -131,8 +131,6 @@ public class ResourcesListViewDetailPanel extends SimpleContainer {
case SDMX:
thumbnailPath = ResourceBundle.INSTANCE.sdmx160().getSafeUri();
break;
case WEB:
thumbnailPath = ResourceBundle.INSTANCE.world160().getSafeUri();
default:
thumbnailPath = ResourceBundle.INSTANCE.resources160()
.getSafeUri();
@ -303,11 +301,6 @@ public class ResourcesListViewDetailPanel extends SimpleContainer {
btnSave.setVisible(false);
btnDelete.setVisible(true);
break;
case WEB:
btnOpen.setVisible(true);
btnSave.setVisible(false);
btnDelete.setVisible(true);
break;
default:
btnOpen.setVisible(false);
btnSave.setVisible(false);

View File

@ -17,7 +17,6 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.SDMXResourceTD;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.SaveResourceSession;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.StringResourceTD;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.TableResourceTD;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.WebResourceTD;
import org.gcube.portlets.user.td.gwtservice.shared.uriresolver.UriResolverSession;
import org.gcube.portlets.user.td.resourceswidget.client.charts.ChartViewerDialog;
import org.gcube.portlets.user.td.resourceswidget.client.resources.ResourceBundle;
@ -476,10 +475,6 @@ public class ResourcesListViewPanel extends FramedPanel {
case SDMX:
thumbnailPath = ResourceBundle.INSTANCE.sdmx80().getSafeUri();
break;
case WEB:
thumbnailPath = ResourceBundle.INSTANCE.world80().getSafeUri();
break;
default:
thumbnailPath = ResourceBundle.INSTANCE.resources80()
.getSafeUri();
@ -739,8 +734,6 @@ public class ResourcesListViewPanel extends FramedPanel {
break;
case SDMX:
break;
case WEB:
break;
case GENERIC_FILE:
requestSaveResource(resourceTDDescriptor, MimeTypeSupport._unknow);
break;
@ -864,9 +857,6 @@ public class ResourcesListViewPanel extends FramedPanel {
case SDMX:
requestOpenSDMX(resourceTDDescriptor);
break;
case WEB:
requestOpenWEB(resourceTDDescriptor);
break;
case GENERIC_FILE:
requestOpenGenericFile(resourceTDDescriptor);
break;
@ -891,7 +881,7 @@ public class ResourcesListViewPanel extends FramedPanel {
if (resource instanceof SDMXResourceTD) {
SDMXResourceTD sdmxResourceTD=(SDMXResourceTD) resource;
String link=
sdmxResourceTD.getStringValue();
sdmxResourceTD.getResourceUrl();
Log.debug("Retrieved link: " + link);
Window.open(link,
resourceTDDescriptor.getName(), "");
@ -901,19 +891,7 @@ public class ResourcesListViewPanel extends FramedPanel {
}
private void requestOpenWEB(ResourceTDDescriptor resourceTDDescriptor) {
ResourceTD resource = resourceTDDescriptor.getResourceTD();
if (resource instanceof WebResourceTD) {
WebResourceTD sdmxResourceTD=(WebResourceTD) resource;
String link=
sdmxResourceTD.getStringValue();
Log.debug("Retrieved link: " + link);
Window.open(link,
resourceTDDescriptor.getName(), "");
}
}