From fd9aa5ab583b98159daa9c7f0bb95696e8c6c5d6 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Fri, 25 May 2018 10:34:13 +0000 Subject: [PATCH] Added Task Name git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/workspace-task-executor-library@167727 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../shared/BaseTaskConfiguration.java | 8 ++++++ .../shared/dataminer/TaskConfiguration.java | 28 +++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/common/workspacetaskexecutor/shared/BaseTaskConfiguration.java b/src/main/java/org/gcube/common/workspacetaskexecutor/shared/BaseTaskConfiguration.java index e12812a..4a19874 100644 --- a/src/main/java/org/gcube/common/workspacetaskexecutor/shared/BaseTaskConfiguration.java +++ b/src/main/java/org/gcube/common/workspacetaskexecutor/shared/BaseTaskConfiguration.java @@ -22,6 +22,14 @@ public interface BaseTaskConfiguration { */ String getTaskId(); + + /** + * Gets the task name. + * + * @return the task name + */ + String getTaskName(); + /** * Gets the workspace item id where execute the Task. * diff --git a/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/TaskConfiguration.java b/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/TaskConfiguration.java index 3b59a50..40cc64b 100644 --- a/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/TaskConfiguration.java +++ b/src/main/java/org/gcube/common/workspacetaskexecutor/shared/dataminer/TaskConfiguration.java @@ -30,6 +30,7 @@ public class TaskConfiguration implements BaseTaskConfiguration, Serializable { */ private static final long serialVersionUID = -3380573762288127547L; private String taskId; + private String taskName; @JsonIgnoreProperties private String taskDescription; // optional /* @@ -44,6 +45,7 @@ public class TaskConfiguration implements BaseTaskConfiguration, Serializable { private String configurationKey; private String owner; + /** * Instantiates a new task configuration. */ @@ -56,6 +58,7 @@ public class TaskConfiguration implements BaseTaskConfiguration, Serializable { * * @param configurationKey the configuration key * @param taskId the task id + * @param taskName the task name * @param taskDescription the task description * @param owner the owner * @param scope the scope @@ -64,12 +67,13 @@ public class TaskConfiguration implements BaseTaskConfiguration, Serializable { * @param listParameters the map parameters */ public TaskConfiguration( - String configurationKey, String taskId, String taskDescription, String owner, String scope, + String configurationKey, String taskId, String taskName, String taskDescription, String owner, String scope, String maskedToken, String workspaceItemId, List listParameters) { setConfigurationKey(configurationKey); this.taskId = taskId; + this.taskName = taskName; this.taskDescription = taskDescription; this.owner = owner; this.scope = scope; @@ -255,6 +259,25 @@ public class TaskConfiguration implements BaseTaskConfiguration, Serializable { } + + + /** + * @return the taskName + */ + public String getTaskName() { + + return taskName; + } + + + /** + * @param taskName the taskName to set + */ + public void setTaskName(String taskName) { + + this.taskName = taskName; + } + /** * Sets the masked token. * @@ -274,6 +297,8 @@ public class TaskConfiguration implements BaseTaskConfiguration, Serializable { StringBuilder builder = new StringBuilder(); builder.append("TaskConfiguration [taskId="); builder.append(taskId); + builder.append(", taskName="); + builder.append(taskName); builder.append(", taskDescription="); builder.append(taskDescription); builder.append(", scope="); @@ -292,5 +317,4 @@ public class TaskConfiguration implements BaseTaskConfiguration, Serializable { return builder.toString(); } - }