From 1a41ddcc6e59a2e89422672c483ea8bc08a8c12a Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 18 Nov 2013 13:36:43 +0000 Subject: [PATCH] Minor updated git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-export-widget@85615 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/CSVExportWizardTD.java | 8 +++---- .../client/SourceSelectionCard.java | 22 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/CSVExportWizardTD.java b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/CSVExportWizardTD.java index 533c686..76d8524 100644 --- a/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/CSVExportWizardTD.java +++ b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/CSVExportWizardTD.java @@ -2,7 +2,7 @@ package org.gcube.portlets.user.td.csvexportwidget.client; -import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession; +import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession; import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow; @@ -13,7 +13,7 @@ import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow; */ public class CSVExportWizardTD extends WizardWindow { - protected CSVImportSession importSession; + protected CSVExportSession exportSession; /** @@ -24,10 +24,10 @@ public class CSVExportWizardTD extends WizardWindow { public CSVExportWizardTD(String title) { super(title); - importSession= new CSVImportSession(); + exportSession= new CSVExportSession(); - SourceSelectionCard sourceSelection= new SourceSelectionCard(importSession); + SourceSelectionCard sourceSelection= new SourceSelectionCard(exportSession); addCard(sourceSelection); sourceSelection.setup(); diff --git a/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/SourceSelectionCard.java b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/SourceSelectionCard.java index 9b1d465..8ffa7bb 100644 --- a/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/SourceSelectionCard.java +++ b/src/main/java/org/gcube/portlets/user/td/csvexportwidget/client/SourceSelectionCard.java @@ -5,7 +5,7 @@ package org.gcube.portlets.user.td.csvexportwidget.client; -import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession; +import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession; import org.gcube.portlets.user.td.gwtservice.shared.source.FileSource; import org.gcube.portlets.user.td.gwtservice.shared.source.WorkspaceSource; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; @@ -27,17 +27,17 @@ import com.sencha.gxt.widget.core.client.form.Radio; */ public class SourceSelectionCard extends WizardCard { - protected final CSVImportSession importSession; + protected final CSVExportSession exportSession; final FileSource fileSource = FileSource.INSTANCE; final WorkspaceSource workspaceSource = WorkspaceSource.INSTANCE; - public SourceSelectionCard(final CSVImportSession importSession) { + public SourceSelectionCard(final CSVExportSession exportSession) { super("CSV destination selection", ""); - this.importSession = importSession; + this.exportSession = exportSession; // Default - importSession.setSource(fileSource); + exportSession.setSource(fileSource); VerticalPanel sourceSelectionPanel = new VerticalPanel(); sourceSelectionPanel.setStylePrimaryName(res.wizardCSS() @@ -78,10 +78,10 @@ public class SourceSelectionCard extends WizardCard { Radio radio = (Radio) group.getValue(); Log.info("Source Selected:" + radio.getName()); if (radio.getName().compareTo(workspaceSource.getName()) == 0) { - importSession.setSource(workspaceSource); + exportSession.setSource(workspaceSource); } else { if (radio.getName().compareTo(fileSource.getName()) == 0) { - importSession.setSource(fileSource); + exportSession.setSource(fileSource); } else { } @@ -106,15 +106,15 @@ public class SourceSelectionCard extends WizardCard { Command sayNextCard = new Command() { public void execute() { try { - String sourceId = importSession.getSource().getId(); + String sourceId = exportSession.getSource().getId(); if (sourceId == null || sourceId.isEmpty()) { Log.error("CSV Import Source Id: " + sourceId); } else { if (sourceId.compareTo("File") == 0) { Log.info("NextCard CSVUploadFileCard"); - /*CSVUploadFileCard csvUploadFileCard = new CSVUploadFileCard( - importSession); - getWizardWindow().addCard(csvUploadFileCard);*/ + DownloadFileCard downloadFileCard = new DownloadFileCard( + exportSession); + getWizardWindow().addCard(downloadFileCard); getWizardWindow().nextCard(); } else { if (sourceId.compareTo("Workspace") == 0) {