2018-05-04 11:35:17 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-05-04 16:16:28 +02:00
|
|
|
package org.gcube.portlets.widgets.wstaskexecutor.client.rpc;
|
2018-05-04 11:35:17 +02:00
|
|
|
|
2018-05-04 12:16:27 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2018-05-17 18:24:09 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.TaskOperator;
|
2018-06-07 15:30:37 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.TaskOutput;
|
2018-05-08 12:23:11 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType;
|
2018-05-04 17:32:34 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskComputation;
|
2018-05-04 16:16:28 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskConfiguration;
|
2018-05-04 17:32:34 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskExecutionStatus;
|
2018-05-04 12:16:27 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.shared.GcubeScope;
|
|
|
|
|
2018-05-04 11:35:17 +02:00
|
|
|
import com.google.gwt.core.client.GWT;
|
2018-05-04 12:16:27 +02:00
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
2018-05-04 11:35:17 +02:00
|
|
|
|
|
|
|
|
2018-05-04 16:16:28 +02:00
|
|
|
|
2018-05-04 11:35:17 +02:00
|
|
|
/**
|
2018-05-04 16:16:28 +02:00
|
|
|
* The Interface WsTaskExecutorWidgetServiceAsync.
|
2018-05-04 11:35:17 +02:00
|
|
|
*
|
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
* May 4, 2018
|
|
|
|
*/
|
2018-05-04 12:23:04 +02:00
|
|
|
public interface WsTaskExecutorWidgetServiceAsync {
|
2018-05-04 11:35:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The Class Util.
|
|
|
|
*
|
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
* May 4, 2018
|
|
|
|
*/
|
|
|
|
public static final class Util
|
|
|
|
{
|
2018-05-04 12:23:04 +02:00
|
|
|
private static WsTaskExecutorWidgetServiceAsync instance;
|
2018-05-04 11:35:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the single instance of Util.
|
|
|
|
*
|
|
|
|
* @return single instance of Util
|
|
|
|
*/
|
2018-05-04 12:23:04 +02:00
|
|
|
public static final WsTaskExecutorWidgetServiceAsync getInstance()
|
2018-05-04 11:35:17 +02:00
|
|
|
{
|
|
|
|
if ( instance == null )
|
|
|
|
{
|
2018-05-04 12:23:04 +02:00
|
|
|
instance = (WsTaskExecutorWidgetServiceAsync) GWT.create( WsTaskExecutorWidgetService.class );
|
2018-05-04 11:35:17 +02:00
|
|
|
}
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instantiates a new util.
|
|
|
|
*/
|
|
|
|
private Util()
|
|
|
|
{
|
|
|
|
// Utility class should not be instantiated
|
|
|
|
}
|
|
|
|
}
|
2018-05-04 12:16:27 +02:00
|
|
|
|
|
|
|
/**
|
2018-05-04 16:16:28 +02:00
|
|
|
* Gets the list of scopes for logged user.
|
|
|
|
*
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
* @return the list of scopes for logged user
|
|
|
|
*/
|
|
|
|
void getListOfScopesForLoggedUser(AsyncCallback<List<GcubeScope>> asyncCallback);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Check item task configurations.
|
|
|
|
*
|
|
|
|
* @param folderId the folder id
|
|
|
|
* @param asyncCallback the async callback
|
2018-05-04 12:16:27 +02:00
|
|
|
*/
|
2018-05-04 16:16:28 +02:00
|
|
|
void checkItemTaskConfigurations(String folderId, AsyncCallback<List<TaskConfiguration>> asyncCallback);
|
2018-05-04 17:32:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Monitor task execution status.
|
|
|
|
*
|
|
|
|
* @param configuration the configuration
|
|
|
|
* @param taskComputation the task computation
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
*/
|
|
|
|
void monitorTaskExecutionStatus(
|
|
|
|
TaskConfiguration configuration, TaskComputation taskComputation,
|
|
|
|
AsyncCallback<TaskExecutionStatus> asyncCallback);
|
2018-05-08 12:23:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the available parameter types.
|
|
|
|
*
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
* @return the available parameter types
|
|
|
|
*/
|
|
|
|
void getAvailableParameterTypes(AsyncCallback<List<TaskParameterType>> asyncCallback);
|
2018-05-09 12:36:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates the task configuration.
|
|
|
|
*
|
|
|
|
* @param itemId the item id
|
|
|
|
* @param taskConfiguration the task configuration
|
|
|
|
* @param isUpdate the is update
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
*/
|
|
|
|
void createTaskConfiguration(
|
|
|
|
String itemId, TaskConfiguration taskConfiguration, boolean isUpdate, AsyncCallback<Boolean> asyncCallback);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the item task configurations.
|
|
|
|
*
|
|
|
|
* @param itemId the item id
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
* @return the item task configurations
|
|
|
|
*/
|
|
|
|
void getItemTaskConfigurations(String itemId, AsyncCallback<List<TaskConfiguration>> asyncCallback);
|
2018-05-09 18:00:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes the task configuration.
|
|
|
|
*
|
|
|
|
* @param taskConfiguration the task configuration
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
*/
|
|
|
|
void removeTaskConfiguration(TaskConfiguration taskConfiguration, AsyncCallback<Boolean> asyncCallback);
|
|
|
|
|
2018-05-16 17:52:14 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute the task.
|
|
|
|
*
|
|
|
|
* @param taskConfiguration the task configuration
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
*/
|
|
|
|
void executeTheTask(TaskConfiguration taskConfiguration, AsyncCallback<TaskExecutionStatus> asyncCallback);
|
|
|
|
|
|
|
|
|
2018-05-17 18:24:09 +02:00
|
|
|
/**
|
|
|
|
* Gets the list operators per scope.
|
|
|
|
*
|
|
|
|
* @param scope the scope
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
* @return the list operators per scope
|
|
|
|
*/
|
2018-05-25 15:00:33 +02:00
|
|
|
void getListOperatorsPerScope(String scope, AsyncCallback<List<TaskOperator>> asyncCallback);
|
2018-05-17 18:24:09 +02:00
|
|
|
|
|
|
|
|
2018-06-07 15:30:37 +02:00
|
|
|
/**
|
|
|
|
* Gets the output.
|
|
|
|
*
|
|
|
|
* @param taskConfiguration the task configuration
|
|
|
|
* @param taskComputation the task computation
|
|
|
|
* @param asyncCallback the async callback
|
|
|
|
* @return the output
|
|
|
|
*/
|
|
|
|
void getOutput(
|
|
|
|
TaskConfiguration taskConfiguration, TaskComputation taskComputation, AsyncCallback<TaskOutput> asyncCallback);
|
|
|
|
|
|
|
|
|
2018-05-04 11:35:17 +02:00
|
|
|
}
|