git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/workspace-task-executor-library@167238 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4e4441ec5d
commit
0e33d32f8f
|
@ -4,7 +4,6 @@
|
|||
package org.gcube.common.workspacetaskexecutor;
|
||||
|
||||
import org.gcube.common.workspacetaskexecutor.shared.ItemNotExecutable;
|
||||
import org.gcube.common.workspacetaskexecutor.shared.TaskConfiguration;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.common.workspacetaskexecutor.shared;
|
||||
package org.gcube.common.workspacetaskexecutor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.http.HttpRequest;
|
||||
|
||||
/**
|
||||
* The Interface DoTaskConfiguration.
|
||||
*
|
||||
|
@ -21,14 +23,6 @@ public interface TaskConfiguration {
|
|||
*/
|
||||
String getTaskId();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the item id.
|
||||
*
|
||||
* @return the item id
|
||||
*/
|
||||
String getItemId();
|
||||
|
||||
/**
|
||||
* Gets the task description.
|
||||
*
|
||||
|
@ -36,6 +30,7 @@ public interface TaskConfiguration {
|
|||
*/
|
||||
String getTaskDescription();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the map parameters.
|
||||
*
|
||||
|
@ -44,4 +39,23 @@ public interface TaskConfiguration {
|
|||
Map<String, String> getMapParameters();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the workspace item id where execute the Task
|
||||
*
|
||||
* @return the workspace item id
|
||||
*/
|
||||
String getWorkspaceItemId();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the http request.
|
||||
*
|
||||
* @return the http request
|
||||
*/
|
||||
HttpRequest getHttpRequest();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,182 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
package org.gcube.common.workspacetaskexecutor.shared.homelibrary;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.gcube.common.workspacetaskexecutor.TaskConfiguration;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The Class DataMinerAlgorithmConfiguration.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Apr 26, 2018
|
||||
*/
|
||||
public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3380573762288127547L;
|
||||
private String taskId;
|
||||
private String taskDescription;
|
||||
private String token;
|
||||
private String workspaceItemId;
|
||||
private Map<String, String> mapParameters;
|
||||
|
||||
/**
|
||||
* Instantiates a new run algorithm configuration.
|
||||
*/
|
||||
public AlgorithmConfiguration() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param taskId
|
||||
* @param taskDescription
|
||||
* @param token
|
||||
* @param workspaceItemId
|
||||
* @param mapParameters
|
||||
*/
|
||||
public AlgorithmConfiguration(
|
||||
String taskId, String taskDescription, String token,
|
||||
String workspaceItemId, Map<String, String> mapParameters) {
|
||||
|
||||
super();
|
||||
this.taskId = taskId;
|
||||
this.taskDescription = taskDescription;
|
||||
this.token = token;
|
||||
this.workspaceItemId = workspaceItemId;
|
||||
this.mapParameters = mapParameters;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the taskId
|
||||
*/
|
||||
public String getTaskId() {
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the taskDescription
|
||||
*/
|
||||
public String getTaskDescription() {
|
||||
|
||||
return taskDescription;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the token
|
||||
*/
|
||||
public String getToken() {
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the workspaceItemId
|
||||
*/
|
||||
public String getWorkspaceItemId() {
|
||||
|
||||
return workspaceItemId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the mapParameters
|
||||
*/
|
||||
public Map<String, String> getMapParameters() {
|
||||
|
||||
return mapParameters;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param taskId the taskId to set
|
||||
*/
|
||||
public void setTaskId(String taskId) {
|
||||
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param taskDescription the taskDescription to set
|
||||
*/
|
||||
public void setTaskDescription(String taskDescription) {
|
||||
|
||||
this.taskDescription = taskDescription;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param token the token to set
|
||||
*/
|
||||
public void setToken(String token) {
|
||||
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param workspaceItemId the workspaceItemId to set
|
||||
*/
|
||||
public void setWorkspaceItemId(String workspaceItemId) {
|
||||
|
||||
this.workspaceItemId = workspaceItemId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param mapParameters the mapParameters to set
|
||||
*/
|
||||
public void setMapParameters(Map<String, String> mapParameters) {
|
||||
|
||||
this.mapParameters = mapParameters;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.common.workspacetaskexecutor.TaskConfiguration#getHttpRequest()
|
||||
*/
|
||||
@Override
|
||||
public HttpRequest getHttpRequest() {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("AlgorithmConfiguration [taskId=");
|
||||
builder.append(taskId);
|
||||
builder.append(", taskDescription=");
|
||||
builder.append(taskDescription);
|
||||
builder.append(", token=");
|
||||
builder.append(token);
|
||||
builder.append(", workspaceItemId=");
|
||||
builder.append(workspaceItemId);
|
||||
builder.append(", mapParameters=");
|
||||
builder.append(mapParameters);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue