From b8b7bcf077ed5715f89274fcd1d85d77ba10d0e9 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Thu, 26 Apr 2018 16:05:28 +0000 Subject: [PATCH] enhancement on Project Activity #11690: Execute Data Miner processes from Workspace git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/workspace-task-executor-library@167244 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../dataminer/AlgorithmConfiguration.java | 38 +++++++++++++++---- .../TestDataMinerTaskExecutor.java | 1 + 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/AlgorithmConfiguration.java b/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/AlgorithmConfiguration.java index 73165fc..8c544a6 100644 --- a/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/AlgorithmConfiguration.java +++ b/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/AlgorithmConfiguration.java @@ -9,10 +9,11 @@ import java.util.Map; import org.gcube.common.workspacetaskexecutor.TaskConfiguration; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** - * The Class DataMinerAlgorithmConfiguration. + * The Class AlgorithmConfiguration. * * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it * Apr 26, 2018 @@ -24,7 +25,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { */ private static final long serialVersionUID = -3380573762288127547L; private String taskId; - private String taskDescription; + @JsonIgnoreProperties + private String taskDescription; //optional private String token; private String workspaceItemId; private Map mapParameters; @@ -37,11 +39,13 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { } /** - * @param taskId - * @param taskDescription - * @param token - * @param workspaceItemId - * @param mapParameters + * Instantiates a new algorithm configuration. + * + * @param taskId the task id + * @param taskDescription the task description + * @param token the token + * @param workspaceItemId the workspace item id + * @param mapParameters the map parameters */ public AlgorithmConfiguration( String taskId, String taskDescription, String token, @@ -57,6 +61,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Gets the task id. + * * @return the taskId */ public String getTaskId() { @@ -66,6 +72,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Gets the task description. + * * @return the taskDescription */ public String getTaskDescription() { @@ -75,6 +83,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Gets the token. + * * @return the token */ public String getToken() { @@ -84,6 +94,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Gets the workspace item id. + * * @return the workspaceItemId */ public String getWorkspaceItemId() { @@ -93,6 +105,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Gets the map parameters. + * * @return the mapParameters */ public Map getMapParameters() { @@ -102,6 +116,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Sets the task id. + * * @param taskId the taskId to set */ public void setTaskId(String taskId) { @@ -111,6 +127,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Sets the task description. + * * @param taskDescription the taskDescription to set */ public void setTaskDescription(String taskDescription) { @@ -120,6 +138,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Sets the token. + * * @param token the token to set */ public void setToken(String token) { @@ -129,6 +149,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Sets the workspace item id. + * * @param workspaceItemId the workspaceItemId to set */ public void setWorkspaceItemId(String workspaceItemId) { @@ -138,6 +160,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable { /** + * Sets the map parameters. + * * @param mapParameters the mapParameters to set */ public void setMapParameters(Map mapParameters) { diff --git a/src/test/java/org/gcube/common/workspacetaskexecutor/TestDataMinerTaskExecutor.java b/src/test/java/org/gcube/common/workspacetaskexecutor/TestDataMinerTaskExecutor.java index eef2770..6ca2978 100644 --- a/src/test/java/org/gcube/common/workspacetaskexecutor/TestDataMinerTaskExecutor.java +++ b/src/test/java/org/gcube/common/workspacetaskexecutor/TestDataMinerTaskExecutor.java @@ -32,6 +32,7 @@ public class TestDataMinerTaskExecutor { exec.withOwner(USERNAME); try { + exec.removeTaskConfig(WORKSPACE_FOLDER_ID); exec.checkItemExecutable(WORKSPACE_FOLDER_ID); } catch (ItemNotExecutableException e) {