Minor updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-sdmx-export-widget@84593 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-10-29 15:17:13 +00:00 committed by Giancarlo Panichi
parent 89262eba2b
commit e8731f4a1d
10 changed files with 43 additions and 41 deletions

View File

@ -4,6 +4,7 @@
package org.gcube.portlets.user.td.sdmxexportwidget.client;
import org.gcube.portlets.user.td.gwtservice.shared.Agencies;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportSession;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.google.gwt.event.logical.shared.SelectionEvent;

View File

@ -3,8 +3,8 @@
*/
package org.gcube.portlets.user.td.sdmxexportwidget.client;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.Agencies;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.SDMXExportSession;
import org.gcube.portlets.user.td.gwtservice.shared.Agencies;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportSession;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -3,8 +3,8 @@
*/
package org.gcube.portlets.user.td.sdmxexportwidget.client;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.Codelist;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.SDMXExportSession;
import org.gcube.portlets.user.td.gwtservice.shared.Codelist;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportSession;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -3,7 +3,7 @@
*/
package org.gcube.portlets.user.td.sdmxexportwidget.client;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.SDMXExportSession;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportSession;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log;
@ -21,10 +21,10 @@ public class SDMXDatasetSelectionCard extends WizardCard {
protected SDMXExportSession importSession;
protected DatasetSelectionPanel datasetSelectionPanel;
public SDMXDatasetSelectionCard(final SDMXExportSession importSession) {
public SDMXDatasetSelectionCard(final SDMXExportSession exportSession) {
super("SDMX Dataset selection", "");
this.importSession = importSession;
this.exportSession = exportSession;
thisCard=this;

View File

@ -1,7 +1,6 @@
package org.gcube.portlets.user.td.sdmxexportwidget.client;
import org.gcube.portlets.user.td.sdmxexportwidget.client.rpc.SDMXExportWizardServiceAsync;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.SDMXExportSession;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportSession;
import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow;
import com.google.gwt.user.client.rpc.AsyncCallback;

View File

@ -6,8 +6,8 @@ package org.gcube.portlets.user.td.sdmxexportwidget.client;
import org.gcube.portlets.user.td.sdmxexportwidget.client.progress.ImportProgressBarUpdater;
import org.gcube.portlets.user.td.sdmxexportwidget.client.progress.OperationProgressListener;
import org.gcube.portlets.user.td.sdmxexportwidget.client.progress.OperationProgressUpdater;
import org.gcube.portlets.user.td.sdmxexportwidget.client.rpc.SDMXExportWizardServiceAsync;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.SDMXExportSession;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportSession;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import org.gcube.portlets.user.td.gwtservice.shared.TRId;
@ -36,15 +36,15 @@ public class SDMXOperationInProgressCard extends WizardCard
public static final int STATUS_POLLING_DELAY = 1000;
protected SDMXOperationInProgressCard thisCard;
protected SDMXExportSession importSession;
protected SDMXExportSession exportSession;
protected OperationProgressUpdater progressUpdater;
public SDMXOperationInProgressCard(final SDMXExportSession importSession) {
public SDMXOperationInProgressCard(final SDMXExportSession exportSession) {
super("Operation In Progress", "");
this.importSession = importSession;
this.exportSession = exportSession;
thisCard=this;
VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
@ -80,7 +80,7 @@ public class SDMXOperationInProgressCard extends WizardCard
public void exportSDMX()
{
SDMXExportWizardServiceAsync.INSTANCE.exportSDMXClientLibraryRequest(importSession, new AsyncCallback<Void>() {
TDGWTServiceAsync.INSTANCE.exportSDMXClientLibraryRequest(exportSession, new AsyncCallback<Void>() {
@Override
public void onSuccess(Void result) {

View File

@ -3,12 +3,14 @@
*/
package org.gcube.portlets.user.td.sdmxexportwidget.client;
import java.util.ArrayList;
import java.util.List;
import org.gcube.portlets.user.td.sdmxexportwidget.client.rpc.SDMXExportWizardServiceAsync;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.Agencies;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.SDMXExportSession;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.TableDetail;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.Agencies;
import org.gcube.portlets.user.td.gwtservice.shared.TabResource;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportSession;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import com.allen_sauer.gwt.log.client.Log;
@ -51,7 +53,7 @@ import com.sencha.gxt.widget.core.client.info.Info;
*/
public class SDMXTableDetailCard extends WizardCard {
protected SDMXExportSession importSession;
protected SDMXExportSession exportSession;
protected SDMXTableDetailCard thisCard;
protected static final AgenciesProperties agenciesProperties = GWT.create(AgenciesProperties.class);
@ -66,14 +68,14 @@ public class SDMXTableDetailCard extends WizardCard {
protected TextField right;
protected ComboBox<Agencies> combo=null;
TableDetail detail=new TableDetail();
public SDMXTableDetailCard(final SDMXExportSession importSession) {
public SDMXTableDetailCard(final SDMXExportSession exportSession) {
super("SDMX Table Detail", "");
this.importSession = importSession;
this.exportSession = exportSession;
thisCard=this;
@ -99,14 +101,14 @@ public class SDMXTableDetailCard extends WizardCard {
name = new TextField();
name.setAllowBlank(false);
name.setEmptyText("Enter a name...");
name.setValue(importSession.getSelectedCodelist().getName());
name.setValue(exportSession.getSelectedCodelist().getName());
p.add(new FieldLabel(name, "Name"), new VerticalLayoutData(1, -1));
description = new TextArea();
description.setAllowBlank(false);
description.setEmptyText("Enter a description...");
description.setValue(importSession.getSelectedCodelist().getDescription());
description.setValue(exportSession.getSelectedCodelist().getDescription());
p.add(new FieldLabel(description, "Description"), new VerticalLayoutData(1, -1));
right = new TextField();
@ -168,7 +170,7 @@ public class SDMXTableDetailCard extends WizardCard {
protected void loadData(PagingLoadConfig loadConfig, final AsyncCallback<PagingLoadResult<Agencies>> callback) {
SDMXExportWizardServiceAsync.INSTANCE.getAgencies(new AsyncCallback<List<Agencies>>() {
TDGWTServiceAsync.INSTANCE.getAgencies(new AsyncCallback<ArrayList<Agencies>>() {
@Override
public void onFailure(Throwable caught) {
@ -176,7 +178,7 @@ public class SDMXTableDetailCard extends WizardCard {
}
@Override
public void onSuccess(List<Agencies> result) {
public void onSuccess(ArrayList<Agencies> result) {
Log.trace("loaded "+result.size()+" agencies");
for(int i=0; i<result.size(); i++){
Agencies ag=result.get(i);
@ -215,14 +217,15 @@ public class SDMXTableDetailCard extends WizardCard {
@Override
public void execute() {
TabResource detail=new TabResource();
detail.setName(name.getCurrentValue());
detail.setAgency(combo.getSelectedText());
detail.setDescription(description.getCurrentValue());
detail.setRight(right.getCurrentValue());
importSession.setTableDetail(detail);
exportSession.setTabResource(detail);
SDMXOperationInProgressCard sdmxOperationInProgressCard = new SDMXOperationInProgressCard(
importSession);
exportSession);
getWizardWindow()
.addCard(sdmxOperationInProgressCard);
Log.info("NextCard SDMXOperationInProgressCard");

View File

@ -6,7 +6,7 @@ package org.gcube.portlets.user.td.sdmxexportwidget.client.progress;
import org.gcube.portlets.user.td.gxtservice.shared.TRId;
import org.gcube.portlets.user.td.gwtservice.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
import com.sencha.gxt.widget.core.client.ProgressBar;

View File

@ -3,7 +3,6 @@
*/
package org.gcube.portlets.user.td.sdmxexportwidget.client.progress;
import org.gcube.portlets.user.td.gxtservice.shared.TRId;
@ -31,7 +30,7 @@ public interface OperationProgressListener {
/**
* Called when the operation is complete.
*/
public void operationComplete(TRId trId);
public void operationComplete(String url);
/**
* Called when the operation is failed.

View File

@ -5,9 +5,9 @@ package org.gcube.portlets.user.td.sdmxexportwidget.client.progress;
import java.util.ArrayList;
import org.gcube.portlets.user.td.gxtservice.shared.TRId;
import org.gcube.portlets.user.td.sdmxexportwidget.client.rpc.SDMXExportWizardServiceAsync;
import org.gcube.portlets.user.td.sdmxexportwidget.shared.ExportMonitor;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.TRId;
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXExportMonitor;
import com.allen_sauer.gwt.log.client.Log;
@ -33,7 +33,7 @@ public class OperationProgressUpdater extends Timer {
@Override
public void run() {
Log.debug("requesting operation progress");
SDMXExportWizardServiceAsync.INSTANCE.getExportMonitor(new AsyncCallback<ExportMonitor>() {
TDGWTServiceAsync.INSTANCE.getSDMXExportMonitor(new AsyncCallback<SDMXExportMonitor>() {
@Override
public void onFailure(Throwable caught) {
@ -44,7 +44,7 @@ public class OperationProgressUpdater extends Timer {
}
@Override
public void onSuccess(ExportMonitor result) {
public void onSuccess(SDMXExportMonitor result) {
Log.info("retrieved ImportMonitor: "+result.getStatus());
switch (result.getStatus()) {
case WAITING:
@ -61,8 +61,8 @@ public class OperationProgressUpdater extends Timer {
break;
case SUCCEDED:
cancel();
Log.info("Import fisnish TableId :"+result.getTrId());
fireOperationComplete(result.getTrId());
Log.info("Import fisnish TableId :"+result.getUrl());
fireOperationComplete(result.getUrl());
break;
case ABORTED:
cancel();
@ -101,9 +101,9 @@ public class OperationProgressUpdater extends Timer {
for (OperationProgressListener listener:listeners) listener.operationUpdate(elaborated);
}
protected void fireOperationComplete(TRId trId)
protected void fireOperationComplete(String url)
{
for (OperationProgressListener listener:listeners) listener.operationComplete(trId);
for (OperationProgressListener listener:listeners) listener.operationComplete(url);
}
protected void fireOperationFailed(Throwable caught, String failure, String failureDetails)