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>
|
||||
<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">
|
||||
<Change>Updated dependencies</Change>
|
||||
</Changeset>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-monitor-widget</artifactId>
|
||||
<version>1.4.0-SNAPSHOT</version>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
|
||||
<name>tabular-data-monitor-widget</name>
|
||||
<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"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.gcube.portlets.user.td.monitorwidget.client;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public interface MonitorDialogEventUIListener {
|
||||
/**
|
||||
* Called when the operation is aborted
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface MonitorDialogListener {
|
||||
|
@ -14,16 +14,16 @@ public interface MonitorDialogListener {
|
|||
|
||||
/**
|
||||
* Called when the operation is complete.
|
||||
* @param operationResult TODO
|
||||
* @param operationResult Operation result
|
||||
*/
|
||||
public void operationComplete(OperationResult operationResult);
|
||||
|
||||
/**
|
||||
* Called when the operation is failed.
|
||||
*
|
||||
* @param caught
|
||||
* @param reason
|
||||
* @param details
|
||||
* @param caught Error
|
||||
* @param reason Reason
|
||||
* @param details Details
|
||||
*/
|
||||
public void operationFailed(Throwable caught, String reason, String details);
|
||||
|
||||
|
@ -31,9 +31,10 @@ public interface MonitorDialogListener {
|
|||
|
||||
/**
|
||||
* Called when the operation is stopped
|
||||
* @param operationResult TODO
|
||||
* @param reason
|
||||
* @param details
|
||||
*
|
||||
* @param operationResult Operation result
|
||||
* @param reason Reason
|
||||
* @param details 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.rpc.AsyncCallback;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorUpdater extends Timer implements MonitorDialogEventUIListener {
|
||||
|
@ -22,53 +21,45 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
private ArrayList<MonitorUpdaterListener> listeners = new ArrayList<MonitorUpdaterListener>();
|
||||
private OperationMonitorSession operationMonitorSession;
|
||||
|
||||
public MonitorUpdater(OperationMonitorSession operationMonitorSession){
|
||||
this.operationMonitorSession=operationMonitorSession;
|
||||
public MonitorUpdater(OperationMonitorSession operationMonitorSession) {
|
||||
this.operationMonitorSession = operationMonitorSession;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
Log.debug("requesting operation progress");
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getOperationMonitor(operationMonitorSession,new AsyncCallback<OperationMonitor>() {
|
||||
|
||||
TDGWTServiceAsync.INSTANCE.getOperationMonitor(operationMonitorSession, new AsyncCallback<OperationMonitor>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
cancel();
|
||||
|
||||
Log.error("Error retrieving the operation state",
|
||||
caught);
|
||||
Log.error("Error retrieving the operation state", caught);
|
||||
String message = getStack(caught);
|
||||
fireMonitorFailed(caught,
|
||||
"Failed getting operation updates", message, null);
|
||||
fireMonitorFailed(caught, "Failed getting operation updates", message, null);
|
||||
}
|
||||
|
||||
public void onSuccess(OperationMonitor result) {
|
||||
Log.debug("retrieved OperationMonitor: "
|
||||
+ result);
|
||||
Log.debug("retrieved OperationMonitor: " + result);
|
||||
|
||||
if(result==null){
|
||||
if (result == null) {
|
||||
return;
|
||||
}
|
||||
if(result.isInBackground()){
|
||||
if (result.isInBackground()) {
|
||||
Log.debug("Operation is in background");
|
||||
cancel();
|
||||
fireMonitorPutInBackground();
|
||||
return;
|
||||
}
|
||||
|
||||
if(result.isAbort()){
|
||||
if (result.isAbort()) {
|
||||
Log.debug("Operation is aborted");
|
||||
cancel();
|
||||
fireMonitorAborted();
|
||||
|
||||
}
|
||||
|
||||
if(result.getTask()==null|| result.getTask().getState()==null){
|
||||
if (result.getTask() == null || result.getTask().getState() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -103,8 +94,7 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
break;
|
||||
case SUCCEDED:
|
||||
cancel();
|
||||
Log.info("Fisnish :"
|
||||
+ result.getTrId());
|
||||
Log.info("Fisnish :" + result.getTrId());
|
||||
fireMonitorComplete(result);
|
||||
break;
|
||||
default:
|
||||
|
@ -114,13 +104,10 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void errorMessage(OperationMonitor result) {
|
||||
Log.info("Operation Failed");
|
||||
Throwable th;
|
||||
|
@ -136,7 +123,7 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
details = "Operation failed";
|
||||
}
|
||||
|
||||
fireMonitorFailed(th, reason, details,result);
|
||||
fireMonitorFailed(th, reason, details, result);
|
||||
}
|
||||
|
||||
protected void stopMessage(OperationMonitor result) {
|
||||
|
@ -151,10 +138,9 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
details = "Operation stopped";
|
||||
}
|
||||
|
||||
fireMonitorStopped(reason, details,result);
|
||||
fireMonitorStopped(reason, details, result);
|
||||
}
|
||||
|
||||
|
||||
protected String getStack(Throwable e) {
|
||||
String message = e.getLocalizedMessage() + " -> <br>";
|
||||
Throwable c = e.getCause();
|
||||
|
@ -188,8 +174,8 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
listener.monitorComplete(result);
|
||||
}
|
||||
|
||||
protected void fireMonitorFailed(Throwable caught, String failure,
|
||||
String failureDetails, OperationMonitor operationMonitor) {
|
||||
protected void fireMonitorFailed(Throwable caught, String failure, String failureDetails,
|
||||
OperationMonitor operationMonitor) {
|
||||
for (MonitorUpdaterListener listener : listeners)
|
||||
listener.monitorFailed(caught, failure, failureDetails, operationMonitor);
|
||||
}
|
||||
|
@ -209,10 +195,8 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
listener.monitorPutInBackground();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a new {@link MonitorUpdaterListener} to this
|
||||
* {@link AddColumnProgressUpdater}.
|
||||
* Add a new MonitorUpdaterListener to this
|
||||
*
|
||||
* @param listener
|
||||
* the listener to add.
|
||||
|
@ -222,8 +206,8 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes the specified {@link MonitorUpdaterListener} from this
|
||||
* {@link AddColumnProgressUpdater}.
|
||||
* Removes the specified MonitorUpdaterListener from this
|
||||
*
|
||||
*
|
||||
* @param listener
|
||||
* the listener to remove.
|
||||
|
@ -232,16 +216,12 @@ public class MonitorUpdater extends Timer implements MonitorDialogEventUIListene
|
|||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void requestAborted() {
|
||||
operationMonitorSession.setAbort(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void requestPutInBackground() {
|
||||
operationMonitorSession.setInBackground(true);
|
||||
|
|
|
@ -1,39 +1,45 @@
|
|||
package org.gcube.portlets.user.td.monitorwidget.client;
|
||||
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines a listener for operation progress.
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface MonitorUpdaterListener {
|
||||
|
||||
/**
|
||||
* Called when the operation is starting.
|
||||
*
|
||||
* @param operationMonitor
|
||||
* Operation monitor
|
||||
*/
|
||||
public void monitorInitializing(OperationMonitor operationMonitor);
|
||||
|
||||
/**
|
||||
* Called when there is a progress for the operation.
|
||||
* @param elaborated the elaborated part.
|
||||
*
|
||||
* @param operationMonitor
|
||||
* Operation monitor
|
||||
*/
|
||||
public void monitorUpdate(OperationMonitor operationMonitor);
|
||||
|
||||
/**
|
||||
* Called when there is a validate for the operation.
|
||||
* @param elaborated the elaborated part.
|
||||
*
|
||||
* @param operationMonitor
|
||||
* Operation monitor
|
||||
*/
|
||||
public void monitorValidate(OperationMonitor operationMonitor);
|
||||
|
||||
/**
|
||||
* Called when the operation is complete.
|
||||
*
|
||||
* @param operationMonitor
|
||||
* Operation monitor
|
||||
*/
|
||||
public void monitorComplete(OperationMonitor operationMonitor);
|
||||
|
||||
|
@ -41,40 +47,45 @@ public interface MonitorUpdaterListener {
|
|||
* Called when the operation is failed.
|
||||
*
|
||||
* @param caught
|
||||
* Error
|
||||
* @param reason
|
||||
* Reason
|
||||
* @param details
|
||||
* Details
|
||||
* @param operationMonitor
|
||||
* Operation monitor
|
||||
*/
|
||||
public void monitorFailed(Throwable caught, String reason, String details, OperationMonitor operationMonitor);
|
||||
|
||||
/**
|
||||
* Called when the operation is stopped
|
||||
*
|
||||
*
|
||||
* @param reason
|
||||
* Reason
|
||||
* @param details
|
||||
* Details
|
||||
* @param operationMonitor
|
||||
* Operation monitor
|
||||
*/
|
||||
public void monitorStopped(String reason, String details, OperationMonitor operationMonitor);
|
||||
|
||||
|
||||
/**
|
||||
* Called when the operation is aborted
|
||||
*
|
||||
*/
|
||||
public void monitorAborted();
|
||||
|
||||
|
||||
/**
|
||||
* Called when the operation is put in background
|
||||
*/
|
||||
public void monitorPutInBackground();
|
||||
|
||||
|
||||
/**
|
||||
* Called when the operation is generating the view
|
||||
*
|
||||
* @param operationMonitor Operation monitor
|
||||
*/
|
||||
public void monitorGeneratingView(OperationMonitor operationMonitor);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ import com.google.web.bindery.event.shared.SimpleEventBus;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorWidgetEntry implements EntryPoint {
|
||||
|
|
|
@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
/**
|
||||
* Background Operations Monitor
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorBackgroundDialog extends Window {
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
package org.gcube.portlets.user.td.monitorwidget.client.background;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public interface MonitorBackgroundEventUIListener {
|
||||
/**
|
||||
* Called when the task is aborted
|
||||
*
|
||||
* @param taskId Task id
|
||||
*/
|
||||
public void requestAborted(String taskId);
|
||||
|
||||
|
@ -11,6 +17,7 @@ public interface MonitorBackgroundEventUIListener {
|
|||
/**
|
||||
* Called when the task is hidden
|
||||
*
|
||||
* @param taskId Task id
|
||||
*/
|
||||
public void requestHidden(String taskId);
|
||||
|
||||
|
@ -18,6 +25,8 @@ public interface MonitorBackgroundEventUIListener {
|
|||
/**
|
||||
* Called when the task is resumed
|
||||
*
|
||||
*
|
||||
* @param taskId Task id
|
||||
*/
|
||||
public void requestResume(String taskId);
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
/**
|
||||
* Background Operations Monitor
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorBackgroundInfoDialog extends Window {
|
||||
|
|
|
@ -52,8 +52,8 @@ import com.sencha.gxt.widget.core.client.treegrid.TreeGrid;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorBackgroundInfoPanel extends FramedPanel implements
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorBackgroundInfoUpdater extends Timer {
|
||||
|
@ -27,9 +27,7 @@ public class MonitorBackgroundInfoUpdater extends Timer {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Log.debug("requesting operation in background ");
|
||||
|
@ -68,19 +66,11 @@ public class MonitorBackgroundInfoUpdater extends Timer {
|
|||
listener.retrieveBackgroundOperationMonitorFailed(throwable);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
|
||||
public void addListener(MonitorBackgroundInfoUpdaterListener listener) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void removeListener(MonitorBackgroundInfoUpdaterListener listener) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
|
|
@ -4,20 +4,24 @@ import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface MonitorBackgroundInfoUpdaterListener {
|
||||
|
||||
/**
|
||||
* Called when the operation is updated
|
||||
*
|
||||
* @param operationMonitor Operation monitor
|
||||
*/
|
||||
public void backgroundOperationMonitorUpdated(OperationMonitor operationMonitor);
|
||||
|
||||
|
||||
/**
|
||||
* Called when operation is failed
|
||||
*
|
||||
* @param caught Error
|
||||
*/
|
||||
public void retrieveBackgroundOperationMonitorFailed(Throwable caught);
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
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.rpc.AsyncCallback;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorBackgroundUpdater extends Timer implements MonitorBackgroundEventUIListener {
|
||||
|
@ -23,101 +22,71 @@ public class MonitorBackgroundUpdater extends Timer implements MonitorBackground
|
|||
private ArrayList<MonitorBackgroundUpdaterListener> listeners = new ArrayList<MonitorBackgroundUpdaterListener>();
|
||||
private BackgroundOperationMonitorSession backgroundOperationMonitorSession;
|
||||
|
||||
public MonitorBackgroundUpdater(){
|
||||
backgroundOperationMonitorSession=new BackgroundOperationMonitorSession();
|
||||
public MonitorBackgroundUpdater() {
|
||||
backgroundOperationMonitorSession = new BackgroundOperationMonitorSession();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
Log.debug("requesting list of operation in background ");
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getBackgroundOperationMonitor(backgroundOperationMonitorSession, new AsyncCallback<ArrayList<BackgroundOperationMonitor>>() {
|
||||
|
||||
TDGWTServiceAsync.INSTANCE.getBackgroundOperationMonitor(backgroundOperationMonitorSession,
|
||||
new AsyncCallback<ArrayList<BackgroundOperationMonitor>>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
cancel();
|
||||
|
||||
Log.error("Error retrieving operation monitor list",
|
||||
caught);
|
||||
Log.error("Error retrieving operation monitor list", caught);
|
||||
|
||||
fireRetrieveOperationMonitorListFailed(caught);
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<BackgroundOperationMonitor> result) {
|
||||
Log.debug("retrieved Operation Monitor List: "
|
||||
+ result.size());
|
||||
Log.debug("retrieved Operation Monitor List: " + result.size());
|
||||
|
||||
fireOperationMonitorListUpdated(result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void fireOperationMonitorListUpdated(ArrayList<BackgroundOperationMonitor> operationMonitorList){
|
||||
protected void fireOperationMonitorListUpdated(ArrayList<BackgroundOperationMonitor> operationMonitorList) {
|
||||
for (MonitorBackgroundUpdaterListener listener : listeners)
|
||||
listener.operationMonitorListUpdated(operationMonitorList);
|
||||
}
|
||||
|
||||
protected void fireRetrieveOperationMonitorListFailed(Throwable throwable){
|
||||
protected void fireRetrieveOperationMonitorListFailed(Throwable throwable) {
|
||||
for (MonitorBackgroundUpdaterListener listener : listeners)
|
||||
listener.retrieveOperationMonitorListFailed(throwable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void addListener(MonitorBackgroundUpdaterListener listener) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void removeListener(MonitorBackgroundUpdaterListener listener) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void requestAborted(String taskId) {
|
||||
OperationMonitorSession operationMonitorSession=new OperationMonitorSession(taskId);
|
||||
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(taskId);
|
||||
operationMonitorSession.setAbort(true);
|
||||
backgroundOperationMonitorSession.addToOperationMonitorSessionList(operationMonitorSession);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestHidden(String taskId) {
|
||||
OperationMonitorSession operationMonitorSession=new OperationMonitorSession(taskId);
|
||||
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(taskId);
|
||||
operationMonitorSession.setHidden(true);
|
||||
backgroundOperationMonitorSession.addToOperationMonitorSessionList(operationMonitorSession);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void requestResume(String taskId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,20 +6,24 @@ import org.gcube.portlets.user.td.gwtservice.shared.monitor.BackgroundOperationM
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface MonitorBackgroundUpdaterListener {
|
||||
|
||||
/**
|
||||
* Called when the list of opration is updated
|
||||
*
|
||||
* @param operationMonitorList Operation monitor list
|
||||
*/
|
||||
public void operationMonitorListUpdated(ArrayList<BackgroundOperationMonitor> operationMonitorList);
|
||||
|
||||
|
||||
/**
|
||||
* Called when operation is failed
|
||||
*
|
||||
* @param caught Error
|
||||
*/
|
||||
public void retrieveOperationMonitorListFailed(Throwable caught);
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ import com.sencha.gxt.widget.core.client.treegrid.TreeGridView;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
* @param <M>
|
||||
*
|
||||
* @param <M> Type
|
||||
*/
|
||||
public class ExtendedTreeGridView<M> extends TreeGridView<M> {
|
||||
// TODO bug in gxt3 3.0.0 fixed in future
|
||||
|
||||
|
||||
|
||||
@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.treegrid.TreeGrid;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class MonitorDetailPanel extends FramedPanel {
|
||||
private static final String WIDTH = "618px";
|
||||
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) {
|
||||
super();
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.io.Serializable;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorBaseDto implements Serializable {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.util.ArrayList;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorFolderDto extends MonitorBaseDto {
|
||||
|
|
|
@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.task.JobSClassifier;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorJobSDto extends MonitorFolderDto {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.util.ArrayList;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorTaskSDto extends MonitorFolderDto {
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.google.gwt.i18n.client.DateTimeFormat;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorTreeDataGenerator {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.task.WorkerState;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MonitorValidationJobSDto extends MonitorBaseDto {
|
||||
|
@ -20,26 +20,12 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
|||
private String humanReadableStatus;
|
||||
private InvocationS invocation;
|
||||
|
||||
|
||||
|
||||
|
||||
public MonitorValidationJobSDto(){
|
||||
public MonitorValidationJobSDto() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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) {
|
||||
public MonitorValidationJobSDto(String id, WorkerState workerState, float progress, String description,
|
||||
Throwable errorMessage, String humanReadableStatus, InvocationS invocation) {
|
||||
super(id);
|
||||
this.workerState = workerState;
|
||||
this.progress = progress;
|
||||
|
@ -49,7 +35,6 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
|||
this.invocation = invocation;
|
||||
}
|
||||
|
||||
|
||||
public WorkerState getWorkerState() {
|
||||
return workerState;
|
||||
}
|
||||
|
@ -66,8 +51,6 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
|||
this.progress = progress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
@ -105,7 +88,4 @@ public class MonitorValidationJobSDto extends MonitorBaseDto {
|
|||
return description;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.google.gwt.resources.client.CssResource;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface MonitorCSS extends CssResource {
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.sencha.gxt.widget.core.client.box.MessageBox;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class InfoMessageBox extends MessageBox {
|
||||
|
|
|
@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class UtilsGXT3 {
|
||||
|
|
Loading…
Reference in New Issue