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
This commit is contained in:
Francesco Mangiacrapa 2018-04-26 16:05:28 +00:00
parent f17d119cce
commit b8b7bcf077
2 changed files with 32 additions and 7 deletions

View File

@ -9,10 +9,11 @@ import java.util.Map;
import org.gcube.common.workspacetaskexecutor.TaskConfiguration; 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 * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Apr 26, 2018 * Apr 26, 2018
@ -24,7 +25,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
*/ */
private static final long serialVersionUID = -3380573762288127547L; private static final long serialVersionUID = -3380573762288127547L;
private String taskId; private String taskId;
private String taskDescription; @JsonIgnoreProperties
private String taskDescription; //optional
private String token; private String token;
private String workspaceItemId; private String workspaceItemId;
private Map<String, String> mapParameters; private Map<String, String> mapParameters;
@ -37,11 +39,13 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
} }
/** /**
* @param taskId * Instantiates a new algorithm configuration.
* @param taskDescription *
* @param token * @param taskId the task id
* @param workspaceItemId * @param taskDescription the task description
* @param mapParameters * @param token the token
* @param workspaceItemId the workspace item id
* @param mapParameters the map parameters
*/ */
public AlgorithmConfiguration( public AlgorithmConfiguration(
String taskId, String taskDescription, String token, String taskId, String taskDescription, String token,
@ -57,6 +61,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
/** /**
* Gets the task id.
*
* @return the taskId * @return the taskId
*/ */
public String getTaskId() { public String getTaskId() {
@ -66,6 +72,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
/** /**
* Gets the task description.
*
* @return the taskDescription * @return the taskDescription
*/ */
public String getTaskDescription() { public String getTaskDescription() {
@ -75,6 +83,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
/** /**
* Gets the token.
*
* @return the token * @return the token
*/ */
public String getToken() { public String getToken() {
@ -84,6 +94,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
/** /**
* Gets the workspace item id.
*
* @return the workspaceItemId * @return the workspaceItemId
*/ */
public String getWorkspaceItemId() { public String getWorkspaceItemId() {
@ -93,6 +105,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
/** /**
* Gets the map parameters.
*
* @return the mapParameters * @return the mapParameters
*/ */
public Map<String, String> getMapParameters() { public Map<String, String> getMapParameters() {
@ -102,6 +116,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
/** /**
* Sets the task id.
*
* @param taskId the taskId to set * @param taskId the taskId to set
*/ */
public void setTaskId(String taskId) { 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 * @param taskDescription the taskDescription to set
*/ */
public void setTaskDescription(String taskDescription) { public void setTaskDescription(String taskDescription) {
@ -120,6 +138,8 @@ public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
/** /**
* Sets the token.
*
* @param token the token to set * @param token the token to set
*/ */
public void setToken(String token) { 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 * @param workspaceItemId the workspaceItemId to set
*/ */
public void setWorkspaceItemId(String workspaceItemId) { 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 * @param mapParameters the mapParameters to set
*/ */
public void setMapParameters(Map<String, String> mapParameters) { public void setMapParameters(Map<String, String> mapParameters) {

View File

@ -32,6 +32,7 @@ public class TestDataMinerTaskExecutor {
exec.withOwner(USERNAME); exec.withOwner(USERNAME);
try { try {
exec.removeTaskConfig(WORKSPACE_FOLDER_ID);
exec.checkItemExecutable(WORKSPACE_FOLDER_ID); exec.checkItemExecutable(WORKSPACE_FOLDER_ID);
} }
catch (ItemNotExecutableException e) { catch (ItemNotExecutableException e) {