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,117 +10,104 @@ 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 {
|
||||||
|
|
||||||
private ArrayList<MonitorUpdaterListener> listeners = new ArrayList<MonitorUpdaterListener>();
|
private ArrayList<MonitorUpdaterListener> listeners = new ArrayList<MonitorUpdaterListener>();
|
||||||
private OperationMonitorSession operationMonitorSession;
|
private OperationMonitorSession operationMonitorSession;
|
||||||
|
|
||||||
public MonitorUpdater(OperationMonitorSession operationMonitorSession){
|
public MonitorUpdater(OperationMonitorSession operationMonitorSession) {
|
||||||
this.operationMonitorSession=operationMonitorSession;
|
this.operationMonitorSession = operationMonitorSession;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@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",
|
|
||||||
caught);
|
|
||||||
String message = getStack(caught);
|
|
||||||
fireMonitorFailed(caught,
|
|
||||||
"Failed getting operation updates", message, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onSuccess(OperationMonitor result) {
|
Log.error("Error retrieving the operation state", caught);
|
||||||
Log.debug("retrieved OperationMonitor: "
|
String message = getStack(caught);
|
||||||
+ result);
|
fireMonitorFailed(caught, "Failed getting operation updates", message, null);
|
||||||
|
}
|
||||||
if(result==null){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(result.isInBackground()){
|
|
||||||
Log.debug("Operation is in background");
|
|
||||||
cancel();
|
|
||||||
fireMonitorPutInBackground();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(result.isAbort()){
|
|
||||||
Log.debug("Operation is aborted");
|
|
||||||
cancel();
|
|
||||||
fireMonitorAborted();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(result.getTask()==null|| result.getTask().getState()==null){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (result.getTask().getState()) {
|
|
||||||
case INITIALIZING:
|
|
||||||
Log.info("Initializing...");
|
|
||||||
fireMonitorInitializing(result);
|
|
||||||
break;
|
|
||||||
case ABORTED:
|
|
||||||
cancel();
|
|
||||||
fireMonitorAborted();
|
|
||||||
Log.info("Aborted");
|
|
||||||
break;
|
|
||||||
case IN_PROGRESS:
|
|
||||||
fireMonitorUpdate(result);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case VALIDATING_RULES:
|
|
||||||
fireMonitorValidate(result);
|
|
||||||
break;
|
|
||||||
case GENERATING_VIEW:
|
|
||||||
Log.info("Generating View...");
|
|
||||||
fireMonitorGeneratingView(result);
|
|
||||||
break;
|
|
||||||
case STOPPED:
|
|
||||||
cancel();
|
|
||||||
stopMessage(result);
|
|
||||||
break;
|
|
||||||
case FAILED:
|
|
||||||
cancel();
|
|
||||||
errorMessage(result);
|
|
||||||
break;
|
|
||||||
case SUCCEDED:
|
|
||||||
cancel();
|
|
||||||
Log.info("Fisnish :"
|
|
||||||
+ result.getTrId());
|
|
||||||
fireMonitorComplete(result);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Log.info("Unknow State");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
public void onSuccess(OperationMonitor result) {
|
||||||
|
Log.debug("retrieved OperationMonitor: " + result);
|
||||||
|
|
||||||
|
if (result == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (result.isInBackground()) {
|
||||||
|
Log.debug("Operation is in background");
|
||||||
|
cancel();
|
||||||
|
fireMonitorPutInBackground();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
if (result.isAbort()) {
|
||||||
|
Log.debug("Operation is aborted");
|
||||||
|
cancel();
|
||||||
|
fireMonitorAborted();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.getTask() == null || result.getTask().getState() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (result.getTask().getState()) {
|
||||||
|
case INITIALIZING:
|
||||||
|
Log.info("Initializing...");
|
||||||
|
fireMonitorInitializing(result);
|
||||||
|
break;
|
||||||
|
case ABORTED:
|
||||||
|
cancel();
|
||||||
|
fireMonitorAborted();
|
||||||
|
Log.info("Aborted");
|
||||||
|
break;
|
||||||
|
case IN_PROGRESS:
|
||||||
|
fireMonitorUpdate(result);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case VALIDATING_RULES:
|
||||||
|
fireMonitorValidate(result);
|
||||||
|
break;
|
||||||
|
case GENERATING_VIEW:
|
||||||
|
Log.info("Generating View...");
|
||||||
|
fireMonitorGeneratingView(result);
|
||||||
|
break;
|
||||||
|
case STOPPED:
|
||||||
|
cancel();
|
||||||
|
stopMessage(result);
|
||||||
|
break;
|
||||||
|
case FAILED:
|
||||||
|
cancel();
|
||||||
|
errorMessage(result);
|
||||||
|
break;
|
||||||
|
case SUCCEDED:
|
||||||
|
cancel();
|
||||||
|
Log.info("Fisnish :" + result.getTrId());
|
||||||
|
fireMonitorComplete(result);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Log.info("Unknow State");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void errorMessage(OperationMonitor result) {
|
protected void errorMessage(OperationMonitor result) {
|
||||||
Log.info("Operation Failed");
|
Log.info("Operation Failed");
|
||||||
Throwable th;
|
Throwable th;
|
||||||
|
@ -135,25 +122,24 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
reason = "Error on Service";
|
reason = "Error on Service";
|
||||||
details = "Operation failed";
|
details = "Operation failed";
|
||||||
}
|
}
|
||||||
|
|
||||||
fireMonitorFailed(th, reason, details,result);
|
fireMonitorFailed(th, reason, details, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void stopMessage(OperationMonitor result) {
|
protected void stopMessage(OperationMonitor result) {
|
||||||
Log.info("Operation Stopped");
|
Log.info("Operation Stopped");
|
||||||
String reason = null;
|
String reason = null;
|
||||||
String details = null;
|
String details = null;
|
||||||
if (result.getTask().getErrorCause() != null) {
|
if (result.getTask().getErrorCause() != null) {
|
||||||
reason = "Validations failed";
|
reason = "Validations failed";
|
||||||
details = result.getTask().getErrorCause().getLocalizedMessage();
|
details = result.getTask().getErrorCause().getLocalizedMessage();
|
||||||
} else {
|
} else {
|
||||||
reason = "Validations failed";
|
reason = "Validations failed";
|
||||||
details = "Operation stopped";
|
details = "Operation stopped";
|
||||||
}
|
}
|
||||||
|
|
||||||
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>";
|
||||||
|
@ -167,7 +153,7 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorInitializing(result);
|
listener.monitorInitializing(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorGeneratingView(OperationMonitor result) {
|
protected void fireMonitorGeneratingView(OperationMonitor result) {
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorGeneratingView(result);
|
listener.monitorGeneratingView(result);
|
||||||
|
@ -177,7 +163,7 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorUpdate(result);
|
listener.monitorUpdate(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorValidate(OperationMonitor result) {
|
protected void fireMonitorValidate(OperationMonitor result) {
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorValidate(result);
|
listener.monitorValidate(result);
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -198,21 +184,19 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorStopped(reason, details, operationMonitor);
|
listener.monitorStopped(reason, details, operationMonitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorAborted() {
|
protected void fireMonitorAborted() {
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
listener.monitorAborted();
|
listener.monitorAborted();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireMonitorPutInBackground() {
|
protected void fireMonitorPutInBackground() {
|
||||||
for (MonitorUpdaterListener listener : listeners)
|
for (MonitorUpdaterListener listener : listeners)
|
||||||
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,19 +216,15 @@ 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
|
||||||
* @param operationMonitor
|
* Details
|
||||||
|
* @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
|
||||||
* @param operationMonitor
|
* Details
|
||||||
|
* @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,113 +11,82 @@ 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 {
|
||||||
|
|
||||||
private ArrayList<MonitorBackgroundUpdaterListener> listeners = new ArrayList<MonitorBackgroundUpdaterListener>();
|
private ArrayList<MonitorBackgroundUpdaterListener> listeners = new ArrayList<MonitorBackgroundUpdaterListener>();
|
||||||
private BackgroundOperationMonitorSession backgroundOperationMonitorSession;
|
private BackgroundOperationMonitorSession backgroundOperationMonitorSession;
|
||||||
|
|
||||||
public MonitorBackgroundUpdater(){
|
public MonitorBackgroundUpdater() {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireRetrieveOperationMonitorListFailed(Throwable throwable){
|
protected void fireRetrieveOperationMonitorListFailed(Throwable throwable) {
|
||||||
for (MonitorBackgroundUpdaterListener listener : listeners)
|
for (MonitorBackgroundUpdaterListener listener : listeners)
|
||||||
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);
|
||||||
operationMonitorSession.setAbort(true);
|
operationMonitorSession.setAbort(true);
|
||||||
backgroundOperationMonitorSession.addToOperationMonitorSessionList(operationMonitorSession);
|
backgroundOperationMonitorSession.addToOperationMonitorSessionList(operationMonitorSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void requestHidden(String taskId) {
|
public void requestHidden(String taskId) {
|
||||||
OperationMonitorSession operationMonitorSession=new OperationMonitorSession(taskId);
|
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(taskId);
|
||||||
operationMonitorSession.setHidden(true);
|
operationMonitorSession.setHidden(true);
|
||||||
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,41 +5,27 @@ 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 {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4353641080571614057L;
|
private static final long serialVersionUID = -4353641080571614057L;
|
||||||
|
|
||||||
private WorkerState workerState;
|
private WorkerState workerState;
|
||||||
private float progress;
|
private float progress;
|
||||||
private String description;
|
private String description;
|
||||||
private Throwable errorMessage;
|
private Throwable errorMessage;
|
||||||
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;
|
||||||
|
@ -48,7 +34,6 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
||||||
this.humanReadableStatus = humanReadableStatus;
|
this.humanReadableStatus = humanReadableStatus;
|
||||||
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