2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Added shows results for computations that are successful git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128532 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d7682b795c
commit
6b3f4ebff1
|
@ -2,22 +2,28 @@ package org.gcube.portlets.user.dataminermanager.client;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
|
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationExecutionRequestEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationExecutionRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemRequestEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.MenuEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.MenuEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.MenuSwitchEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.MenuSwitchEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationRequestEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationRequestEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputResourceEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputResourceRequestEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputShowEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputShowRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.RefreshDataMinerWorkAreaEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.RefreshDataMinerWorkAreaEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionRequestEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionRequestEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionRequestEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.monitor.StatusMonitor;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
|
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEventType;
|
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEventType;
|
||||||
|
@ -44,6 +50,7 @@ public class DataMinerManagerController {
|
||||||
private DataMinerWorkArea dataMinerWorkArea;
|
private DataMinerWorkArea dataMinerWorkArea;
|
||||||
private List<OperatorsClassification> operatorsClassifications;
|
private List<OperatorsClassification> operatorsClassifications;
|
||||||
private MenuType currentVisualization;
|
private MenuType currentVisualization;
|
||||||
|
private StatusMonitor monitor;
|
||||||
|
|
||||||
public DataMinerManagerController() {
|
public DataMinerManagerController() {
|
||||||
init();
|
init();
|
||||||
|
@ -73,18 +80,15 @@ public class DataMinerManagerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
private void sessionExpiredShowDelayed() {
|
* private void sessionExpiredShowDelayed() { Timer timeoutTimer = new
|
||||||
Timer timeoutTimer = new Timer() {
|
* Timer() { public void run() { sessionExpiredShow();
|
||||||
public void run() {
|
*
|
||||||
sessionExpiredShow();
|
* } }; int TIMEOUT = 3; // 3 second timeout
|
||||||
|
*
|
||||||
}
|
* timeoutTimer.schedule(TIMEOUT * 1000); // timeout is in milliseconds
|
||||||
};
|
*
|
||||||
int TIMEOUT = 3; // 3 second timeout
|
* }
|
||||||
|
*/
|
||||||
timeoutTimer.schedule(TIMEOUT * 1000); // timeout is in milliseconds
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
private void bind() {
|
private void bind() {
|
||||||
|
|
||||||
|
@ -156,6 +160,39 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.addHandler(
|
||||||
|
OutputResourceRequestEvent.TYPE,
|
||||||
|
new OutputResourceRequestEvent.OutputResourceRequestEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOutputRequest(
|
||||||
|
OutputResourceRequestEvent event) {
|
||||||
|
Log.debug("Catch OutputResourceRequestEvent: "
|
||||||
|
+ event);
|
||||||
|
manageOutputResourceRequestEvent(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.addHandler(
|
||||||
|
OutputShowRequestEvent.TYPE,
|
||||||
|
new OutputShowRequestEvent.OutputShowRequestEventHandler() {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOutputShowRequest(OutputShowRequestEvent event) {
|
||||||
|
Log.debug("Catch OutputShowRequestEvent: "
|
||||||
|
+ event);
|
||||||
|
manageOutputShowRequestEvent(event);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE
|
||||||
.addHandler(
|
.addHandler(
|
||||||
OperatorsClassificationRequestEvent.TYPE,
|
OperatorsClassificationRequestEvent.TYPE,
|
||||||
|
@ -184,9 +221,26 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.addHandler(
|
||||||
|
DataMinerWorkAreaRequestEvent.TYPE,
|
||||||
|
new DataMinerWorkAreaRequestEvent.DataMinerWorkAreaRequestEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequest(
|
||||||
|
DataMinerWorkAreaRequestEvent event) {
|
||||||
|
Log.debug("Catch DataMinerWorkAreaRequestEvent: "
|
||||||
|
+ event);
|
||||||
|
retrieveDataMinerWorkArea();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void callHello() {
|
private void callHello() {
|
||||||
|
|
||||||
DataMinerPortletServiceAsync.INSTANCE
|
DataMinerPortletServiceAsync.INSTANCE
|
||||||
.hello(new AsyncCallback<UserInfo>() {
|
.hello(new AsyncCallback<UserInfo>() {
|
||||||
|
|
||||||
|
@ -233,36 +287,39 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
private void startComputationRequest(
|
private void startComputationRequest(
|
||||||
final StartComputationExecutionRequestEvent event) {
|
final StartComputationExecutionRequestEvent event) {
|
||||||
|
monitor = new StatusMonitor();
|
||||||
DataMinerPortletServiceAsync.INSTANCE.startComputation(event.getOp(),
|
DataMinerPortletServiceAsync.INSTANCE.startComputation(event.getOp(),
|
||||||
new AsyncCallback<ComputationId>() {
|
new AsyncCallback<ComputationId>() {
|
||||||
@Override
|
|
||||||
public void onSuccess(ComputationId computationId) {
|
|
||||||
if (computationId == null)
|
|
||||||
UtilsGXT3.alert("Error",
|
|
||||||
"Failed to start computation "
|
|
||||||
+ event.getOp().getName()
|
|
||||||
+ ", the computation id is null!");
|
|
||||||
else {
|
|
||||||
startComputation(computationId,
|
|
||||||
event.getComputationStatusPanelIndex());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
monitor.hide();
|
||||||
if (caught instanceof ExpiredSessionServiceException) {
|
if (caught instanceof ExpiredSessionServiceException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session!");
|
UtilsGXT3.alert("Error", "Expired Session!");
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE
|
||||||
.fireEvent(new SessionExpiredEvent());
|
.fireEvent(new SessionExpiredEvent());
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert("Error",
|
||||||
"Failed to start computation "
|
"Failed start computation "
|
||||||
+ event.getOp().getName() + "! "
|
+ event.getOp().getName() + "! "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
caught.printStackTrace();
|
caught.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ComputationId computationId) {
|
||||||
|
monitor.hide();
|
||||||
|
if (computationId == null)
|
||||||
|
UtilsGXT3.alert("Error",
|
||||||
|
"Failed start computation "
|
||||||
|
+ event.getOp().getName()
|
||||||
|
+ ", the computation id is null!");
|
||||||
|
else {
|
||||||
|
startComputation(computationId,
|
||||||
|
event.getComputationStatusPanelIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -277,12 +334,13 @@ public class DataMinerManagerController {
|
||||||
private void cancelComputationRequest(
|
private void cancelComputationRequest(
|
||||||
CancelComputationExecutionRequestEvent event) {
|
CancelComputationExecutionRequestEvent event) {
|
||||||
final ComputationId computationId = event.getComputationId();
|
final ComputationId computationId = event.getComputationId();
|
||||||
|
monitor = new StatusMonitor();
|
||||||
DataMinerPortletServiceAsync.INSTANCE.cancelComputation(computationId,
|
DataMinerPortletServiceAsync.INSTANCE.cancelComputation(computationId,
|
||||||
new AsyncCallback<String>() {
|
new AsyncCallback<String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
monitor.hide();
|
||||||
if (caught instanceof ExpiredSessionServiceException) {
|
if (caught instanceof ExpiredSessionServiceException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session!");
|
UtilsGXT3.alert("Error", "Expired Session!");
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE
|
||||||
|
@ -298,6 +356,7 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String result) {
|
public void onSuccess(String result) {
|
||||||
|
monitor.hide();
|
||||||
Log.debug("Computation Deleted!");
|
Log.debug("Computation Deleted!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -306,11 +365,13 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
private void resubmitComputationRequest(
|
private void resubmitComputationRequest(
|
||||||
final ResubmitComputationExecutionRequestEvent event) {
|
final ResubmitComputationExecutionRequestEvent event) {
|
||||||
|
monitor = new StatusMonitor();
|
||||||
DataMinerPortletServiceAsync.INSTANCE.resubmit(
|
DataMinerPortletServiceAsync.INSTANCE.resubmit(
|
||||||
event.getItemDescription(), new AsyncCallback<ComputationId>() {
|
event.getItemDescription(), new AsyncCallback<ComputationId>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
monitor.hide();
|
||||||
if (caught instanceof ExpiredSessionServiceException) {
|
if (caught instanceof ExpiredSessionServiceException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session!");
|
UtilsGXT3.alert("Error", "Expired Session!");
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE
|
||||||
|
@ -325,6 +386,7 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ComputationId result) {
|
public void onSuccess(ComputationId result) {
|
||||||
|
monitor.hide();
|
||||||
if (result == null)
|
if (result == null)
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Error",
|
.alert("Error",
|
||||||
|
@ -338,10 +400,8 @@ public class DataMinerManagerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resubmitComputation(ComputationId computationId) {
|
private void resubmitComputation(ComputationId computationId) {
|
||||||
ComputationItem computationItem = new ComputationItem(computationId,
|
|
||||||
null);
|
|
||||||
ResubmitComputationExecutionEvent event = new ResubmitComputationExecutionEvent(
|
ResubmitComputationExecutionEvent event = new ResubmitComputationExecutionEvent(
|
||||||
computationItem);
|
computationId);
|
||||||
EventBusProvider.INSTANCE.fireEvent(event);
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -436,11 +496,13 @@ public class DataMinerManagerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveDataMinerWorkArea() {
|
private void retrieveDataMinerWorkArea() {
|
||||||
|
monitor = new StatusMonitor();
|
||||||
DataMinerPortletServiceAsync.INSTANCE
|
DataMinerPortletServiceAsync.INSTANCE
|
||||||
.getDataMinerWorkArea(new AsyncCallback<DataMinerWorkArea>() {
|
.getDataMinerWorkArea(new AsyncCallback<DataMinerWorkArea>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
monitor.hide();
|
||||||
if (caught instanceof ExpiredSessionServiceException) {
|
if (caught instanceof ExpiredSessionServiceException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE
|
||||||
|
@ -454,6 +516,7 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(DataMinerWorkArea result) {
|
public void onSuccess(DataMinerWorkArea result) {
|
||||||
|
monitor.hide();
|
||||||
Log.debug("DataMinerWorkArea: " + result);
|
Log.debug("DataMinerWorkArea: " + result);
|
||||||
fireDataMinerWorkAreaEventRetrieved(result);
|
fireDataMinerWorkAreaEventRetrieved(result);
|
||||||
|
|
||||||
|
@ -471,11 +534,13 @@ public class DataMinerManagerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteItemRequest(final DeleteItemRequestEvent event) {
|
private void deleteItemRequest(final DeleteItemRequestEvent event) {
|
||||||
|
monitor = new StatusMonitor();
|
||||||
DataMinerPortletServiceAsync.INSTANCE.deleteItem(
|
DataMinerPortletServiceAsync.INSTANCE.deleteItem(
|
||||||
event.getItemDescription(), new AsyncCallback<Void>() {
|
event.getItemDescription(), new AsyncCallback<Void>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
monitor.hide();
|
||||||
if (caught instanceof ExpiredSessionServiceException) {
|
if (caught instanceof ExpiredSessionServiceException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE
|
||||||
|
@ -489,6 +554,7 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Void result) {
|
public void onSuccess(Void result) {
|
||||||
|
monitor.hide();
|
||||||
Log.debug("Deleted Item!");
|
Log.debug("Deleted Item!");
|
||||||
fireRefreshDataMinerWorkAreaEvent(event
|
fireRefreshDataMinerWorkAreaEvent(event
|
||||||
.getDataMinerWorkAreaElementType());
|
.getDataMinerWorkAreaElementType());
|
||||||
|
@ -507,4 +573,93 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
private void manageOutputResourceRequestEvent(
|
||||||
|
OutputResourceRequestEvent event) {
|
||||||
|
if (event == null) {
|
||||||
|
UtilsGXT3.alert("Error", "Invalid output request!");
|
||||||
|
} else {
|
||||||
|
if (event.getComputationId() == null
|
||||||
|
|| event.getComputationId().getId() == null
|
||||||
|
|| event.getComputationId().getId().isEmpty()) {
|
||||||
|
UtilsGXT3.alert(
|
||||||
|
"Error",
|
||||||
|
"Invalid output request, computation id: "
|
||||||
|
+ event.getComputationId());
|
||||||
|
} else {
|
||||||
|
monitor = new StatusMonitor();
|
||||||
|
DataMinerPortletServiceAsync.INSTANCE
|
||||||
|
.getResourceByComputationId(event.getComputationId(),
|
||||||
|
new AsyncCallback<Resource>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Resource resource) {
|
||||||
|
monitor.hide();
|
||||||
|
fireOutputResourceEvent(resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
monitor.hide();
|
||||||
|
Log.error("Error in getResourceByComputationId: "
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
UtilsGXT3
|
||||||
|
.alert("Error",
|
||||||
|
"Impossible to retrieve output info. "
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fireOutputResourceEvent(Resource resource) {
|
||||||
|
OutputResourceEvent event = new OutputResourceEvent(resource);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void manageOutputShowRequestEvent(OutputShowRequestEvent event) {
|
||||||
|
if (event == null) {
|
||||||
|
UtilsGXT3.alert("Error", "Invalid show output request!");
|
||||||
|
} else {
|
||||||
|
if (event.getItemDescription() == null
|
||||||
|
|| event.getItemDescription().getId() == null
|
||||||
|
|| event.getItemDescription().getId().isEmpty()) {
|
||||||
|
UtilsGXT3.alert(
|
||||||
|
"Error",
|
||||||
|
"Invalid show output request, item description: "
|
||||||
|
+ event.getItemDescription());
|
||||||
|
} else {
|
||||||
|
monitor = new StatusMonitor();
|
||||||
|
DataMinerPortletServiceAsync.INSTANCE
|
||||||
|
.getResourceByComputationItem(
|
||||||
|
event.getItemDescription(),
|
||||||
|
new AsyncCallback<Resource>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Resource resource) {
|
||||||
|
monitor.hide();
|
||||||
|
fireOutputShowEvent(resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
monitor.hide();
|
||||||
|
Log.error("Error in getResourceByComputationItem: "
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
UtilsGXT3
|
||||||
|
.alert("Error",
|
||||||
|
"Impossible to retrieve output info. "
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void fireOutputShowEvent(Resource resource) {
|
||||||
|
OutputShowEvent event = new OutputShowEvent(resource);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRequestEventType;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data Miner Work Area Request Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DataMinerWorkAreaRequestEvent
|
||||||
|
extends
|
||||||
|
GwtEvent<DataMinerWorkAreaRequestEvent.DataMinerWorkAreaRequestEventHandler> {
|
||||||
|
|
||||||
|
public static Type<DataMinerWorkAreaRequestEventHandler> TYPE = new Type<DataMinerWorkAreaRequestEventHandler>();
|
||||||
|
private DataMinerWorkAreaRequestEventType dataMinerWorkAreaRequestEventType;
|
||||||
|
|
||||||
|
public interface DataMinerWorkAreaRequestEventHandler extends EventHandler {
|
||||||
|
void onRequest(DataMinerWorkAreaRequestEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasDataMinerWorkAreaRequestEventHandler extends
|
||||||
|
HasHandlers {
|
||||||
|
public HandlerRegistration addDataMinerWorkAreaRequestEventHandler(
|
||||||
|
DataMinerWorkAreaRequestEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataMinerWorkAreaRequestEvent(
|
||||||
|
DataMinerWorkAreaRequestEventType dataMinerWorkAreaRequestEventType) {
|
||||||
|
this.dataMinerWorkAreaRequestEventType = dataMinerWorkAreaRequestEventType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(DataMinerWorkAreaRequestEventHandler handler) {
|
||||||
|
handler.onRequest(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<DataMinerWorkAreaRequestEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<DataMinerWorkAreaRequestEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,
|
||||||
|
DataMinerWorkAreaRequestEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataMinerWorkAreaRequestEventType getDataMinerWorkAreaRequestEventType() {
|
||||||
|
return dataMinerWorkAreaRequestEventType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "DataMinerWorkAreaRequestEvent [dataMinerWorkAreaRequestEventType="
|
||||||
|
+ dataMinerWorkAreaRequestEventType + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output Resource Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class OutputResourceEvent extends
|
||||||
|
GwtEvent<OutputResourceEvent.OutputResourceEventHandler> {
|
||||||
|
public static Type<OutputResourceEventHandler> TYPE = new Type<OutputResourceEventHandler>();
|
||||||
|
private Resource resource;
|
||||||
|
|
||||||
|
public interface OutputResourceEventHandler extends EventHandler {
|
||||||
|
void onOutput(OutputResourceEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasOutputResourceEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addOutputResourceEventHandler(
|
||||||
|
OutputResourceEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OutputResourceEvent(Resource resource) {
|
||||||
|
this.resource = resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(OutputResourceEventHandler handler) {
|
||||||
|
handler.onOutput(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<OutputResourceEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<OutputResourceEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source, OutputResourceEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Resource getResource() {
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "OutputResourceEvent [resource=" + resource + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output Resource Request Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class OutputResourceRequestEvent extends
|
||||||
|
GwtEvent<OutputResourceRequestEvent.OutputResourceRequestEventHandler> {
|
||||||
|
|
||||||
|
public static Type<OutputResourceRequestEventHandler> TYPE = new Type<OutputResourceRequestEventHandler>();
|
||||||
|
private ComputationId computationId;
|
||||||
|
|
||||||
|
public interface OutputResourceRequestEventHandler extends EventHandler {
|
||||||
|
void onOutputRequest(OutputResourceRequestEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasOutputResourceRequestEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addOutputResourceRequestEventHandler(
|
||||||
|
OutputResourceRequestEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OutputResourceRequestEvent(ComputationId computationId) {
|
||||||
|
this.computationId = computationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(OutputResourceRequestEventHandler handler) {
|
||||||
|
handler.onOutputRequest(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<OutputResourceRequestEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<OutputResourceRequestEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source, OutputResourceRequestEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComputationId getComputationId() {
|
||||||
|
return computationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "OutputResourceRequestEvent [computationId=" + computationId
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output Show Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class OutputShowEvent extends
|
||||||
|
GwtEvent<OutputShowEvent.OutputShowEventHandler> {
|
||||||
|
|
||||||
|
public static Type<OutputShowEventHandler> TYPE = new Type<OutputShowEventHandler>();
|
||||||
|
private Resource resource;
|
||||||
|
|
||||||
|
public interface OutputShowEventHandler extends EventHandler {
|
||||||
|
void onOutputShow(OutputShowEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasOutputShowResourceEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addOutputShowResourceEventHandler(
|
||||||
|
OutputShowEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OutputShowEvent(Resource resource) {
|
||||||
|
this.resource = resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(OutputShowEventHandler handler) {
|
||||||
|
handler.onOutputShow(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<OutputShowEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<OutputShowEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source, OutputShowEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Resource getResource() {
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "OutputShowEvent [resource=" + resource + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output Show Request Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class OutputShowRequestEvent extends
|
||||||
|
GwtEvent<OutputShowRequestEvent.OutputShowRequestEventHandler> {
|
||||||
|
|
||||||
|
public static Type<OutputShowRequestEventHandler> TYPE = new Type<OutputShowRequestEventHandler>();
|
||||||
|
private ItemDescription itemDescription;
|
||||||
|
|
||||||
|
public interface OutputShowRequestEventHandler extends EventHandler {
|
||||||
|
void onOutputShowRequest(OutputShowRequestEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasOutputShowResourceRequestEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addOutputShowResourceRequestEventHandler(
|
||||||
|
OutputShowRequestEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OutputShowRequestEvent(ItemDescription itemDescription) {
|
||||||
|
this.itemDescription = itemDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(OutputShowRequestEventHandler handler) {
|
||||||
|
handler.onOutputShowRequest(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<OutputShowRequestEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<OutputShowRequestEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source, OutputShowRequestEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemDescription getItemDescription() {
|
||||||
|
return itemDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "OutputShowRequestEvent [itemDescription=" + itemDescription
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client.events;
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
@ -20,7 +20,7 @@ public class ResubmitComputationExecutionEvent
|
||||||
GwtEvent<ResubmitComputationExecutionEvent.ResubmitComputationExecutionEventHandler> {
|
GwtEvent<ResubmitComputationExecutionEvent.ResubmitComputationExecutionEventHandler> {
|
||||||
|
|
||||||
public static Type<ResubmitComputationExecutionEventHandler> TYPE = new Type<ResubmitComputationExecutionEventHandler>();
|
public static Type<ResubmitComputationExecutionEventHandler> TYPE = new Type<ResubmitComputationExecutionEventHandler>();
|
||||||
private ComputationItem computationItem;
|
private ComputationId computationId;
|
||||||
|
|
||||||
public interface ResubmitComputationExecutionEventHandler extends
|
public interface ResubmitComputationExecutionEventHandler extends
|
||||||
EventHandler {
|
EventHandler {
|
||||||
|
@ -33,8 +33,8 @@ public class ResubmitComputationExecutionEvent
|
||||||
ResubmitComputationExecutionEventHandler handler);
|
ResubmitComputationExecutionEventHandler handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResubmitComputationExecutionEvent(ComputationItem computationItem) {
|
public ResubmitComputationExecutionEvent(ComputationId computationId) {
|
||||||
this.computationItem = computationItem;
|
this.computationId = computationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,14 +56,16 @@ public class ResubmitComputationExecutionEvent
|
||||||
source.fireEvent(event);
|
source.fireEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComputationItem getComputationItem() {
|
public ComputationId getComputationId() {
|
||||||
return computationItem;
|
return computationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ResubmitComputationExecutionEvent [computationItem="
|
return "ResubmitComputationExecutionEvent [computationId="
|
||||||
+ computationItem + "]";
|
+ computationId + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.util.List;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputResourceEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputShowEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionRequestEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionRequestEvent;
|
||||||
|
@ -96,12 +98,30 @@ public class ComputationExecutionPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.addHandler(
|
||||||
|
OutputShowEvent.getType(),
|
||||||
|
new OutputShowEvent.OutputShowEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOutputShow(OutputShowEvent event) {
|
||||||
|
showOutput(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void startNewComputation(final Operator operator) {
|
public void startNewComputation(final Operator operator) {
|
||||||
Log.debug("Computation Panel: start new computation ");
|
Log.debug("Computation Panel: start new computation ");
|
||||||
ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
||||||
operator);
|
operator.getName());
|
||||||
computationStatusPanels.add(statusPanel);
|
computationStatusPanels.add(statusPanel);
|
||||||
int index = computationStatusPanels.indexOf(statusPanel);
|
int index = computationStatusPanels.indexOf(statusPanel);
|
||||||
statusPanel.setItemId("ComputationStatusPanel" + String.valueOf(index));
|
statusPanel.setItemId("ComputationStatusPanel" + String.valueOf(index));
|
||||||
|
@ -141,9 +161,9 @@ public class ComputationExecutionPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resubmitComputation(ResubmitComputationExecutionEvent event) {
|
private void resubmitComputation(ResubmitComputationExecutionEvent event) {
|
||||||
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
||||||
event.getComputationItem().getOperator());
|
event.getComputationId().getOperatorName());
|
||||||
computationStatusPanels.add(statusPanel);
|
computationStatusPanels.add(statusPanel);
|
||||||
if (v.getWidgetCount() == 0) {
|
if (v.getWidgetCount() == 0) {
|
||||||
v.add(statusPanel, new VerticalLayoutData(1, -1, new Margins(20)));
|
v.add(statusPanel, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
|
@ -153,13 +173,32 @@ public class ComputationExecutionPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
removeAllButton.setEnabled(true);
|
removeAllButton.setEnabled(true);
|
||||||
|
|
||||||
statusPanel.computationStarted(event.getComputationItem()
|
statusPanel.computationStarted(event.getComputationId());
|
||||||
.getComputationId());
|
|
||||||
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void showOutput(OutputShowEvent event) {
|
||||||
|
/*
|
||||||
|
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
||||||
|
event.getComputationId().getOperatorName());
|
||||||
|
computationStatusPanels.add(statusPanel);
|
||||||
|
if (v.getWidgetCount() == 0) {
|
||||||
|
v.add(statusPanel, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
|
} else {
|
||||||
|
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1, new Margins(
|
||||||
|
20)));
|
||||||
|
}
|
||||||
|
removeAllButton.setEnabled(true);
|
||||||
|
|
||||||
|
statusPanel.computationStarted(event.getComputationId());
|
||||||
|
|
||||||
|
forceLayout();
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,9 @@ import org.gcube.portlets.user.dataminermanager.client.bean.output.ObjectResourc
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource.ResourceType;
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource.ResourceType;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.output.TableResource;
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.TableResource;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputResourceEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.OutputResourceRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.widgets.ImagesViewer;
|
import org.gcube.portlets.user.dataminermanager.client.widgets.ImagesViewer;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.widgets.ResourceViewer;
|
import org.gcube.portlets.user.dataminermanager.client.widgets.ResourceViewer;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
@ -24,7 +25,6 @@ import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.safehtml.shared.SafeHtml;
|
import com.google.gwt.safehtml.shared.SafeHtml;
|
||||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
||||||
import com.sencha.gxt.core.client.XTemplates;
|
import com.sencha.gxt.core.client.XTemplates;
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
|
@ -49,40 +49,44 @@ public class ComputationOutputPanel extends SimpleContainer {
|
||||||
super();
|
super();
|
||||||
this.computationId = computationId;
|
this.computationId = computationId;
|
||||||
Log.debug("ComputationOutputPanel");
|
Log.debug("ComputationOutputPanel");
|
||||||
|
bind();
|
||||||
init();
|
init();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
v = new VerticalLayoutContainer();
|
v = new VerticalLayoutContainer();
|
||||||
add(v);
|
add(v);
|
||||||
|
OutputResourceRequestEvent event=new OutputResourceRequestEvent(computationId);
|
||||||
// request resource by ComputationId
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
DataMinerPortletServiceAsync.INSTANCE.getResourceByComputationId(computationId,
|
|
||||||
new AsyncCallback<Resource>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Resource result) {
|
|
||||||
showOutputInfo(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
|
||||||
Log.error("Error in getResourceByComputationId: "
|
|
||||||
+ caught.getLocalizedMessage());
|
|
||||||
UtilsGXT3.alert(
|
|
||||||
"Error",
|
|
||||||
"Impossible to retrieve output info. "
|
|
||||||
+ caught.getLocalizedMessage());
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void bind(){
|
||||||
|
EventBusProvider.INSTANCE.addHandler(
|
||||||
|
OutputResourceEvent.TYPE,
|
||||||
|
new OutputResourceEvent.OutputResourceEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOutput(
|
||||||
|
OutputResourceEvent event) {
|
||||||
|
Log.debug("Catch OutputResourceEvent: "
|
||||||
|
+ event);
|
||||||
|
showOutputInfo(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param resource
|
* @param resource
|
||||||
*/
|
*/
|
||||||
private void showOutputInfo(Resource resource) {
|
private void showOutputInfo(OutputResourceEvent event) {
|
||||||
try {
|
try {
|
||||||
|
Resource resource=event.getResource();
|
||||||
Log.info("Show Output Info on: " + resource);
|
Log.info("Show Output Info on: " + resource);
|
||||||
if (resource == null)
|
if (resource == null)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -7,12 +7,13 @@ import java.util.Date;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.custom.progress.GreenProgressBar;
|
import org.gcube.portlets.user.dataminermanager.client.custom.progress.GreenProgressBar;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.custom.progress.RedProgressBar;
|
import org.gcube.portlets.user.dataminermanager.client.custom.progress.RedProgressBar;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationExecutionRequestEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationExecutionRequestEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRequestEventType;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
@ -35,193 +36,231 @@ import com.sencha.gxt.widget.core.client.info.Info;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Giancarlo Panichi
|
* @author Giancarlo Panichi email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ComputationStatusPanel extends SimpleContainer {
|
public class ComputationStatusPanel extends SimpleContainer {
|
||||||
|
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
private ComputationId computationId;
|
private ComputationId computationId;
|
||||||
private Operator operator;
|
private String operatorName;
|
||||||
private boolean terminated=false;
|
private boolean terminated = false;
|
||||||
private ComputationTimer timer = new ComputationTimer();
|
private ComputationTimer timer = new ComputationTimer();
|
||||||
private TextButton cancelComputationBtn;
|
private TextButton cancelComputationBtn;
|
||||||
private VerticalLayoutContainer vert;
|
private VerticalLayoutContainer vert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public ComputationStatusPanel(Operator operator) {
|
public ComputationStatusPanel(String operatorName) {
|
||||||
super();
|
super();
|
||||||
this.operator=operator;
|
this.operatorName = operatorName;
|
||||||
init();
|
init();
|
||||||
create();
|
create();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(){
|
private void init() {
|
||||||
setStylePrimaryName("computationStatusPanel");
|
setStylePrimaryName("computationStatusPanel");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void create(){
|
private void create() {
|
||||||
vert=new VerticalLayoutContainer();
|
vert = new VerticalLayoutContainer();
|
||||||
HtmlLayoutContainer title = new HtmlLayoutContainer("<div class='computationStatusTitle'><p>Computation of <b>" + operator.getName() + "</b></p></div>");
|
HtmlLayoutContainer title = new HtmlLayoutContainer(
|
||||||
HtmlLayoutContainer date = new HtmlLayoutContainer("<div class='computationStatusDate'><p>" + new Date().toString() + "</p></div>");
|
"<div class='computationStatusTitle'><p>Computation of <b>"
|
||||||
|
+ operatorName + "</b></p></div>");
|
||||||
|
HtmlLayoutContainer date = new HtmlLayoutContainer(
|
||||||
|
"<div class='computationStatusDate'><p>"
|
||||||
|
+ new Date().toString() + "</p></div>");
|
||||||
|
|
||||||
vert.add(title, new VerticalLayoutData(-1, -1, new Margins(0)));
|
vert.add(title, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
vert.add(date,new VerticalLayoutData(-1, -1, new Margins(0)));
|
vert.add(date, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
|
||||||
add(vert);
|
add(vert);
|
||||||
forceLayout();
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param computationId the computationId to set
|
* @param computationId
|
||||||
|
* the computationId to set
|
||||||
*/
|
*/
|
||||||
public void computationStarted(ComputationId computationId) {
|
public void computationStarted(ComputationId computationId) {
|
||||||
this.computationId = computationId;
|
this.computationId = computationId;
|
||||||
vert.add(new HtmlLayoutContainer("<p>Created, the id is "+computationId.getId()+" [<a href='"+computationId.getUrlId()+"' >link</a>]</p>"));
|
vert.add(new HtmlLayoutContainer("<p>Created, the id is "
|
||||||
|
+ computationId.getId() + " [<a href='"
|
||||||
|
+ computationId.getUrlId() + "' >link</a>]</p>"));
|
||||||
progressBar = new ProgressBar();
|
progressBar = new ProgressBar();
|
||||||
progressBar.updateProgress(0, "Starting...");
|
progressBar.updateProgress(0, "Starting...");
|
||||||
vert.add(progressBar,new VerticalLayoutData(1, -1, new Margins(20)));
|
vert.add(progressBar, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
|
|
||||||
cancelComputationBtn = new TextButton("Cancel");
|
cancelComputationBtn = new TextButton("Cancel");
|
||||||
|
|
||||||
cancelComputationBtn.addSelectHandler(new SelectHandler() {
|
cancelComputationBtn.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
cancelComputationBtn.disable();
|
cancelComputationBtn.disable();
|
||||||
cancelComputation();
|
cancelComputation();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cancelComputationBtn.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
|
||||||
|
|
||||||
vert.add(cancelComputationBtn,new VerticalLayoutData(-1, -1, new Margins(0)));
|
cancelComputationBtn.getElement().getStyle()
|
||||||
|
.setMarginBottom(36, Unit.PX);
|
||||||
|
|
||||||
|
vert.add(cancelComputationBtn, new VerticalLayoutData(-1, -1,
|
||||||
|
new Margins(0)));
|
||||||
forceLayout();
|
forceLayout();
|
||||||
timer.scheduleRepeating(Constants.TIME_UPDATE_COMPUTATION_STATUS_PANEL);
|
timer.scheduleRepeating(Constants.TIME_UPDATE_COMPUTATION_STATUS_PANEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cancelComputation() {
|
||||||
private void cancelComputation(){
|
CancelComputationExecutionRequestEvent event = new CancelComputationExecutionRequestEvent(
|
||||||
CancelComputationExecutionRequestEvent event=new CancelComputationExecutionRequestEvent(computationId);
|
computationId);
|
||||||
EventBusProvider.INSTANCE.fireEvent(event);
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param computationId
|
* @param computationId
|
||||||
* @param operator
|
* @param operator
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected void computationTerminated(ComputationId computationId, Operator operator, ComputationStatus computationStatus) {
|
protected void computationTerminated(ComputationId computationId,
|
||||||
|
ComputationStatus computationStatus) {
|
||||||
Log.debug("Computation Terminated");
|
Log.debug("Computation Terminated");
|
||||||
Log.debug("Computation Status:"+computationStatus);
|
Log.debug("Computation Status:" + computationStatus);
|
||||||
if (terminated == false) {
|
if (terminated == false) {
|
||||||
terminated = true;
|
terminated = true;
|
||||||
cancelComputationBtn.setVisible(false);
|
cancelComputationBtn.setVisible(false);
|
||||||
if (computationStatus.isComplete()) {
|
if (computationStatus.isComplete()) {
|
||||||
Log.debug("Computation is Complete");
|
Log.debug("Computation is Complete");
|
||||||
Info.display("Terminated", "The computation "+computationId.getId()+" of "+operator.getName()+" is terminated correctly.");
|
Info.display("Terminated",
|
||||||
int index=vert.getWidgetIndex(progressBar);
|
"The computation " + computationId.getId() + " of "
|
||||||
|
+ computationId.getOperatorName()
|
||||||
|
+ " is terminated correctly.");
|
||||||
|
int index = vert.getWidgetIndex(progressBar);
|
||||||
vert.remove(index);
|
vert.remove(index);
|
||||||
//TODO
|
// TODO
|
||||||
progressBar =new GreenProgressBar();
|
progressBar = new GreenProgressBar();
|
||||||
progressBar.updateProgress(1, "Computation Complete");
|
progressBar.updateProgress(1, "Computation Complete");
|
||||||
vert.insert(progressBar, index, new VerticalLayoutData(1, -1, new Margins(20)));
|
vert.insert(progressBar, index, new VerticalLayoutData(1, -1,
|
||||||
|
new Margins(20)));
|
||||||
showOutput();
|
showOutput();
|
||||||
|
fireDataMinerWorkAreareRequestUpdate();
|
||||||
} else if (computationStatus.isFailed()) {
|
} else if (computationStatus.isFailed()) {
|
||||||
Log.debug("Computation is Failed");
|
Log.debug("Computation is Failed");
|
||||||
String errorMessage;
|
String errorMessage;
|
||||||
if(computationStatus.getErrResource()==null||computationStatus.getErrResource().getDescription()==null ){
|
if (computationStatus.getErrResource() == null
|
||||||
errorMessage=new String("Computation Failed!");
|
|| computationStatus.getErrResource().getDescription() == null) {
|
||||||
|
errorMessage = new String("Computation Failed!");
|
||||||
} else {
|
} else {
|
||||||
errorMessage=computationStatus.getErrResource().getDescription();
|
errorMessage = computationStatus.getErrResource()
|
||||||
|
.getDescription();
|
||||||
}
|
}
|
||||||
|
Info.display("Failed",
|
||||||
UtilsGXT3.alert("Failed", "The computation "+computationId.getId()+" of "+operator.getName()+" has failed.</br>"
|
"The computation " + computationId.getId() + " of "
|
||||||
+"Message: "+errorMessage);
|
+ computationId.getOperatorName()
|
||||||
int index=vert.getWidgetIndex(progressBar);
|
+ " is failed.");
|
||||||
|
UtilsGXT3.alert("Failed",
|
||||||
|
"The computation " + computationId.getId() + " of "
|
||||||
|
+ computationId.getOperatorName()
|
||||||
|
+ " has failed.</br>"
|
||||||
|
+ errorMessage);
|
||||||
|
int index = vert.getWidgetIndex(progressBar);
|
||||||
vert.remove(index);
|
vert.remove(index);
|
||||||
//TODO
|
// TODO
|
||||||
progressBar =new RedProgressBar();
|
progressBar = new RedProgressBar();
|
||||||
progressBar.updateProgress(1, "Computation Fail");
|
progressBar.updateProgress(1, "Computation Fail");
|
||||||
progressBar.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
progressBar.getElement().getStyle()
|
||||||
vert.insert(progressBar, index, new VerticalLayoutData(1, -1, new Margins(20)));
|
.setMarginBottom(36, Unit.PX);
|
||||||
|
vert.insert(progressBar, index, new VerticalLayoutData(1, -1,
|
||||||
|
new Margins(20)));
|
||||||
|
fireDataMinerWorkAreareRequestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fireDataMinerWorkAreareRequestUpdate() {
|
||||||
|
DataMinerWorkAreaRequestEvent event = new DataMinerWorkAreaRequestEvent(
|
||||||
|
DataMinerWorkAreaRequestEventType.UPDATE);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void showOutput() {
|
private void showOutput() {
|
||||||
HtmlLayoutContainer computationEndMessage=new HtmlLayoutContainer("<p>The computation <b>"+operator.getName()+"</b> finished.</p>");
|
HtmlLayoutContainer computationEndMessage = new HtmlLayoutContainer(
|
||||||
vert.add(computationEndMessage, new VerticalLayoutData(-1, -1, new Margins(0)));
|
"<p>The computation <b>" + computationId.getOperatorName()
|
||||||
ComputationOutputPanel computationOutputPanel = new ComputationOutputPanel(computationId);
|
+ "</b> finished.</p>");
|
||||||
computationOutputPanel.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
vert.add(computationEndMessage, new VerticalLayoutData(-1, -1,
|
||||||
vert.add(computationOutputPanel, new VerticalLayoutData(1, -1, new Margins(0)));
|
new Margins(0)));
|
||||||
|
ComputationOutputPanel computationOutputPanel = new ComputationOutputPanel(
|
||||||
|
computationId);
|
||||||
|
computationOutputPanel.getElement().getStyle()
|
||||||
|
.setMarginBottom(36, Unit.PX);
|
||||||
|
vert.add(computationOutputPanel, new VerticalLayoutData(1, -1,
|
||||||
|
new Margins(0)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param computationStatus
|
* @param computationStatus
|
||||||
*/
|
*/
|
||||||
protected void updateStatus(ComputationStatus computationStatus) {
|
protected void updateStatus(ComputationStatus computationStatus) {
|
||||||
Log.debug("Conputation Status Panel ::Update Status ");
|
Log.debug("Conputation Status Panel ::Update Status ");
|
||||||
if (computationStatus.getStatus() == Status.PENDING)
|
if (computationStatus.getStatus() == Status.PENDING)
|
||||||
progressBar.updateText("Pending...");
|
progressBar.updateText("Pending...");
|
||||||
else {
|
else {
|
||||||
double percentage = computationStatus.getPercentage();
|
double percentage = computationStatus.getPercentage();
|
||||||
progressBar.updateProgress(percentage/100,
|
progressBar.updateProgress(percentage / 100, "Running, "
|
||||||
"Running, " + NumberFormat.getFormat("0.00").format(percentage) + "% Complete");
|
+ NumberFormat.getFormat("0.00").format(percentage)
|
||||||
|
+ "% Complete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private class ComputationTimer extends Timer {
|
private class ComputationTimer extends Timer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.debug("Timer run .....");
|
Log.debug("Timer run .....");
|
||||||
DataMinerPortletServiceAsync.INSTANCE.getComputationStatus(computationId, new AsyncCallback<ComputationStatus>() {
|
DataMinerPortletServiceAsync.INSTANCE.getComputationStatus(
|
||||||
|
computationId, new AsyncCallback<ComputationStatus>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
int index=vert.getWidgetIndex(progressBar);
|
int index = vert.getWidgetIndex(progressBar);
|
||||||
vert.remove(index);
|
vert.remove(index);
|
||||||
//TODO
|
// TODO
|
||||||
progressBar =new RedProgressBar();
|
progressBar = new RedProgressBar();
|
||||||
progressBar.updateProgress(1, "Failed to get the status");
|
progressBar.updateProgress(1,
|
||||||
progressBar.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
"Failed to get the status");
|
||||||
vert.insert(progressBar, index, new VerticalLayoutData(1, -1, new Margins(20)));
|
progressBar.getElement().getStyle()
|
||||||
|
.setMarginBottom(36, Unit.PX);
|
||||||
}
|
vert.insert(progressBar, index,
|
||||||
|
new VerticalLayoutData(1, -1, new Margins(
|
||||||
|
20)));
|
||||||
|
|
||||||
@Override
|
}
|
||||||
public void onSuccess(ComputationStatus computationStatus) {
|
|
||||||
if (computationStatus.isTerminated()) {
|
@Override
|
||||||
ComputationTimer.this.cancel();
|
public void onSuccess(
|
||||||
computationTerminated(computationId, operator, computationStatus);
|
ComputationStatus computationStatus) {
|
||||||
} else
|
if (computationStatus.isTerminated()) {
|
||||||
updateStatus(computationStatus);
|
ComputationTimer.this.cancel();
|
||||||
}
|
computationTerminated(computationId,
|
||||||
});
|
computationStatus);
|
||||||
|
} else
|
||||||
|
updateStatus(computationStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -229,9 +268,9 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
public void stopTimer() {
|
public void stopTimer() {
|
||||||
try {
|
try {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
vert.clear();
|
vert.clear();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.monitor;
|
||||||
|
|
||||||
|
import com.google.gwt.safehtml.shared.SafeHtml;
|
||||||
|
import com.sencha.gxt.widget.core.client.box.AutoProgressMessageBox;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo email: <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class StatusMonitor extends AutoProgressMessageBox {
|
||||||
|
|
||||||
|
public StatusMonitor() {
|
||||||
|
super("Waiting", "Please wait...");
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param headingHtml
|
||||||
|
* @param messageHtml
|
||||||
|
*/
|
||||||
|
public StatusMonitor(SafeHtml headingHtml, SafeHtml messageHtml) {
|
||||||
|
super(headingHtml, messageHtml);
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param headingHtml
|
||||||
|
*/
|
||||||
|
public StatusMonitor(SafeHtml headingHtml) {
|
||||||
|
super(headingHtml);
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param headingHtml
|
||||||
|
* @param messageHtml
|
||||||
|
*/
|
||||||
|
public StatusMonitor(String headingHtml, String messageHtml) {
|
||||||
|
super(headingHtml, messageHtml);
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param headingHtml
|
||||||
|
*/
|
||||||
|
public StatusMonitor(String headingHtml) {
|
||||||
|
super(headingHtml);
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void create() {
|
||||||
|
setProgressText("In progress...");
|
||||||
|
auto();
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -36,7 +36,6 @@ public interface DataMinerPortletService extends RemoteService {
|
||||||
public ComputationStatus getComputationStatus(ComputationId computationId)
|
public ComputationStatus getComputationStatus(ComputationId computationId)
|
||||||
throws ServiceException;
|
throws ServiceException;
|
||||||
|
|
||||||
|
|
||||||
public ComputationId resubmit(ItemDescription itemDescription) throws ServiceException;
|
public ComputationId resubmit(ItemDescription itemDescription) throws ServiceException;
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,4 +54,6 @@ public interface DataMinerPortletService extends RemoteService {
|
||||||
|
|
||||||
public Resource getResourceByComputationId(ComputationId computationId) throws ServiceException;
|
public Resource getResourceByComputationId(ComputationId computationId) throws ServiceException;
|
||||||
|
|
||||||
|
public Resource getResourceByComputationItem(ItemDescription itemDescription) throws ServiceException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,5 +61,8 @@ public interface DataMinerPortletServiceAsync {
|
||||||
|
|
||||||
void getResourceByComputationId(ComputationId computationId,
|
void getResourceByComputationId(ComputationId computationId,
|
||||||
AsyncCallback<Resource> callback);
|
AsyncCallback<Resource> callback);
|
||||||
|
|
||||||
|
void getResourceByComputationItem(ItemDescription itemDescription,
|
||||||
|
AsyncCallback<Resource> callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public enum DataMinerWorkAreaRequestEventType {
|
||||||
|
OPEN,UPDATE;
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public enum OutputResourceRequestEventType {
|
||||||
|
ComputationId, ItemDescription;
|
||||||
|
}
|
|
@ -155,7 +155,7 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("Resubmit(): " + itemDescription);
|
logger.debug("Resubmit(): " + itemDescription);
|
||||||
Map<String, String> properties = StorageUtil.getProperties(
|
Map<String, String> properties = StorageUtil.getProperties(
|
||||||
aslSession.getUsername(), itemDescription.getId());
|
aslSession.getUsername(), itemDescription.getId());
|
||||||
logger.debug(properties.toString());
|
logger.debug("Properties: " + properties);
|
||||||
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
||||||
return smClient.resubmitComputation(properties);
|
return smClient.resubmitComputation(properties);
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
|
@ -190,30 +190,7 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Resource getResourceByComputationId(ComputationId computationId)
|
|
||||||
throws ServiceException {
|
|
||||||
try {
|
|
||||||
Log.debug("getResourceByComputationId: " + computationId);
|
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
|
||||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
|
||||||
|
|
||||||
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
|
||||||
Resource resource = smClient
|
|
||||||
.getResourceByComputationId(computationId);
|
|
||||||
Log.debug("Resoure: " + resource);
|
|
||||||
return resource;
|
|
||||||
} catch (ServiceException e) {
|
|
||||||
logger.error(e.getLocalizedMessage());
|
|
||||||
throw e;
|
|
||||||
} catch (Throwable e) {
|
|
||||||
logger.error("Error in getResourceByComputationId: "
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
e.printStackTrace();
|
|
||||||
throw new ServiceException(e.getLocalizedMessage(), e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteItem(ItemDescription itemDescription)
|
public void deleteItem(ItemDescription itemDescription)
|
||||||
|
@ -317,4 +294,53 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resource getResourceByComputationId(ComputationId computationId)
|
||||||
|
throws ServiceException {
|
||||||
|
try {
|
||||||
|
Log.debug("getResourceByComputationId: " + computationId);
|
||||||
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||||
|
|
||||||
|
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
||||||
|
Resource resource = smClient
|
||||||
|
.getResourceByComputationId(computationId);
|
||||||
|
Log.debug("Resoure: " + resource);
|
||||||
|
return resource;
|
||||||
|
} catch (ServiceException e) {
|
||||||
|
logger.error(e.getLocalizedMessage());
|
||||||
|
throw e;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.error("Error in getResourceByComputationId: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new ServiceException(e.getLocalizedMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resource getResourceByComputationItem(ItemDescription itemDescription)
|
||||||
|
throws ServiceException {
|
||||||
|
try {
|
||||||
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||||
|
logger.debug("ResourceByComputationItemt(): " + itemDescription);
|
||||||
|
Map<String, String> properties = StorageUtil.getProperties(
|
||||||
|
aslSession.getUsername(), itemDescription.getId());
|
||||||
|
logger.debug("Properties: " + properties);
|
||||||
|
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
||||||
|
return smClient.getResourceByComputationProperties(properties);
|
||||||
|
} catch (ServiceException e) {
|
||||||
|
logger.error(e.getLocalizedMessage());
|
||||||
|
throw e;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.error("Error retrieving resource by computation item: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new ServiceException(e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,9 @@ public abstract class SClient {
|
||||||
public abstract Resource getResourceByComputationId(
|
public abstract Resource getResourceByComputationId(
|
||||||
ComputationId computationId) throws Exception;
|
ComputationId computationId) throws Exception;
|
||||||
|
|
||||||
|
public abstract Resource getResourceByComputationProperties(
|
||||||
|
Map<String, String> computationProperties) throws Exception;
|
||||||
|
|
||||||
public abstract String cancelComputation(ComputationId computationId)
|
public abstract String cancelComputation(ComputationId computationId)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,8 @@ public class SClient4WPS extends SClient {
|
||||||
processDescription = wpsClient.getProcessDescription(
|
processDescription = wpsClient.getProcessDescription(
|
||||||
wpsProcessingServlet, processId);
|
wpsProcessingServlet, processId);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error getProcessDescription for process "+processId+" with WPS URL: "
|
logger.error("Error getProcessDescription for process "
|
||||||
|
+ processId + " with WPS URL: "
|
||||||
+ wpsProcessingServlet);
|
+ wpsProcessingServlet);
|
||||||
if (k == 3)
|
if (k == 3)
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -294,7 +295,7 @@ public class SClient4WPS extends SClient {
|
||||||
processDescription.set(XmlString.Factory
|
processDescription.set(XmlString.Factory
|
||||||
.parse(processDescriptionURL));
|
.parse(processDescriptionURL));
|
||||||
|
|
||||||
logger.debug("ProcessDescription: "+processDescription);
|
logger.debug("ProcessDescription: " + processDescription);
|
||||||
|
|
||||||
InputDescriptionType[] inputList = processDescription
|
InputDescriptionType[] inputList = processDescription
|
||||||
.getDataInputs().getInputArray();
|
.getDataInputs().getInputArray();
|
||||||
|
@ -704,7 +705,8 @@ public class SClient4WPS extends SClient {
|
||||||
logger.error("Invalid processLocation: " + processUrl);
|
logger.error("Invalid processLocation: " + processUrl);
|
||||||
throw new Exception("Invalid processLocation: " + processUrl);
|
throw new Exception("Invalid processLocation: " + processUrl);
|
||||||
}
|
}
|
||||||
ComputationId computationId = new ComputationId(id, processUrl);
|
ComputationId computationId = new ComputationId(id, processUrl,
|
||||||
|
operator.getId(), operator.getName());
|
||||||
logger.debug("ComputationId: " + computationId);
|
logger.debug("ComputationId: " + computationId);
|
||||||
|
|
||||||
runningProcess.put(computationId, processInformations);
|
runningProcess.put(computationId, processInformations);
|
||||||
|
@ -1143,11 +1145,16 @@ public class SClient4WPS extends SClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ComputationId resubmitComputation(Map<String,String> computationProperties)
|
public ComputationId resubmitComputation(
|
||||||
throws Exception {
|
Map<String, String> computationProperties) throws Exception {
|
||||||
ProcessInformations processInformations;
|
ProcessInformations processInformations;
|
||||||
|
if (computationProperties == null || computationProperties.isEmpty()) {
|
||||||
|
throw new Exception("Invalid computation properties: "
|
||||||
|
+ computationProperties);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
processInformations = describeProcess(computationProperties.get("operator_name"));
|
processInformations = describeProcess(computationProperties
|
||||||
|
.get("operator_id"));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("GetParameters: " + e.getLocalizedMessage());
|
logger.error("GetParameters: " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -1163,19 +1170,30 @@ public class SClient4WPS extends SClient {
|
||||||
inputParameters.put(inputParameter.getName(), inputParameter);
|
inputParameters.put(inputParameter.getName(), inputParameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Map<String, String> userInputs = new LinkedHashMap<>();
|
Map<String, String> userInputs = new LinkedHashMap<>();
|
||||||
for(Map.Entry<String, String> entry:computationProperties.entrySet()){
|
for (Map.Entry<String, String> entry : computationProperties.entrySet()) {
|
||||||
if(entry.getKey().startsWith("input")){
|
if (entry.getKey().startsWith("input")) {
|
||||||
int inputSeparatorIndex=entry.getKey().indexOf("_");
|
int inputSeparatorIndex = entry.getKey().indexOf("_");
|
||||||
String inputKey=entry.getKey().substring(inputSeparatorIndex+1);
|
String inputKey = entry.getKey().substring(
|
||||||
userInputs.put(inputKey, entry.getValue());
|
inputSeparatorIndex + 1);
|
||||||
logger.debug("UserInputs[key=" + inputKey + ", value="
|
if (inputKey.compareToIgnoreCase("user.name") != 0
|
||||||
+ entry.getValue() + "]");
|
&& inputKey.compareToIgnoreCase("scope") != 0) {
|
||||||
|
userInputs.put(inputKey, entry.getValue());
|
||||||
|
logger.debug("UserInputs[key=" + inputKey + ", value="
|
||||||
|
+ entry.getValue() + "]");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (userInputs.isEmpty()) {
|
||||||
|
logger.error("Attention no imputs parameters retrieved for this computation: "
|
||||||
|
+ computationProperties);
|
||||||
|
throw new Exception(
|
||||||
|
"Attention no imputs parameters retrieved for this computation: "
|
||||||
|
+ computationProperties);
|
||||||
|
}
|
||||||
|
|
||||||
String processUrl = compute(processInformations, userInputs,
|
String processUrl = compute(processInformations, userInputs,
|
||||||
inputParameters);
|
inputParameters);
|
||||||
logger.debug("Stated Computation ProcessLocation:" + processUrl);
|
logger.debug("Stated Computation ProcessLocation:" + processUrl);
|
||||||
|
@ -1188,7 +1206,9 @@ public class SClient4WPS extends SClient {
|
||||||
logger.error("Invalid processLocation: " + processUrl);
|
logger.error("Invalid processLocation: " + processUrl);
|
||||||
throw new Exception("Invalid processLocation: " + processUrl);
|
throw new Exception("Invalid processLocation: " + processUrl);
|
||||||
}
|
}
|
||||||
ComputationId computationId = new ComputationId(id, processUrl);
|
ComputationId computationId = new ComputationId(id, processUrl,
|
||||||
|
computationProperties.get("operator_id"),
|
||||||
|
computationProperties.get("operator_name"));
|
||||||
logger.debug("ComputationId: " + computationId);
|
logger.debug("ComputationId: " + computationId);
|
||||||
|
|
||||||
runningProcess.put(computationId, processInformations);
|
runningProcess.put(computationId, processInformations);
|
||||||
|
@ -1196,4 +1216,11 @@ public class SClient4WPS extends SClient {
|
||||||
return computationId;
|
return computationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resource getResourceByComputationProperties(
|
||||||
|
Map<String, String> computationProperties) throws Exception {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,10 +338,10 @@ public class StatWPSClientSession {
|
||||||
url = req.getRequest(url);
|
url = req.getRequest(url);
|
||||||
try {
|
try {
|
||||||
String authString = user + ":" + password;
|
String authString = user + ":" + password;
|
||||||
System.out.println("auth string: " + authString);
|
logger.debug("auth string: " + authString);
|
||||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||||
String encoded = new String(authEncBytes);
|
String encoded = new String(authEncBytes);
|
||||||
System.out.println("Base64 encoded auth string: " + encoded);
|
logger.debug("Base64 encoded auth string: " + encoded);
|
||||||
|
|
||||||
URL urlObj = new URL(url);
|
URL urlObj = new URL(url);
|
||||||
HttpURLConnection connection = (HttpURLConnection) urlObj
|
HttpURLConnection connection = (HttpURLConnection) urlObj
|
||||||
|
@ -370,17 +370,17 @@ public class StatWPSClientSession {
|
||||||
private ProcessDescriptionsDocument retrieveDescriptionViaGET(
|
private ProcessDescriptionsDocument retrieveDescriptionViaGET(
|
||||||
String[] processIDs, String url) throws WPSClientException {
|
String[] processIDs, String url) throws WPSClientException {
|
||||||
try {
|
try {
|
||||||
System.out.println("RetrieveDescriptio: " + processIDs + " url:"
|
logger.debug("RetrieveDescription GET: " + processIDs + " url:"
|
||||||
+ url);
|
+ url);
|
||||||
StatClientDescribeProcessRequest req = new StatClientDescribeProcessRequest();
|
StatClientDescribeProcessRequest req = new StatClientDescribeProcessRequest();
|
||||||
req.setIdentifier(processIDs);
|
req.setIdentifier(processIDs);
|
||||||
String requestURL = req.getRequest(url);
|
String requestURL = req.getRequest(url);
|
||||||
|
|
||||||
String authString = user + ":" + password;
|
String authString = user + ":" + password;
|
||||||
System.out.println("auth string: " + authString);
|
logger.debug("auth string: " + authString);
|
||||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||||
String encoded = new String(authEncBytes);
|
String encoded = new String(authEncBytes);
|
||||||
System.out.println("Base64 encoded auth string: " + encoded);
|
logger.debug("Base64 encoded auth string: " + encoded);
|
||||||
|
|
||||||
URL urlObj = new URL(requestURL);
|
URL urlObj = new URL(requestURL);
|
||||||
HttpURLConnection connection = (HttpURLConnection) urlObj
|
HttpURLConnection connection = (HttpURLConnection) urlObj
|
||||||
|
@ -419,10 +419,10 @@ public class StatWPSClientSession {
|
||||||
try {
|
try {
|
||||||
logger.debug("RetrieveDataViaPost(): " + urlString);
|
logger.debug("RetrieveDataViaPost(): " + urlString);
|
||||||
String authString = user + ":" + password;
|
String authString = user + ":" + password;
|
||||||
System.out.println("auth string: " + authString);
|
logger.debug("auth string: " + authString);
|
||||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||||
String encoded = new String(authEncBytes);
|
String encoded = new String(authEncBytes);
|
||||||
System.out.println("Base64 encoded auth string: " + encoded);
|
logger.debug("Base64 encoded auth string: " + encoded);
|
||||||
|
|
||||||
URL url = new URL(urlString);
|
URL url = new URL(urlString);
|
||||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||||
|
@ -609,10 +609,10 @@ public class StatWPSClientSession {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String authString = user + ":" + password;
|
String authString = user + ":" + password;
|
||||||
System.out.println("auth string: " + authString);
|
logger.debug("auth string: " + authString);
|
||||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||||
String encoded = new String(authEncBytes);
|
String encoded = new String(authEncBytes);
|
||||||
System.out.println("Base64 encoded auth string: " + encoded);
|
logger.debug("Base64 encoded auth string: " + encoded);
|
||||||
|
|
||||||
url+="?id="+computationId;
|
url+="?id="+computationId;
|
||||||
URL urlObj = new URL(url);
|
URL urlObj = new URL(url);
|
||||||
|
|
|
@ -13,15 +13,20 @@ public class ComputationId implements Serializable {
|
||||||
private static final long serialVersionUID = 7898676192287822723L;
|
private static final long serialVersionUID = 7898676192287822723L;
|
||||||
private String id;
|
private String id;
|
||||||
private String urlId;
|
private String urlId;
|
||||||
|
private String operatorId;
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
public ComputationId() {
|
public ComputationId() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComputationId(String id, String urlId) {
|
public ComputationId(String id, String urlId, String operatorId,
|
||||||
|
String operatorName) {
|
||||||
super();
|
super();
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.urlId = urlId;
|
this.urlId = urlId;
|
||||||
|
this.operatorId = operatorId;
|
||||||
|
this.operatorName = operatorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
|
@ -40,9 +45,26 @@ public class ComputationId implements Serializable {
|
||||||
this.urlId = urlId;
|
this.urlId = urlId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOperatorId() {
|
||||||
|
return operatorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperatorId(String operatorId) {
|
||||||
|
this.operatorId = operatorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOperatorName() {
|
||||||
|
return operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperatorName(String operatorName) {
|
||||||
|
this.operatorName = operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ComputationId [id=" + id + ", urlId=" + urlId + "]";
|
return "ComputationId [id=" + id + ", urlId=" + urlId + ", operatorId="
|
||||||
|
+ operatorId + ", operatorName=" + operatorName + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue