Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-extractcodelist-widget@96307 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-05-29 16:11:49 +00:00
parent 71da9b38fc
commit 39177ac3b6
3 changed files with 23 additions and 23 deletions

View File

@ -75,7 +75,7 @@ public class ExtractCodelistOperationInProgressCard extends WizardCard implement
ProgressBar progressBar = new ProgressBar();
operationInProgressPanel.add(progressBar, new BoxLayoutData(
new Margins(10, 5, 10, 5)));
new Margins(10, 30, 10, 5)));
progressUpdater = new ExtractCodelistProgressUpdater();
progressUpdater

View File

@ -36,8 +36,8 @@ public class ExtractCodelistProgressBarUpdater implements ExtractCodelistProgres
* {@inheritDoc}
*/
public void operationComplete() {
Log.info("Export completed");
progressBar.updateProgress(1, "Export completed.");
Log.info("Completed");
progressBar.updateProgress(1, "Completed.");
}
@ -45,8 +45,8 @@ public class ExtractCodelistProgressBarUpdater implements ExtractCodelistProgres
* {@inheritDoc}
*/
public void operationFailed(Throwable caught, String reason, String failureDetails) {
Log.info("Export failed");
progressBar.updateText("Export failed");
Log.info("Failed");
progressBar.updateText("Failed");
}
public void operationInitializing() {
@ -61,7 +61,7 @@ public class ExtractCodelistProgressBarUpdater implements ExtractCodelistProgres
if (elaborated>0 && elaborated<1) {
Log.trace("progress "+elaborated);
int elab=new Float(elaborated*100).intValue();
progressBar.updateProgress(elaborated,elab+"% Exporting...");
progressBar.updateProgress(elaborated,elab+"% Progress...");
}
if (elaborated == 1) progressBar.updateProgress(1, "Completing...");

View File

@ -6,7 +6,7 @@ package org.gcube.portlets.user.td.extractcodelistwidget.client.progress;
import java.util.ArrayList;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportMonitor;
import org.gcube.portlets.user.td.gwtservice.shared.extract.ExtractCodelistMonitor;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
@ -31,7 +31,7 @@ public class ExtractCodelistProgressUpdater extends Timer {
public void run() {
Log.debug("requesting operation progress");
TDGWTServiceAsync.INSTANCE
.getCSVExportMonitor(new AsyncCallback<CSVExportMonitor>() {
.getExtractCodelistMonitor(new AsyncCallback<ExtractCodelistMonitor>() {
public void onFailure(Throwable caught) {
@ -43,17 +43,17 @@ public class ExtractCodelistProgressUpdater extends Timer {
"Failed getting operation updates", message);
}
public void onSuccess(CSVExportMonitor result) {
Log.info("retrieved CSVImportMonitor: "
public void onSuccess(ExtractCodelistMonitor result) {
Log.info("retrieved Monitor: "
+ result.getStatus());
switch (result.getStatus()) {
case INITIALIZING:
Log.info("CSV Export Initializing...");
Log.info("Initializing...");
fireOperationInitializing();
break;
case ABORTED:
cancel();
Log.info("CSV Export Operation Aborted");
Log.info("Operation Aborted");
break;
case IN_PROGRESS:
fireOperationUpdate(result.getProgress());
@ -75,8 +75,8 @@ public class ExtractCodelistProgressUpdater extends Timer {
break;
case SUCCEDED:
cancel();
Log.info("Export fisnish ExportMetadata:"
+ result.getTrExportMetadata());
Log.info("Finish:"
+ result.toString());
fireOperationComplete();
break;
default:
@ -90,18 +90,18 @@ public class ExtractCodelistProgressUpdater extends Timer {
}
protected void errorMessage(CSVExportMonitor result) {
Log.info("CSV Export Failed");
protected void errorMessage(ExtractCodelistMonitor result) {
Log.info("Extract Codelist Failed");
Throwable th = null;
String failure = null;
String details = null;
if (result.getError() != null) {
th = result.getError();
failure = "Failed Client Library Export";
failure = "Failed Client Library Extract Codelist";
details = result.getError().getLocalizedMessage();
} else {
th = new Throwable("Failed");
failure = "Failed Client Library Export";
failure = "Failed Client Library Extract Codelist";
details = "Error in export";
}
@ -109,16 +109,16 @@ public class ExtractCodelistProgressUpdater extends Timer {
}
protected void stopMessage(CSVExportMonitor result) {
Log.info("CSV Export Stopped");
protected void stopMessage(ExtractCodelistMonitor result) {
Log.info("Extract Codelist Stopped");
String failure = null;
String details = null;
if (result.getError() != null) {
failure = "Stopped export csv";
failure = "Stopped extract codelist";
details = result.getError().getLocalizedMessage();
} else {
failure = "Stopped export csv";
details = "Stopped export csv";
failure = "Stopped extract codelist";
details = "Stopped extract codelist";
}
fireOperationStopped(result.getTrId(),failure, details);