Added Collateral Table List
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-monitor-widget@111533 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
764fc876ad
commit
212e922584
|
@ -4,7 +4,6 @@ package org.gcube.portlets.user.td.monitorwidget.client;
|
||||||
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.sencha.gxt.widget.core.client.ProgressBar;
|
import com.sencha.gxt.widget.core.client.ProgressBar;
|
||||||
|
@ -33,7 +32,7 @@ public class MonitorBarUpdater implements MonitorUpdaterListener {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void monitorComplete(TRId trId, OperationMonitor operationMonitor) {
|
public void monitorComplete(OperationMonitor operationMonitor) {
|
||||||
Log.info("Completed");
|
Log.info("Completed");
|
||||||
progressBar.updateProgress(1, "Completed");
|
progressBar.updateProgress(1, "Completed");
|
||||||
|
|
||||||
|
@ -81,8 +80,8 @@ public class MonitorBarUpdater implements MonitorUpdaterListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorStopped(TRId trId,String reason, String details, OperationMonitor operationMonitor) {
|
public void monitorStopped(String reason, String details, OperationMonitor operationMonitor) {
|
||||||
Log.debug("Operation Stopped: ["+trId.toString()+", "+reason+", "+details+"]");
|
Log.debug("Operation Stopped: ["+operationMonitor.getTrId()+", "+reason+", "+details+"]");
|
||||||
progressBar.updateText("Validations failed");
|
progressBar.updateText("Validations failed");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.event.BackgroundReque
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.BackgroundRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.BackgroundRequestType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
|
@ -51,7 +51,7 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
private TextButton btnOk;
|
private TextButton btnOk;
|
||||||
private TextButton btnBackground;
|
private TextButton btnBackground;
|
||||||
private TextButton btnAbort;
|
private TextButton btnAbort;
|
||||||
private TRId trId;
|
private OperationMonitor operationMonitorResult;
|
||||||
private String reason;
|
private String reason;
|
||||||
private String details;
|
private String details;
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
public MonitorDialog(String taskId, EventBus eventBus) {
|
public MonitorDialog(String taskId, EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
trId = null;
|
operationMonitorResult = null;
|
||||||
//Log.debug("Monitor Dialog Creation Start: "+dateTimeFormat.format(new Date()));
|
//Log.debug("Monitor Dialog Creation Start: "+dateTimeFormat.format(new Date()));
|
||||||
initWindow();
|
initWindow();
|
||||||
create();
|
create();
|
||||||
|
@ -266,7 +266,7 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorComplete(TRId trId, OperationMonitor operationMonitor) {
|
public void monitorComplete(OperationMonitor operationMonitor) {
|
||||||
try {
|
try {
|
||||||
if (monitorDetailPanel != null) {
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
|
@ -274,12 +274,12 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Log.debug(e.getLocalizedMessage());
|
Log.debug(e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
Log.debug("Operation Complete return: " + trId.toString());
|
Log.debug("Operation Complete return: " + operationMonitor.getTrId());
|
||||||
this.trId = trId;
|
this.operationMonitorResult = operationMonitor;
|
||||||
btnBackground.setVisible(false);
|
btnBackground.setVisible(false);
|
||||||
btnAbort.setVisible(false);
|
btnAbort.setVisible(false);
|
||||||
forceLayout();
|
forceLayout();
|
||||||
fireOperationComplete(trId);
|
fireOperationComplete(operationMonitor);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,15 +306,15 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateInvocation() {
|
public void updateInvocation() {
|
||||||
if (trId != null) {
|
if (operationMonitorResult != null) {
|
||||||
fireOperationStopped(trId, reason, details);
|
fireOperationStopped(operationMonitorResult, reason, details);
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorStopped(TRId trId, String reason, String details,
|
public void monitorStopped(String reason, String details,
|
||||||
OperationMonitor operationMonitor) {
|
OperationMonitor operationMonitor) {
|
||||||
try {
|
try {
|
||||||
if (monitorDetailPanel != null) {
|
if (monitorDetailPanel != null) {
|
||||||
|
@ -323,9 +323,9 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Log.debug(e.getLocalizedMessage());
|
Log.debug(e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
|
Log.debug("Operation Stopped: [" + operationMonitor.getTrId() + ", " + reason
|
||||||
+ ", " + details + "]");
|
+ ", " + details + "]");
|
||||||
this.trId = trId;
|
this.operationMonitorResult = operationMonitor;
|
||||||
this.reason = reason;
|
this.reason = reason;
|
||||||
this.details = details;
|
this.details = details;
|
||||||
btnOk.setVisible(true);
|
btnOk.setVisible(true);
|
||||||
|
@ -376,9 +376,12 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationComplete(TRId trId) {
|
protected void fireOperationComplete(OperationMonitor operationMonitor) {
|
||||||
for (MonitorDialogListener listener : listeners)
|
for (MonitorDialogListener listener : listeners){
|
||||||
listener.operationComplete(trId);
|
OperationResult operationResult=new OperationResult(operationMonitor.getTrId(),
|
||||||
|
operationMonitor.getCollateralTableIds());
|
||||||
|
listener.operationComplete(operationResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationFailed(Throwable caught, String reason,
|
protected void fireOperationFailed(Throwable caught, String reason,
|
||||||
|
@ -387,9 +390,12 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
listener.operationFailed(caught, reason, details);
|
listener.operationFailed(caught, reason, details);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationStopped(TRId trId, String reason, String details) {
|
protected void fireOperationStopped(OperationMonitor operationMonitor, String reason, String details) {
|
||||||
for (MonitorDialogListener listener : listeners)
|
for (MonitorDialogListener listener : listeners){
|
||||||
listener.operationStopped(trId, reason, details);
|
OperationResult operationResult=new OperationResult(operationMonitor.getTrId(),
|
||||||
|
operationMonitor.getCollateralTableIds());
|
||||||
|
listener.operationStopped(operationResult, reason, details);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationAborted() {
|
protected void fireOperationAborted() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package org.gcube.portlets.user.td.monitorwidget.client;
|
package org.gcube.portlets.user.td.monitorwidget.client;
|
||||||
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -14,8 +14,9 @@ public interface MonitorDialogListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is complete.
|
* Called when the operation is complete.
|
||||||
|
* @param operationResult TODO
|
||||||
*/
|
*/
|
||||||
public void operationComplete(TRId trId);
|
public void operationComplete(OperationResult operationResult);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is failed.
|
* Called when the operation is failed.
|
||||||
|
@ -30,12 +31,11 @@ public interface MonitorDialogListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is stopped
|
* Called when the operation is stopped
|
||||||
*
|
* @param operationResult TODO
|
||||||
* @param trId
|
|
||||||
* @param reason
|
* @param reason
|
||||||
* @param details
|
* @param details
|
||||||
*/
|
*/
|
||||||
public void operationStopped(TRId trId, String reason, String details);
|
public void operationStopped(OperationResult operationResult, String reason, String details);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,6 @@ import java.util.ArrayList;
|
||||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitorSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitorSession;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.user.client.Timer;
|
import com.google.gwt.user.client.Timer;
|
||||||
|
@ -145,7 +144,7 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
details = "Operation stopped";
|
details = "Operation stopped";
|
||||||
}
|
}
|
||||||
|
|
||||||
fireMonitorStopped(result.getTrId(),reason, details,result);
|
fireMonitorStopped(reason, details,result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -179,7 +178,7 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
|
|
||||||
protected void fireMonitorComplete(OperationMonitor result) {
|
protected void fireMonitorComplete(OperationMonitor result) {
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorComplete(result.getTrId(), result);
|
listener.monitorComplete(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorFailed(Throwable caught, String failure,
|
protected void fireMonitorFailed(Throwable caught, String failure,
|
||||||
|
@ -188,9 +187,9 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
listener.monitorFailed(caught, failure, failureDetails, operationMonitor);
|
listener.monitorFailed(caught, failure, failureDetails, operationMonitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorStopped(TRId trId, String reason, String details, OperationMonitor operationMonitor) {
|
protected void fireMonitorStopped(String reason, String details, OperationMonitor operationMonitor) {
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorStopped(trId,reason, details, operationMonitor);
|
listener.monitorStopped(reason, details, operationMonitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorAborted() {
|
protected void fireMonitorAborted() {
|
||||||
|
|
|
@ -2,7 +2,6 @@ package org.gcube.portlets.user.td.monitorwidget.client;
|
||||||
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,9 +33,9 @@ public interface MonitorUpdaterListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is complete.
|
* Called when the operation is complete.
|
||||||
* @param operationMonitor TODO
|
* @param operationMonitor
|
||||||
*/
|
*/
|
||||||
public void monitorComplete(TRId trId, OperationMonitor operationMonitor);
|
public void monitorComplete(OperationMonitor operationMonitor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is failed.
|
* Called when the operation is failed.
|
||||||
|
@ -44,19 +43,18 @@ public interface MonitorUpdaterListener {
|
||||||
* @param caught
|
* @param caught
|
||||||
* @param reason
|
* @param reason
|
||||||
* @param details
|
* @param details
|
||||||
* @param operationMonitor TODO
|
* @param operationMonitor
|
||||||
*/
|
*/
|
||||||
public void monitorFailed(Throwable caught, String reason, String details, OperationMonitor operationMonitor);
|
public void monitorFailed(Throwable caught, String reason, String details, OperationMonitor operationMonitor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is stopped
|
* Called when the operation is stopped
|
||||||
*
|
*
|
||||||
* @param trId
|
|
||||||
* @param reason
|
* @param reason
|
||||||
* @param details
|
* @param details
|
||||||
* @param operationMonitor TODO
|
* @param operationMonitor
|
||||||
*/
|
*/
|
||||||
public void monitorStopped(TRId trId, String reason, String details, OperationMonitor operationMonitor);
|
public void monitorStopped(String reason, String details, OperationMonitor operationMonitor);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue