Updated to JAVA 7

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-export-widget@86993 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-12-16 17:44:49 +00:00
parent 987fa8f2b1
commit 3d750e50e8
10 changed files with 13 additions and 32 deletions

View File

@ -86,7 +86,6 @@ public class CSVExportConfigCard extends WizardCard {
encodings.setTriggerAction(TriggerAction.ALL);
encodings.addSelectionHandler(new SelectionHandler<String>() {
@Override
public void onSelection(SelectionEvent<String> event) {
}
@ -97,7 +96,6 @@ public class CSVExportConfigCard extends WizardCard {
TDGWTServiceAsync.INSTANCE
.getAvailableCharset(new AsyncCallback<AvailableCharsetList>() {
@Override
public void onSuccess(AvailableCharsetList result) {
GWT.log("CharsetInfo: "
+ result.getCharsetList().size()
@ -114,7 +112,6 @@ public class CSVExportConfigCard extends WizardCard {
/**
* {@inheritDoc}
*/
@Override
public void onFailure(Throwable caught) {
GWT.log("Error loading charset list", caught);
showErrorAndHide("Error loading charset list",
@ -156,7 +153,6 @@ public class CSVExportConfigCard extends WizardCard {
delimitersGroup
.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
@Override
public void onValueChange(
ValueChangeEvent<HasValue<Boolean>> event) {
@ -191,7 +187,6 @@ public class CSVExportConfigCard extends WizardCard {
csvColumnGridPanel
.addSelectionHandler(new SelectionHandler<ColumnData>() {
@Override
public void onSelection(SelectionEvent<ColumnData> event) {
}
@ -222,7 +217,6 @@ public class CSVExportConfigCard extends WizardCard {
Log.debug("CSVExportConfigCard Setup");
Command sayNextCard = new Command() {
@Override
public void execute() {
Log.debug("CSVExportConfigCard Call sayNextCard");
checkData();
@ -241,7 +235,6 @@ public class CSVExportConfigCard extends WizardCard {
AlertMessageBox d;
HideHandler hideHandler = new HideHandler() {
@Override
public void onHide(HideEvent event) {
getWizardWindow().setEnableNextButton(true);
getWizardWindow().setEnableBackButton(false);

View File

@ -5,7 +5,7 @@ import com.google.gwt.core.client.EntryPoint;
public class CSVExportWizardTDEntry implements EntryPoint {
@Override
public void onModuleLoad() {
CSVExportWizardTD exportWizard= new CSVExportWizardTD("CSVExport");
Log.info(exportWizard.getId());

View File

@ -89,12 +89,11 @@ CSVExportProgressListener {
public void exportCSV() {
TDGWTServiceAsync.INSTANCE.startCSVExport(exportSession, new AsyncCallback<Void>() {
@Override
public void onSuccess(Void result) {
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
}
@Override
public void onFailure(Throwable caught) {
showErrorAndHide("Error in exportCSV",
"An error occured in exportCSV: "+caught.getLocalizedMessage(), caught.getStackTrace().toString(), caught);
@ -112,17 +111,14 @@ CSVExportProgressListener {
exportCSV();
}
@Override
public void operationInitializing() {
}
@Override
public void operationUpdate(float elaborated) {
}
@Override
public void operationComplete() {
// final String tableId,final String tableResourceId) {
@ -146,7 +142,6 @@ CSVExportProgressListener {
getWizardWindow().setEnableNextButton(true);
}
@Override
public void operationFailed(Throwable caught, String reason,
String failureDetails) {

View File

@ -79,7 +79,7 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
wpanel.setSelectableTypes(lItemType);
wpanel.addSelectionHandler(new ItemSelectionHandler() {
@Override
public void onSelection(ItemSelectionEvent event) {
item = event.getSelectedItem();
Log.debug("Selected Item:" + item);
@ -108,7 +108,6 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
AlertMessageBox d;
HideHandler hideHandler = new HideHandler() {
@Override
public void onHide(HideEvent event) {
wpanel.enable();
getWizardWindow().setEnableNextButton(true);
@ -156,7 +155,6 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
Log.debug("CSVWorkSpaceSelectionCard Call Setup ");
Command sayNextCard = new Command() {
@Override
public void execute() {
Log.debug("CSVWorkSpaceSelectionCard Call sayNextCard wpanel:"
+ wpanel);

View File

@ -74,7 +74,7 @@ public class DestinationSelectionCard extends WizardCard {
toggle.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
@Override
public void onValueChange(ValueChangeEvent<HasValue<Boolean>> event) {
try {
ToggleGroup group = (ToggleGroup) event.getSource();

View File

@ -35,7 +35,7 @@ public class DownloadFileCard extends WizardCard {
@Override
public void setup() {
Command sayNextCard = new Command() {
@Override
public void execute() {
}

View File

@ -88,7 +88,7 @@ public class ColumnDataGridPanel extends ContentPanel implements
protected void onAfterFirstAttach() {
super.onAfterFirstAttach();
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
loader.load();
}
@ -125,14 +125,13 @@ public class ColumnDataGridPanel extends ContentPanel implements
TDGWTServiceAsync.INSTANCE
.getColumns(new AsyncCallback<ArrayList<ColumnData>>() {
@Override
public void onFailure(Throwable caught) {
Log.error("No load columns: "
+ caught.getLocalizedMessage());
callback.onFailure(caught);
}
@Override
public void onSuccess(ArrayList<ColumnData> result) {
Log.trace("loaded " + result.size() + " columns");
callback.onSuccess(new ListLoadResultBean<ColumnData>(
@ -149,7 +148,7 @@ public class ColumnDataGridPanel extends ContentPanel implements
}
@Override
public HandlerRegistration addSelectionHandler(
SelectionHandler<ColumnData> handler) {
return grid.getSelectionModel().addSelectionHandler(handler);

View File

@ -33,7 +33,6 @@ public class CSVExportProgressBarUpdater implements CSVExportProgressListener {
/**
* {@inheritDoc}
*/
@Override
public void operationComplete() {
Log.info("Export completed");
progressBar.updateProgress(1, "Export completed.");
@ -43,19 +42,17 @@ public class CSVExportProgressBarUpdater implements CSVExportProgressListener {
/**
* {@inheritDoc}
*/
@Override
public void operationFailed(Throwable caught, String reason, String failureDetails) {
Log.info("Export failed");
progressBar.updateText("Export failed.");
}
@Override
public void operationInitializing() {
Log.info("Export Inizializing");
progressBar.updateProgress(0, "Initializing...");
}
@Override
public void operationUpdate(float elaborated) {
Log.info("Export elaborated: "+elaborated);
if (elaborated == 0) progressBar.updateProgress(0, "Initializing...");

View File

@ -35,7 +35,7 @@ public class CSVExportProgressUpdater extends Timer {
TDGWTServiceAsync.INSTANCE
.getCSVExportMonitor(new AsyncCallback<CSVExportMonitor>() {
@Override
public void onFailure(Throwable caught) {
cancel();
Log.error("Error retrieving the operation state",
@ -45,7 +45,6 @@ public class CSVExportProgressUpdater extends Timer {
"Failed getting operation updates", message);
}
@Override
public void onSuccess(CSVExportMonitor result) {
Log.info("retrieved CSVImportMonitor: "
+ result.getStatus());
@ -102,7 +101,7 @@ public class CSVExportProgressUpdater extends Timer {
AlertMessageBox d = new AlertMessageBox("Error in CSV Export", details);
d.addHideHandler(new HideHandler() {
@Override
public void onHide(HideEvent event) {
//
}

View File

@ -48,14 +48,14 @@ public class GwtTestCSVExportWizardTD extends GWTTestCase {
// Send a request to the server.
tdGWTService.getTabularResources(new AsyncCallback<ArrayList<TabResource>>() {
@Override
public void onFailure(Throwable caught) {
// The request resulted in an unexpected error.
fail("Request failure: " + caught.getMessage());
}
@Override
public void onSuccess(ArrayList<TabResource> result) {
// Shows the first three resources.
int i=0;