ref #11879: TDM - Update to StorageHUB
https://support.d4science.org/issues/#11879 Updated to StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@169494 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d9e30ea968
commit
0f4ec53573
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/tabular-data-csv-import-widget-2.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/tabular-data-csv-import-widget-2.10.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-csv-import-widget-2.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/tabular-data-csv-import-widget-2.10.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -33,5 +33,5 @@
|
|||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/tabular-data-csv-import-widget-2.9.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/tabular-data-csv-import-widget-2.10.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset
|
||||
component="org.gcube.portlets-user.tabular-data-csv-import-widget.2-10-0"
|
||||
date="2018-07-01">
|
||||
<Change>Updated to StorageHub [task #11879]</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets-user.tabular-data-csv-import-widget.2-9-0"
|
||||
date="2017-02-15">
|
||||
|
|
12
pom.xml
12
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-csv-import-widget</artifactId>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<version>2.10.0-SNAPSHOT</version>
|
||||
|
||||
<name>tabular-data-csv-import-widget</name>
|
||||
<description>tabular-data-csv-import-widget allows csv import from file and workspace</description>
|
||||
|
@ -129,20 +129,14 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- WSLT dependencies -->
|
||||
<!-- workspace-explorer -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>workspace-explorer</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>home-library</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- LOGGING -->
|
||||
<dependency>
|
||||
<groupId>com.allen-sauer.gwt.log</groupId>
|
||||
|
|
|
@ -50,8 +50,8 @@ import com.sencha.gxt.widget.core.client.tips.ToolTipConfig;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVConfigCard extends WizardCard {
|
||||
|
|
|
@ -20,8 +20,8 @@ import com.sencha.gxt.widget.core.client.grid.Grid;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVErrorWindow extends Window {
|
||||
|
|
|
@ -7,6 +7,8 @@ import com.google.web.bindery.event.shared.EventBus;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class CSVImportWizardTD extends WizardWindow {
|
||||
|
||||
|
@ -15,10 +17,7 @@ public class CSVImportWizardTD extends WizardWindow {
|
|||
protected String WIZARDHEIGHT = "520px";
|
||||
//private CSVImportWizardTD wizard;
|
||||
|
||||
/**
|
||||
* The id of the {@link CSVTarget} to use.
|
||||
* @param targetId
|
||||
*/
|
||||
|
||||
|
||||
public CSVImportWizardTD(String title, EventBus eventBus) {
|
||||
super(title,eventBus);
|
||||
|
|
|
@ -4,6 +4,11 @@ import com.allen_sauer.gwt.log.client.Log;
|
|||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class CSVImportWizardTDEntry implements EntryPoint {
|
||||
|
||||
|
||||
|
|
|
@ -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 CSVImportWizardTDMessages extends Messages {
|
||||
|
|
|
@ -32,8 +32,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>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVOperationInProgressCard extends WizardCard implements
|
||||
|
|
|
@ -50,8 +50,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVTableDetailCard extends WizardCard {
|
||||
|
|
|
@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.container.MarginData;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVUploadFileCard extends WizardCard {
|
||||
|
|
|
@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVWorkSpaceSelectionCard extends WizardCard {
|
||||
|
|
|
@ -21,8 +21,7 @@ import com.sencha.gxt.widget.core.client.tips.ToolTipConfig;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class CsvCheckPanel extends VerticalPanel {
|
||||
|
@ -84,16 +83,11 @@ public class CsvCheckPanel extends VerticalPanel {
|
|||
msgs = GWT.create(CSVImportWizardTDMessages.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
||||
public TextButton getCheckConfiguration() {
|
||||
return btnCheckConfiguration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the skipInvalidCheckBox
|
||||
*/
|
||||
public CheckBox getSkipInvalidCheckBox() {
|
||||
return chBoxSkipInvalid;
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ import com.sencha.gxt.widget.core.client.form.FormPanel;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class FileUploadPanel extends FormPanel {
|
||||
|
|
|
@ -22,8 +22,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>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SourceSelectionCard extends WizardCard {
|
||||
|
|
|
@ -31,8 +31,8 @@ import com.sencha.gxt.widget.core.client.grid.RowNumberer;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVGrid extends Grid<CSVRow> {
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.google.gwt.i18n.client.Messages;
|
|||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* email:
|
||||
*
|
||||
*/
|
||||
public interface CSVGridMessages extends Messages {
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.sencha.gxt.widget.core.client.menu.Menu;
|
|||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVGridView extends GridView<CSVRow> {
|
||||
|
|
|
@ -13,7 +13,7 @@ import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
|
|||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CSVJsonReader implements DataReader<ListLoadResult<CSVRow>, String> {
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.google.gwt.core.client.JsArray;
|
|||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final class CSVData extends JavaScriptObject {
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.google.gwt.core.client.JavaScriptObject;
|
|||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final class CSVRow extends JavaScriptObject {
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.google.gwt.resources.client.CssResource;
|
|||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface CSVImportCSS extends CssResource {
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface LicenceDataPropertiesCombo extends
|
||||
|
|
|
@ -8,11 +8,8 @@ import com.google.gwt.core.client.GWT;
|
|||
import com.sencha.gxt.widget.core.client.ProgressBar;
|
||||
|
||||
/**
|
||||
* Updates a {@link ProgressBar} progress and text based on
|
||||
* {@link CSVImportProgressListener} events.
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class FileUploadProgressBarUpdater implements FileUploadProgressListener {
|
||||
|
@ -20,12 +17,6 @@ public class FileUploadProgressBarUpdater implements FileUploadProgressListener
|
|||
private ProgressBar progressBar;
|
||||
private FileUploadProgressMessages msgs;
|
||||
|
||||
/**
|
||||
* Creates a new {@link ProgressBar} updater.
|
||||
*
|
||||
* @param progressBar
|
||||
* the {@link ProgressBar} to update.
|
||||
*/
|
||||
public FileUploadProgressBarUpdater(ProgressBar progressBar) {
|
||||
initMessages();
|
||||
this.progressBar = progressBar;
|
||||
|
@ -36,18 +27,12 @@ public class FileUploadProgressBarUpdater implements FileUploadProgressListener
|
|||
msgs = GWT.create(FileUploadProgressMessages.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void operationComplete() {
|
||||
Log.info("File upload complete");
|
||||
progressBar.updateProgress(1, msgs.fileUploadCompleted());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void operationFailed(Throwable caught, String reason,
|
||||
String failureDetails) {
|
||||
Log.info("File upload failed");
|
||||
|
|
|
@ -3,33 +3,24 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.td.csvimportwidget.client.progress;
|
||||
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author "Giancarlo Panichi"
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class FileUploadProgressCardUpdater implements FileUploadProgressListener {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
public FileUploadProgressCardUpdater() {
|
||||
}
|
||||
|
||||
|
||||
public void operationComplete() {
|
||||
Log.info("File upload completed");
|
||||
|
||||
Log.info("File upload completed");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void operationFailed(Throwable caught, String reason, String failureDetails) {
|
||||
Log.info("File upload failed");
|
||||
}
|
||||
|
@ -39,7 +30,7 @@ public class FileUploadProgressCardUpdater implements FileUploadProgressListener
|
|||
}
|
||||
|
||||
public void operationUpdate(float elaborated) {
|
||||
Log.info("File uploading: "+elaborated);
|
||||
Log.info("File uploading: " + elaborated);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,39 +3,20 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.td.csvimportwidget.client.progress;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines a listener for operation progress.
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author "Giancarlo Panichi"
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface FileUploadProgressListener {
|
||||
|
||||
/**
|
||||
* Called when the operation is starting.
|
||||
*/
|
||||
|
||||
public void operationInitializing();
|
||||
|
||||
/**
|
||||
* Called when there is a progress for the operation.
|
||||
* @param elaborated the elaborated part.
|
||||
*/
|
||||
|
||||
public void operationUpdate(float elaborated);
|
||||
|
||||
|
||||
/**
|
||||
* Called when the operation is complete.
|
||||
*/
|
||||
|
||||
public void operationComplete();
|
||||
|
||||
/**
|
||||
* Called when the operation is failed.
|
||||
* @param caught the failure exception.
|
||||
* @param reason the failure reason.
|
||||
*/
|
||||
public void operationFailed(Throwable caught, String reason, String failureDetails);
|
||||
}
|
||||
|
|
|
@ -4,13 +4,12 @@ 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 FileUploadProgressMessages extends Messages {
|
||||
|
||||
//
|
||||
|
||||
@DefaultMessage("Please Wait...")
|
||||
String pleaseWait();
|
||||
|
||||
|
|
|
@ -14,71 +14,55 @@ import com.google.gwt.user.client.Timer;
|
|||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
/**
|
||||
* This {@link Timer} retrieves {@link OperationProgress} from the specified
|
||||
* {@link OperationProgressSource} with the scheduled interval. The retrieved
|
||||
* information are spread to the subscribed {@link CSVImportProgressListener}.
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class FileUploadProgressUpdater extends Timer {
|
||||
|
||||
private ArrayList<FileUploadProgressListener> listeners = new ArrayList<FileUploadProgressListener>();
|
||||
private static FileUploadProgressMessages msgs = GWT
|
||||
.create(FileUploadProgressMessages.class);
|
||||
private static FileUploadProgressMessages msgs = GWT.create(FileUploadProgressMessages.class);
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
Log.debug("requesting operation progress");
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getFileUploadMonitor(new AsyncCallback<FileUploadMonitor>() {
|
||||
TDGWTServiceAsync.INSTANCE.getFileUploadMonitor(new AsyncCallback<FileUploadMonitor>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
cancel();
|
||||
Log.error("Error retrieving the operation state",
|
||||
caught);
|
||||
String message = getStack(caught);
|
||||
fireOperationFailed(caught,
|
||||
msgs.failedGettingOperarionUpdateds(), message);
|
||||
}
|
||||
public void onFailure(Throwable caught) {
|
||||
cancel();
|
||||
Log.error("Error retrieving the operation state", caught);
|
||||
String message = getStack(caught);
|
||||
fireOperationFailed(caught, msgs.failedGettingOperarionUpdateds(), message);
|
||||
}
|
||||
|
||||
public void onSuccess(FileUploadMonitor result) {
|
||||
Log.info("retrieved FileUploadMonitor: "
|
||||
+ result.getState());
|
||||
switch (result.getState()) {
|
||||
case STARTED:
|
||||
Log.debug("File Upload Started");
|
||||
break;
|
||||
case INPROGRESS:
|
||||
Log.debug("Progress: "
|
||||
+ result.getElaboratedLenght() + " of "
|
||||
+ result.getTotalLenght());
|
||||
fireOperationUpdate(result.getPercentDone());
|
||||
break;
|
||||
case FAILED:
|
||||
Log.debug("File Upload Failed");
|
||||
cancel();
|
||||
fireOperationFailed(new Throwable(
|
||||
msgs.fileUploadFailedHead()), result
|
||||
.getFailureReason(), result
|
||||
.getFailureDetails());
|
||||
break;
|
||||
case COMPLETED:
|
||||
cancel();
|
||||
Log.debug("File Upload Completed");
|
||||
fireOperationComplete();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
public void onSuccess(FileUploadMonitor result) {
|
||||
Log.info("retrieved FileUploadMonitor: " + result.getState());
|
||||
switch (result.getState()) {
|
||||
case STARTED:
|
||||
Log.debug("File Upload Started");
|
||||
break;
|
||||
case INPROGRESS:
|
||||
Log.debug("Progress: " + result.getElaboratedLenght() + " of " + result.getTotalLenght());
|
||||
fireOperationUpdate(result.getPercentDone());
|
||||
break;
|
||||
case FAILED:
|
||||
Log.debug("File Upload Failed");
|
||||
cancel();
|
||||
fireOperationFailed(new Throwable(msgs.fileUploadFailedHead()), result.getFailureReason(),
|
||||
result.getFailureDetails());
|
||||
break;
|
||||
case COMPLETED:
|
||||
cancel();
|
||||
Log.debug("File Upload Completed");
|
||||
fireOperationComplete();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,30 +89,15 @@ public class FileUploadProgressUpdater extends Timer {
|
|||
listener.operationComplete();
|
||||
}
|
||||
|
||||
protected void fireOperationFailed(Throwable caught, String failure,
|
||||
String failureDetails) {
|
||||
protected void fireOperationFailed(Throwable caught, String failure, String failureDetails) {
|
||||
for (FileUploadProgressListener listener : listeners)
|
||||
listener.operationFailed(caught, failure, failureDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new {@link CSVImportProgressListener} to this
|
||||
* {@link FileUploadProgressUpdater}.
|
||||
*
|
||||
* @param listener
|
||||
* the listener to add.
|
||||
*/
|
||||
public void addListener(FileUploadProgressListener listener) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified {@link CSVImportProgressListener} from this
|
||||
* {@link FileUploadProgressUpdater}.
|
||||
*
|
||||
* @param listener
|
||||
* the listener to remove.
|
||||
*/
|
||||
public void removeListener(FileUploadProgressListener listener) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue