ref 8580:TDM - TabMan - Support Java 8 compatibility
https://support.d4science.org/issues/8580 Updated compatibility to Java 8 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-monitor-widget@149236 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5a04573f54
commit
8a026a55d0
|
@ -1,4 +1,7 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="org.gcube.portlets-user.tabular-data-monitor-widget.1-5-0" date="2015-07-03">
|
||||||
|
<Change>Support Java 8 compatibility [ticket #8580]</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.tabular-data-monitor-widget.1-4-0" date="2015-07-03">
|
<Changeset component="org.gcube.portlets-user.tabular-data-monitor-widget.1-4-0" date="2015-07-03">
|
||||||
<Change>Updated dependencies</Change>
|
<Change>Updated dependencies</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>tabular-data-monitor-widget</artifactId>
|
<artifactId>tabular-data-monitor-widget</artifactId>
|
||||||
<version>1.4.0-SNAPSHOT</version>
|
<version>1.5.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>tabular-data-monitor-widget</name>
|
<name>tabular-data-monitor-widget</name>
|
||||||
<description>tabular-data-monitor-widget allows monitoring of tasks</description>
|
<description>tabular-data-monitor-widget allows monitoring of tasks</description>
|
||||||
|
|
|
@ -10,8 +10,8 @@ import com.sencha.gxt.widget.core.client.ProgressBar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBarUpdater implements MonitorUpdaterListener {
|
public class MonitorBarUpdater implements MonitorUpdaterListener {
|
||||||
|
|
|
@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
/**
|
/**
|
||||||
* AddColumnProgressDialog is a Dialog that show progress of AddColumn
|
* AddColumnProgressDialog is a Dialog that show progress of AddColumn
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
package org.gcube.portlets.user.td.monitorwidget.client;
|
package org.gcube.portlets.user.td.monitorwidget.client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*/
|
||||||
public interface MonitorDialogEventUIListener {
|
public interface MonitorDialogEventUIListener {
|
||||||
/**
|
/**
|
||||||
* Called when the operation is aborted
|
* Called when the operation is aborted
|
||||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface MonitorDialogListener {
|
public interface MonitorDialogListener {
|
||||||
|
@ -14,16 +14,16 @@ public interface MonitorDialogListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is complete.
|
* Called when the operation is complete.
|
||||||
* @param operationResult TODO
|
* @param operationResult Operation result
|
||||||
*/
|
*/
|
||||||
public void operationComplete(OperationResult operationResult);
|
public void operationComplete(OperationResult operationResult);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is failed.
|
* Called when the operation is failed.
|
||||||
*
|
*
|
||||||
* @param caught
|
* @param caught Error
|
||||||
* @param reason
|
* @param reason Reason
|
||||||
* @param details
|
* @param details Details
|
||||||
*/
|
*/
|
||||||
public void operationFailed(Throwable caught, String reason, String details);
|
public void operationFailed(Throwable caught, String reason, String details);
|
||||||
|
|
||||||
|
@ -31,9 +31,10 @@ public interface MonitorDialogListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is stopped
|
* Called when the operation is stopped
|
||||||
* @param operationResult TODO
|
*
|
||||||
* @param reason
|
* @param operationResult Operation result
|
||||||
* @param details
|
* @param reason Reason
|
||||||
|
* @param details Details
|
||||||
*/
|
*/
|
||||||
public void operationStopped(OperationResult operationResult, String reason, String details);
|
public void operationStopped(OperationResult operationResult, String reason, String details);
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,10 @@ import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.user.client.Timer;
|
import com.google.gwt.user.client.Timer;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorUpdater extends Timer implements MonitorDialogEventUIListener {
|
public class MonitorUpdater extends Timer implements MonitorDialogEventUIListener {
|
||||||
|
@ -27,29 +26,21 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.debug("requesting operation progress");
|
Log.debug("requesting operation progress");
|
||||||
TDGWTServiceAsync.INSTANCE
|
TDGWTServiceAsync.INSTANCE.getOperationMonitor(operationMonitorSession, new AsyncCallback<OperationMonitor>() {
|
||||||
.getOperationMonitor(operationMonitorSession,new AsyncCallback<OperationMonitor>() {
|
|
||||||
|
|
||||||
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
cancel();
|
cancel();
|
||||||
|
|
||||||
Log.error("Error retrieving the operation state",
|
Log.error("Error retrieving the operation state", caught);
|
||||||
caught);
|
|
||||||
String message = getStack(caught);
|
String message = getStack(caught);
|
||||||
fireMonitorFailed(caught,
|
fireMonitorFailed(caught, "Failed getting operation updates", message, null);
|
||||||
"Failed getting operation updates", message, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSuccess(OperationMonitor result) {
|
public void onSuccess(OperationMonitor result) {
|
||||||
Log.debug("retrieved OperationMonitor: "
|
Log.debug("retrieved OperationMonitor: " + result);
|
||||||
+ result);
|
|
||||||
|
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -103,8 +94,7 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
break;
|
break;
|
||||||
case SUCCEDED:
|
case SUCCEDED:
|
||||||
cancel();
|
cancel();
|
||||||
Log.info("Fisnish :"
|
Log.info("Fisnish :" + result.getTrId());
|
||||||
+ result.getTrId());
|
|
||||||
fireMonitorComplete(result);
|
fireMonitorComplete(result);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -114,13 +104,10 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void errorMessage(OperationMonitor result) {
|
protected void errorMessage(OperationMonitor result) {
|
||||||
Log.info("Operation Failed");
|
Log.info("Operation Failed");
|
||||||
Throwable th;
|
Throwable th;
|
||||||
|
@ -154,7 +141,6 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
fireMonitorStopped(reason, details, result);
|
fireMonitorStopped(reason, details, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected String getStack(Throwable e) {
|
protected String getStack(Throwable e) {
|
||||||
String message = e.getLocalizedMessage() + " -> <br>";
|
String message = e.getLocalizedMessage() + " -> <br>";
|
||||||
Throwable c = e.getCause();
|
Throwable c = e.getCause();
|
||||||
|
@ -188,8 +174,8 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
listener.monitorComplete(result);
|
listener.monitorComplete(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorFailed(Throwable caught, String failure,
|
protected void fireMonitorFailed(Throwable caught, String failure, String failureDetails,
|
||||||
String failureDetails, OperationMonitor operationMonitor) {
|
OperationMonitor operationMonitor) {
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorFailed(caught, failure, failureDetails, operationMonitor);
|
listener.monitorFailed(caught, failure, failureDetails, operationMonitor);
|
||||||
}
|
}
|
||||||
|
@ -209,10 +195,8 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
listener.monitorPutInBackground();
|
listener.monitorPutInBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new {@link MonitorUpdaterListener} to this
|
* Add a new MonitorUpdaterListener to this
|
||||||
* {@link AddColumnProgressUpdater}.
|
|
||||||
*
|
*
|
||||||
* @param listener
|
* @param listener
|
||||||
* the listener to add.
|
* the listener to add.
|
||||||
|
@ -222,8 +206,8 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the specified {@link MonitorUpdaterListener} from this
|
* Removes the specified MonitorUpdaterListener from this
|
||||||
* {@link AddColumnProgressUpdater}.
|
*
|
||||||
*
|
*
|
||||||
* @param listener
|
* @param listener
|
||||||
* the listener to remove.
|
* the listener to remove.
|
||||||
|
@ -232,16 +216,12 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void requestAborted() {
|
public void requestAborted() {
|
||||||
operationMonitorSession.setAbort(true);
|
operationMonitorSession.setAbort(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void requestPutInBackground() {
|
public void requestPutInBackground() {
|
||||||
operationMonitorSession.setInBackground(true);
|
operationMonitorSession.setInBackground(true);
|
||||||
|
|
|
@ -1,39 +1,45 @@
|
||||||
package org.gcube.portlets.user.td.monitorwidget.client;
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a listener for operation progress.
|
* Defines a listener for operation progress.
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface MonitorUpdaterListener {
|
public interface MonitorUpdaterListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is starting.
|
* Called when the operation is starting.
|
||||||
|
*
|
||||||
|
* @param operationMonitor
|
||||||
|
* Operation monitor
|
||||||
*/
|
*/
|
||||||
public void monitorInitializing(OperationMonitor operationMonitor);
|
public void monitorInitializing(OperationMonitor operationMonitor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there is a progress for the operation.
|
* Called when there is a progress for the operation.
|
||||||
* @param elaborated the elaborated part.
|
*
|
||||||
|
* @param operationMonitor
|
||||||
|
* Operation monitor
|
||||||
*/
|
*/
|
||||||
public void monitorUpdate(OperationMonitor operationMonitor);
|
public void monitorUpdate(OperationMonitor operationMonitor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there is a validate for the operation.
|
* Called when there is a validate for the operation.
|
||||||
* @param elaborated the elaborated part.
|
*
|
||||||
|
* @param operationMonitor
|
||||||
|
* Operation monitor
|
||||||
*/
|
*/
|
||||||
public void monitorValidate(OperationMonitor operationMonitor);
|
public void monitorValidate(OperationMonitor operationMonitor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is complete.
|
* Called when the operation is complete.
|
||||||
|
*
|
||||||
* @param operationMonitor
|
* @param operationMonitor
|
||||||
|
* Operation monitor
|
||||||
*/
|
*/
|
||||||
public void monitorComplete(OperationMonitor operationMonitor);
|
public void monitorComplete(OperationMonitor operationMonitor);
|
||||||
|
|
||||||
|
@ -41,40 +47,45 @@ public interface MonitorUpdaterListener {
|
||||||
* Called when the operation is failed.
|
* Called when the operation is failed.
|
||||||
*
|
*
|
||||||
* @param caught
|
* @param caught
|
||||||
|
* Error
|
||||||
* @param reason
|
* @param reason
|
||||||
|
* Reason
|
||||||
* @param details
|
* @param details
|
||||||
|
* Details
|
||||||
* @param operationMonitor
|
* @param operationMonitor
|
||||||
|
* Operation monitor
|
||||||
*/
|
*/
|
||||||
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 reason
|
* @param reason
|
||||||
|
* Reason
|
||||||
* @param details
|
* @param details
|
||||||
|
* Details
|
||||||
* @param operationMonitor
|
* @param operationMonitor
|
||||||
|
* Operation monitor
|
||||||
*/
|
*/
|
||||||
public void monitorStopped(String reason, String details, OperationMonitor operationMonitor);
|
public void monitorStopped(String reason, String details, OperationMonitor operationMonitor);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is aborted
|
* Called when the operation is aborted
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public void monitorAborted();
|
public void monitorAborted();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is put in background
|
* Called when the operation is put in background
|
||||||
*/
|
*/
|
||||||
public void monitorPutInBackground();
|
public void monitorPutInBackground();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is generating the view
|
* Called when the operation is generating the view
|
||||||
|
*
|
||||||
|
* @param operationMonitor Operation monitor
|
||||||
*/
|
*/
|
||||||
public void monitorGeneratingView(OperationMonitor operationMonitor);
|
public void monitorGeneratingView(OperationMonitor operationMonitor);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" email: <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorWidgetEntry implements EntryPoint {
|
public class MonitorWidgetEntry implements EntryPoint {
|
||||||
|
|
|
@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
/**
|
/**
|
||||||
* Background Operations Monitor
|
* Background Operations Monitor
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBackgroundDialog extends Window {
|
public class MonitorBackgroundDialog extends Window {
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
package org.gcube.portlets.user.td.monitorwidget.client.background;
|
package org.gcube.portlets.user.td.monitorwidget.client.background;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*/
|
||||||
public interface MonitorBackgroundEventUIListener {
|
public interface MonitorBackgroundEventUIListener {
|
||||||
/**
|
/**
|
||||||
* Called when the task is aborted
|
* Called when the task is aborted
|
||||||
*
|
*
|
||||||
|
* @param taskId Task id
|
||||||
*/
|
*/
|
||||||
public void requestAborted(String taskId);
|
public void requestAborted(String taskId);
|
||||||
|
|
||||||
|
@ -11,6 +17,7 @@ public interface MonitorBackgroundEventUIListener {
|
||||||
/**
|
/**
|
||||||
* Called when the task is hidden
|
* Called when the task is hidden
|
||||||
*
|
*
|
||||||
|
* @param taskId Task id
|
||||||
*/
|
*/
|
||||||
public void requestHidden(String taskId);
|
public void requestHidden(String taskId);
|
||||||
|
|
||||||
|
@ -18,6 +25,8 @@ public interface MonitorBackgroundEventUIListener {
|
||||||
/**
|
/**
|
||||||
* Called when the task is resumed
|
* Called when the task is resumed
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
* @param taskId Task id
|
||||||
*/
|
*/
|
||||||
public void requestResume(String taskId);
|
public void requestResume(String taskId);
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
/**
|
/**
|
||||||
* Background Operations Monitor
|
* Background Operations Monitor
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBackgroundInfoDialog extends Window {
|
public class MonitorBackgroundInfoDialog extends Window {
|
||||||
|
|
|
@ -52,8 +52,8 @@ import com.sencha.gxt.widget.core.client.treegrid.TreeGrid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBackgroundInfoPanel extends FramedPanel implements
|
public class MonitorBackgroundInfoPanel extends FramedPanel implements
|
||||||
|
|
|
@ -12,8 +12,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBackgroundInfoUpdater extends Timer {
|
public class MonitorBackgroundInfoUpdater extends Timer {
|
||||||
|
@ -27,9 +27,7 @@ public class MonitorBackgroundInfoUpdater extends Timer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.debug("requesting operation in background ");
|
Log.debug("requesting operation in background ");
|
||||||
|
@ -68,19 +66,11 @@ public class MonitorBackgroundInfoUpdater extends Timer {
|
||||||
listener.retrieveBackgroundOperationMonitorFailed(throwable);
|
listener.retrieveBackgroundOperationMonitorFailed(throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param listener
|
|
||||||
*/
|
|
||||||
public void addListener(MonitorBackgroundInfoUpdaterListener listener) {
|
public void addListener(MonitorBackgroundInfoUpdaterListener listener) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param listener
|
|
||||||
*/
|
|
||||||
public void removeListener(MonitorBackgroundInfoUpdaterListener listener) {
|
public void removeListener(MonitorBackgroundInfoUpdaterListener listener) {
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,20 +4,24 @@ import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface MonitorBackgroundInfoUpdaterListener {
|
public interface MonitorBackgroundInfoUpdaterListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the operation is updated
|
* Called when the operation is updated
|
||||||
|
*
|
||||||
|
* @param operationMonitor Operation monitor
|
||||||
*/
|
*/
|
||||||
public void backgroundOperationMonitorUpdated(OperationMonitor operationMonitor);
|
public void backgroundOperationMonitorUpdated(OperationMonitor operationMonitor);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when operation is failed
|
* Called when operation is failed
|
||||||
|
*
|
||||||
|
* @param caught Error
|
||||||
*/
|
*/
|
||||||
public void retrieveBackgroundOperationMonitorFailed(Throwable caught);
|
public void retrieveBackgroundOperationMonitorFailed(Throwable caught);
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@ import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBackgroundPanel extends FramedPanel implements
|
public class MonitorBackgroundPanel extends FramedPanel implements
|
||||||
|
|
|
@ -11,11 +11,10 @@ import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.user.client.Timer;
|
import com.google.gwt.user.client.Timer;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBackgroundUpdater extends Timer implements MonitorBackgroundEventUIListener {
|
public class MonitorBackgroundUpdater extends Timer implements MonitorBackgroundEventUIListener {
|
||||||
|
@ -27,41 +26,31 @@ public class MonitorBackgroundUpdater extends Timer implements MonitorBackground
|
||||||
backgroundOperationMonitorSession = new BackgroundOperationMonitorSession();
|
backgroundOperationMonitorSession = new BackgroundOperationMonitorSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.debug("requesting list of operation in background ");
|
Log.debug("requesting list of operation in background ");
|
||||||
TDGWTServiceAsync.INSTANCE
|
TDGWTServiceAsync.INSTANCE.getBackgroundOperationMonitor(backgroundOperationMonitorSession,
|
||||||
.getBackgroundOperationMonitor(backgroundOperationMonitorSession, new AsyncCallback<ArrayList<BackgroundOperationMonitor>>() {
|
new AsyncCallback<ArrayList<BackgroundOperationMonitor>>() {
|
||||||
|
|
||||||
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
cancel();
|
cancel();
|
||||||
|
|
||||||
Log.error("Error retrieving operation monitor list",
|
Log.error("Error retrieving operation monitor list", caught);
|
||||||
caught);
|
|
||||||
|
|
||||||
fireRetrieveOperationMonitorListFailed(caught);
|
fireRetrieveOperationMonitorListFailed(caught);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSuccess(ArrayList<BackgroundOperationMonitor> result) {
|
public void onSuccess(ArrayList<BackgroundOperationMonitor> result) {
|
||||||
Log.debug("retrieved Operation Monitor List: "
|
Log.debug("retrieved Operation Monitor List: " + result.size());
|
||||||
+ result.size());
|
|
||||||
|
|
||||||
fireOperationMonitorListUpdated(result);
|
fireOperationMonitorListUpdated(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void fireOperationMonitorListUpdated(ArrayList<BackgroundOperationMonitor> operationMonitorList) {
|
protected void fireOperationMonitorListUpdated(ArrayList<BackgroundOperationMonitor> operationMonitorList) {
|
||||||
for (MonitorBackgroundUpdaterListener listener : listeners)
|
for (MonitorBackgroundUpdaterListener listener : listeners)
|
||||||
listener.operationMonitorListUpdated(operationMonitorList);
|
listener.operationMonitorListUpdated(operationMonitorList);
|
||||||
|
@ -72,27 +61,14 @@ public class MonitorBackgroundUpdater extends Timer implements MonitorBackground
|
||||||
listener.retrieveOperationMonitorListFailed(throwable);
|
listener.retrieveOperationMonitorListFailed(throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param listener
|
|
||||||
*/
|
|
||||||
public void addListener(MonitorBackgroundUpdaterListener listener) {
|
public void addListener(MonitorBackgroundUpdaterListener listener) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param listener
|
|
||||||
*/
|
|
||||||
public void removeListener(MonitorBackgroundUpdaterListener listener) {
|
public void removeListener(MonitorBackgroundUpdaterListener listener) {
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void requestAborted(String taskId) {
|
public void requestAborted(String taskId) {
|
||||||
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(taskId);
|
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(taskId);
|
||||||
|
@ -107,17 +83,10 @@ public class MonitorBackgroundUpdater extends Timer implements MonitorBackground
|
||||||
backgroundOperationMonitorSession.addToOperationMonitorSessionList(operationMonitorSession);
|
backgroundOperationMonitorSession.addToOperationMonitorSessionList(operationMonitorSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void requestResume(String taskId) {
|
public void requestResume(String taskId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,20 +6,24 @@ import org.gcube.portlets.user.td.gwtservice.shared.monitor.BackgroundOperationM
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface MonitorBackgroundUpdaterListener {
|
public interface MonitorBackgroundUpdaterListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the list of opration is updated
|
* Called when the list of opration is updated
|
||||||
|
*
|
||||||
|
* @param operationMonitorList Operation monitor list
|
||||||
*/
|
*/
|
||||||
public void operationMonitorListUpdated(ArrayList<BackgroundOperationMonitor> operationMonitorList);
|
public void operationMonitorListUpdated(ArrayList<BackgroundOperationMonitor> operationMonitorList);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when operation is failed
|
* Called when operation is failed
|
||||||
|
*
|
||||||
|
* @param caught Error
|
||||||
*/
|
*/
|
||||||
public void retrieveOperationMonitorListFailed(Throwable caught);
|
public void retrieveOperationMonitorListFailed(Throwable caught);
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,13 @@ import com.sencha.gxt.widget.core.client.treegrid.TreeGridView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
*
|
||||||
* @param <M>
|
*
|
||||||
|
* @param <M> Type
|
||||||
*/
|
*/
|
||||||
public class ExtendedTreeGridView<M> extends TreeGridView<M> {
|
public class ExtendedTreeGridView<M> extends TreeGridView<M> {
|
||||||
// TODO bug in gxt3 3.0.0 fixed in future
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -48,6 +48,11 @@ import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
import com.sencha.gxt.widget.core.client.treegrid.TreeGrid;
|
import com.sencha.gxt.widget.core.client.treegrid.TreeGrid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class MonitorDetailPanel extends FramedPanel {
|
public class MonitorDetailPanel extends FramedPanel {
|
||||||
private static final String WIDTH = "618px";
|
private static final String WIDTH = "618px";
|
||||||
private static final String HEIGHT = "256px";
|
private static final String HEIGHT = "256px";
|
||||||
|
@ -87,7 +92,7 @@ public class MonitorDetailPanel extends FramedPanel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param eventBus
|
* @param eventBus Event bus
|
||||||
*/
|
*/
|
||||||
public MonitorDetailPanel(EventBus eventBus) {
|
public MonitorDetailPanel(EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorBaseDto implements Serializable {
|
public class MonitorBaseDto implements Serializable {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorFolderDto extends MonitorBaseDto {
|
public class MonitorFolderDto extends MonitorBaseDto {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.task.JobSClassifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorJobSDto extends MonitorFolderDto {
|
public class MonitorJobSDto extends MonitorFolderDto {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo email: <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorTaskSDto extends MonitorFolderDto {
|
public class MonitorTaskSDto extends MonitorFolderDto {
|
||||||
|
|
|
@ -12,8 +12,8 @@ import com.google.gwt.i18n.client.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo email: <a
|
* @author Giancarlo Panichi
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorTreeDataGenerator {
|
public class MonitorTreeDataGenerator {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.task.WorkerState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author Giancarlo Panichi
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorValidationJobSDto extends MonitorBaseDto {
|
public class MonitorValidationJobSDto extends MonitorBaseDto {
|
||||||
|
@ -20,26 +20,12 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
||||||
private String humanReadableStatus;
|
private String humanReadableStatus;
|
||||||
private InvocationS invocation;
|
private InvocationS invocation;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MonitorValidationJobSDto() {
|
public MonitorValidationJobSDto() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public MonitorValidationJobSDto(String id, WorkerState workerState, float progress, String description,
|
||||||
*
|
Throwable errorMessage, String humanReadableStatus, InvocationS invocation) {
|
||||||
* @param id
|
|
||||||
* @param workerState
|
|
||||||
* @param progress
|
|
||||||
* @param description
|
|
||||||
* @param errorMessage
|
|
||||||
* @param humanReadableStatus
|
|
||||||
* @param invocation
|
|
||||||
*/
|
|
||||||
public MonitorValidationJobSDto(String id, WorkerState workerState, float progress,
|
|
||||||
String description, Throwable errorMessage,
|
|
||||||
String humanReadableStatus, InvocationS invocation) {
|
|
||||||
super(id);
|
super(id);
|
||||||
this.workerState = workerState;
|
this.workerState = workerState;
|
||||||
this.progress = progress;
|
this.progress = progress;
|
||||||
|
@ -49,7 +35,6 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
||||||
this.invocation = invocation;
|
this.invocation = invocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public WorkerState getWorkerState() {
|
public WorkerState getWorkerState() {
|
||||||
return workerState;
|
return workerState;
|
||||||
}
|
}
|
||||||
|
@ -66,8 +51,6 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
||||||
this.progress = progress;
|
this.progress = progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +88,4 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ import com.google.gwt.resources.client.CssResource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface MonitorCSS extends CssResource {
|
public interface MonitorCSS extends CssResource {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import com.sencha.gxt.widget.core.client.box.MessageBox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class InfoMessageBox extends MessageBox {
|
public class InfoMessageBox extends MessageBox {
|
||||||
|
|
|
@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author Giancarlo Panichi
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class UtilsGXT3 {
|
public class UtilsGXT3 {
|
||||||
|
|
Loading…
Reference in New Issue