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-08 12:23:11 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType;
|
2018-05-08 16:56:18 +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-08 16:56:18 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskExecutionStatus;
|
2018-05-04 16:16:28 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException;
|
2018-05-09 18:00:33 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotExecutableException;
|
2018-05-16 17:52:14 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.exception.TaskErrorException;
|
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.exception.TaskNotExecutableException;
|
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.user.client.rpc.RemoteService;
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|
|
|
|
2018-05-04 12:16:27 +02:00
|
|
|
|
2018-05-16 17:52:14 +02:00
|
|
|
|
2018-05-04 11:35:17 +02:00
|
|
|
/**
|
2018-05-16 17:52:14 +02:00
|
|
|
* The Interface WsTaskExecutorWidgetService.
|
2018-05-04 12:16:27 +02:00
|
|
|
*
|
2018-05-16 17:52:14 +02:00
|
|
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
|
|
|
* May 16, 2018
|
2018-05-04 11:35:17 +02:00
|
|
|
*/
|
2018-05-08 12:34:23 +02:00
|
|
|
@RemoteServiceRelativePath("workspacetaskexecutor")
|
2018-05-04 12:23:04 +02:00
|
|
|
public interface WsTaskExecutorWidgetService extends RemoteService {
|
2018-05-04 12:16:27 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the list of scopes for logged user.
|
|
|
|
*
|
|
|
|
* @return the list of scopes for logged user
|
|
|
|
* @throws Exception the exception
|
|
|
|
*/
|
|
|
|
List<GcubeScope> getListOfScopesForLoggedUser() throws Exception;
|
2018-05-04 16:16:28 +02:00
|
|
|
|
2018-05-08 16:56:18 +02:00
|
|
|
/**
|
|
|
|
* Monitor task execution status.
|
|
|
|
*
|
|
|
|
* @param configuration the configuration
|
|
|
|
* @param taskComputation the task computation
|
|
|
|
* @return the task execution status
|
2018-05-16 17:52:14 +02:00
|
|
|
* @throws TaskErrorException the task error exception
|
2018-05-08 16:56:18 +02:00
|
|
|
* @throws Exception the exception
|
|
|
|
*/
|
|
|
|
TaskExecutionStatus monitorTaskExecutionStatus(
|
2018-05-16 17:52:14 +02:00
|
|
|
TaskConfiguration configuration, TaskComputation taskComputation) throws TaskErrorException, Exception;
|
2018-05-08 16:56:18 +02:00
|
|
|
|
|
|
|
|
2018-05-04 16:16:28 +02:00
|
|
|
/**
|
|
|
|
* Check item task configurations.
|
|
|
|
*
|
|
|
|
* @param itemId the item id
|
|
|
|
* @return the list
|
2018-05-08 16:56:18 +02:00
|
|
|
* @throws ItemNotConfiguredException the item not configured exception
|
|
|
|
* @throws Exception the exception
|
2018-05-04 16:16:28 +02:00
|
|
|
*/
|
|
|
|
List<TaskConfiguration> checkItemTaskConfigurations(String itemId) throws ItemNotConfiguredException, Exception;
|
2018-05-08 12:23:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the availables parameter types.
|
|
|
|
*
|
|
|
|
* @return the availables parameter types
|
|
|
|
* @throws Exception the exception
|
|
|
|
*/
|
|
|
|
List<TaskParameterType> getAvailableParameterTypes() throws Exception;
|
2018-05-09 12:36:54 +02:00
|
|
|
|
|
|
|
/**
|
2018-05-16 17:52:14 +02:00
|
|
|
* Creates the task configuration.
|
|
|
|
*
|
|
|
|
* @param itemId the item id
|
|
|
|
* @param taskConfiguration the task configuration
|
|
|
|
* @param isUpdate the is update
|
|
|
|
* @return the boolean
|
|
|
|
* @throws Exception the exception
|
2018-05-09 12:36:54 +02:00
|
|
|
*/
|
|
|
|
Boolean createTaskConfiguration(
|
|
|
|
String itemId, TaskConfiguration taskConfiguration, boolean isUpdate)
|
|
|
|
throws Exception;
|
|
|
|
|
|
|
|
/**
|
2018-05-16 17:52:14 +02:00
|
|
|
* Gets the item task configurations.
|
|
|
|
*
|
|
|
|
* @param itemId the item id
|
|
|
|
* @return the item task configurations
|
|
|
|
* @throws Exception the exception
|
2018-05-09 12:36:54 +02:00
|
|
|
*/
|
|
|
|
List<TaskConfiguration> getItemTaskConfigurations(String itemId)
|
|
|
|
throws Exception;
|
2018-05-09 18:00:33 +02:00
|
|
|
|
|
|
|
/**
|
2018-05-16 17:52:14 +02:00
|
|
|
* Removes the task configuration.
|
|
|
|
*
|
|
|
|
* @param taskConfiguration the task configuration
|
|
|
|
* @return the boolean
|
|
|
|
* @throws ItemNotExecutableException the item not executable exception
|
|
|
|
* @throws Exception the exception
|
2018-05-09 18:00:33 +02:00
|
|
|
*/
|
|
|
|
Boolean removeTaskConfiguration(TaskConfiguration taskConfiguration)
|
|
|
|
throws ItemNotExecutableException, Exception;
|
2018-05-16 17:52:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute the task.
|
|
|
|
*
|
|
|
|
* @param taskConfiguration the task configuration
|
|
|
|
* @return the task execution status
|
|
|
|
* @throws ItemNotExecutableException the item not executable exception
|
|
|
|
* @throws TaskNotExecutableException the task not executable exception
|
|
|
|
* @throws Exception the exception
|
|
|
|
*/
|
|
|
|
TaskExecutionStatus executeTheTask(TaskConfiguration taskConfiguration)
|
|
|
|
throws ItemNotExecutableException, TaskNotExecutableException,
|
|
|
|
Exception;
|
2018-05-04 11:35:17 +02:00
|
|
|
}
|