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@150572 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-06-27 13:36:41 +00:00
parent e6b7d8c1a9
commit 989187bf59
37 changed files with 126 additions and 80 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/tabular-data-resources-widget-1.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/tabular-data-resources-widget-1.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/tabular-data-resources-widget-1.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/tabular-data-resources-widget-1.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -45,5 +45,5 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/tabular-data-resources-widget-1.6.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/tabular-data-resources-widget-1.7.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,4 +1,9 @@
<ReleaseNotes>
<Changeset
component="org.gcube.portlets-user.tabular-data-resources-widget.1-7-0"
date="2017-07-01">
<Change>Updated resource management [Ticket #9056]</Change>
</Changeset>
<Changeset
component="org.gcube.portlets-user.tabular-data-resources-widget.1-6-0"
date="2017-04-01">

View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-resources-widget</artifactId>
<version>1.6.0-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
<name>tabular-data-resources-widget</name>

View File

@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
* Delete Column Dialog
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourcesDialog extends Window {

View File

@ -34,8 +34,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourcesListViewDetailPanel extends SimpleContainer {
@ -131,6 +131,8 @@ 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();
@ -297,7 +299,12 @@ public class ResourcesListViewDetailPanel extends SimpleContainer {
btnDelete.setVisible(true);
break;
case SDMX:
btnOpen.setVisible(false);
btnOpen.setVisible(true);
btnSave.setVisible(false);
btnDelete.setVisible(true);
break;
case WEB:
btnOpen.setVisible(true);
btnSave.setVisible(false);
btnDelete.setVisible(true);
break;

View File

@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
* Delete Column Dialog
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourcesListViewDialog extends Window {

View File

@ -13,9 +13,11 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.RemoveResourceS
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTD;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDDescriptor;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDType;
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;
@ -93,8 +95,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
* ResourcesPanel shows the resources
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourcesListViewPanel extends FramedPanel {
@ -474,6 +476,10 @@ 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();
@ -733,6 +739,8 @@ public class ResourcesListViewPanel extends FramedPanel {
break;
case SDMX:
break;
case WEB:
break;
case GENERIC_FILE:
requestSaveResource(resourceTDDescriptor, MimeTypeSupport._unknow);
break;
@ -854,6 +862,10 @@ public class ResourcesListViewPanel extends FramedPanel {
requestOpenMap(resourceTDDescriptor);
break;
case SDMX:
requestOpenSDMX(resourceTDDescriptor);
break;
case WEB:
requestOpenWEB(resourceTDDescriptor);
break;
case GENERIC_FILE:
requestOpenGenericFile(resourceTDDescriptor);
@ -873,7 +885,38 @@ public class ResourcesListViewPanel extends FramedPanel {
chartDialog.show();
}
private void requestOpenSDMX(ResourceTDDescriptor resourceTDDescriptor) {
ResourceTD resource = resourceTDDescriptor.getResourceTD();
if (resource instanceof SDMXResourceTD) {
SDMXResourceTD sdmxResourceTD=(SDMXResourceTD) resource;
String link=
sdmxResourceTD.getStringValue();
Log.debug("Retrieved link: " + link);
Window.open(link,
resourceTDDescriptor.getName(), "");
}
}
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(), "");
}
}
protected void requestOpenMap(
final ResourceTDDescriptor resourceTDDescriptor) {
ResourceTD resource = resourceTDDescriptor.getResourceTD();

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface ResourcesMessages extends Messages {

View File

@ -77,8 +77,8 @@ import com.sencha.gxt.widget.core.client.menu.MenuItem;
* ResourcesPanel shows the resources
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourcesPanel extends FramedPanel {

View File

@ -18,8 +18,8 @@ import com.google.web.bindery.event.shared.SimpleEventBus;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourcesWidgetEntry implements EntryPoint {

View File

@ -12,8 +12,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
* Delete Column Dialog
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ChartViewerDialog extends Window {
@ -21,23 +21,10 @@ public class ChartViewerDialog extends Window {
private static final String HEIGHT = "460px";
private ChartViewerMessages msgs;
/**
*
* @param resourceTDDescriptor
* @param trId
* @param eventBus
*/
public ChartViewerDialog(ResourceTDDescriptor resourceTDDescriptor, TRId trId, EventBus eventBus) {
this(resourceTDDescriptor, trId,eventBus, false);
}
/**
*
* @param resourceTDDescriptor
* @param trId
* @param eventBus
* @param test
*/
public ChartViewerDialog(ResourceTDDescriptor resourceTDDescriptor, TRId trId, EventBus eventBus, boolean test) {
initMessages();
initWindow();

View File

@ -6,8 +6,8 @@ import com.google.gwt.i18n.client.Messages;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface ChartViewerMessages extends Messages {

View File

@ -70,8 +70,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
* ResourcesPanel shows the resources
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ChartViewerPanel extends FramedPanel {

View File

@ -19,8 +19,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
*
* @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourceTDTypeButtonCell extends ResizeCell<ResourceTDType> implements HasSelectHandlers {

View File

@ -15,8 +15,8 @@ import com.sencha.gxt.core.client.XTemplates;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ResourceTDTypeButtonCellAppearance {

View File

@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.resourceswidget.client.graphics;
*
* Basic Vector 2D
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class Vector2D {

View File

@ -10,8 +10,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface ResourceTDDescriptorProperties extends

View File

@ -10,8 +10,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface ZoomLevelPropertiesCombo extends PropertyAccess<ZoomLevelElement> {

View File

@ -7,8 +7,8 @@ import com.google.gwt.resources.client.ImageResource;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface ResourceBundle extends ClientBundle {
@ -131,6 +131,15 @@ public interface ResourceBundle extends ClientBundle {
@Source("sdmx_160.png")
ImageResource sdmx160();
@Source("world_32.png")
ImageResource world32();
@Source("world_80.png")
ImageResource world80();
@Source("world_160.png")
ImageResource world160();
@Source("table.png")
ImageResource table();

View File

@ -7,8 +7,8 @@ import com.google.gwt.resources.client.CssResource;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface ResourceCSS extends CssResource {

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -24,8 +24,8 @@ import com.sencha.gxt.widget.core.client.form.Radio;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DestinationSelectionCard extends WizardCard {

View File

@ -13,8 +13,8 @@ import com.google.gwt.user.client.Command;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class DownloadFileCard extends WizardCard {

View File

@ -28,8 +28,8 @@ import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayou
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class OperationInProgressCard extends WizardCard {

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public interface SaveResourceMessages extends Messages {

View File

@ -9,20 +9,15 @@ import com.google.web.bindery.event.shared.EventBus;
/**
*
* @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class SaveResourceWizard extends WizardWindow {
private String WIZARDWIDTH = "844px";
/**
*
* @param saveResourceSession
* @param title
* @param eventBus
*/
public SaveResourceWizard(SaveResourceSession saveResourceSession,
String title, EventBus eventBus) {
super(title, eventBus);

View File

@ -29,8 +29,8 @@ import com.sencha.gxt.widget.core.client.form.validator.EmptyValidator;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class WorkSpaceSelectionCard extends WizardCard {

View File

@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.resourceswidget.client.store;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ZoomLevelElement {

View File

@ -8,8 +8,8 @@ import java.util.ArrayList;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class ZoomLevelStore implements Serializable {

View File

@ -6,8 +6,8 @@ import com.google.gwt.core.client.GWT;
/**
*
* @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public enum ZoomLevelType {

View File

@ -4,8 +4,8 @@ import com.sencha.gxt.widget.core.client.box.MessageBox;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class InfoMessageBox extends MessageBox {

View File

@ -10,8 +10,8 @@ import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi
*
*
*/
public class UtilsGXT3 {

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB