142 lines
2.2 KiB
Java
142 lines
2.2 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.common.workspacetaskexecutor.shared;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
|
|
|
/**
|
|
* The Class TaskParameter.
|
|
*
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
* May 7, 2018
|
|
*/
|
|
public class TaskParameter implements Serializable{
|
|
|
|
/**
|
|
*
|
|
*/
|
|
private static final long serialVersionUID = 3607328256110736864L;
|
|
private String key;
|
|
private String value;
|
|
@JsonIgnoreProperties
|
|
private String defaultValue; //optional
|
|
private TaskParameterType type;
|
|
|
|
/**
|
|
* Instantiates a new task parameter.
|
|
*/
|
|
public TaskParameter() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Instantiates a new task parameter.
|
|
*
|
|
* @param key the key
|
|
* @param value the value
|
|
* @param type the type
|
|
*/
|
|
public TaskParameter(String key, String value, String defaultValue, TaskParameterType type) {
|
|
this.key = key;
|
|
this.value = value;
|
|
this.defaultValue = defaultValue;
|
|
this.type = type;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return the key
|
|
*/
|
|
public String getKey() {
|
|
|
|
return key;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return the value
|
|
*/
|
|
public String getValue() {
|
|
|
|
return value;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return the defaultValue
|
|
*/
|
|
public String getDefaultValue() {
|
|
|
|
return defaultValue;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return the type
|
|
*/
|
|
public TaskParameterType getType() {
|
|
|
|
return type;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param key the key to set
|
|
*/
|
|
public void setKey(String key) {
|
|
|
|
this.key = key;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param value the value to set
|
|
*/
|
|
public void setValue(String value) {
|
|
|
|
this.value = value;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param defaultValue the defaultValue to set
|
|
*/
|
|
public void setDefaultValue(String defaultValue) {
|
|
|
|
this.defaultValue = defaultValue;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param type the type to set
|
|
*/
|
|
public void setType(TaskParameterType type) {
|
|
|
|
this.type = type;
|
|
}
|
|
|
|
/* (non-Javadoc)
|
|
* @see java.lang.Object#toString()
|
|
*/
|
|
@Override
|
|
public String toString() {
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
builder.append("TaskParameter [key=");
|
|
builder.append(key);
|
|
builder.append(", value=");
|
|
builder.append(value);
|
|
builder.append(", defaultValue=");
|
|
builder.append(defaultValue);
|
|
builder.append(", type=");
|
|
builder.append(type);
|
|
builder.append("]");
|
|
return builder.toString();
|
|
}
|
|
|
|
|
|
} |