2014-05-08 15:20:56 +02:00
|
|
|
package org.gcube.portlets.user.td.tablewidget.client.validation.tree;
|
|
|
|
|
2014-05-16 20:15:37 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS;
|
2014-07-02 17:31:28 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ConditionCode;
|
2014-05-16 20:15:37 +02:00
|
|
|
|
2014-05-08 15:20:56 +02:00
|
|
|
/**
|
|
|
|
*
|
2015-03-13 16:51:38 +01:00
|
|
|
* @author "Giancarlo Panichi" email: <a
|
|
|
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
2014-07-02 17:31:28 +02:00
|
|
|
*
|
2014-05-08 15:20:56 +02:00
|
|
|
*/
|
|
|
|
public class ValidationDto extends BaseDto {
|
|
|
|
|
|
|
|
private static final long serialVersionUID = -4353641080571614057L;
|
|
|
|
|
2015-03-13 16:51:38 +01:00
|
|
|
private String title;
|
|
|
|
private String description;
|
|
|
|
private Boolean valid;
|
|
|
|
private InvocationS invocation;
|
|
|
|
private ConditionCode conditionCode;
|
|
|
|
private String validationColumnColumnId;
|
|
|
|
|
|
|
|
public ValidationDto() {
|
|
|
|
|
2014-05-08 15:20:56 +02:00
|
|
|
}
|
2015-03-13 16:51:38 +01:00
|
|
|
|
2014-07-02 17:31:28 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param id
|
|
|
|
* @param description
|
|
|
|
* @param valid
|
|
|
|
* @param conditionCode
|
|
|
|
* @param validationColumnColumnId
|
|
|
|
* @param invocation
|
|
|
|
*/
|
2015-03-13 16:51:38 +01:00
|
|
|
public ValidationDto(String id, String title, String description,
|
|
|
|
Boolean valid, ConditionCode conditionCode,
|
|
|
|
String validationColumnColumnId, InvocationS invocation) {
|
2014-05-08 18:59:15 +02:00
|
|
|
super(id);
|
2015-03-13 16:51:38 +01:00
|
|
|
this.title = title;
|
|
|
|
this.description = description;
|
|
|
|
this.valid = valid;
|
|
|
|
this.conditionCode = conditionCode;
|
|
|
|
this.validationColumnColumnId = validationColumnColumnId;
|
|
|
|
this.invocation = invocation;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTitle(String title) {
|
|
|
|
this.title = title;
|
2014-05-08 15:20:56 +02:00
|
|
|
}
|
2015-03-13 16:51:38 +01:00
|
|
|
|
2014-05-08 15:20:56 +02:00
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDescription(String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Boolean getValid() {
|
|
|
|
return valid;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setValid(Boolean valid) {
|
|
|
|
this.valid = valid;
|
|
|
|
}
|
|
|
|
|
2014-05-16 20:15:37 +02:00
|
|
|
public InvocationS getInvocation() {
|
|
|
|
return invocation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setInvocation(InvocationS invocation) {
|
|
|
|
this.invocation = invocation;
|
|
|
|
}
|
|
|
|
|
2014-07-02 17:31:28 +02:00
|
|
|
public ConditionCode getConditionCode() {
|
|
|
|
return conditionCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setConditionCode(ConditionCode conditionCode) {
|
|
|
|
this.conditionCode = conditionCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getValidationColumnColumnId() {
|
|
|
|
return validationColumnColumnId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setValidationColumnColumnId(String validationColumnColumnId) {
|
|
|
|
this.validationColumnColumnId = validationColumnColumnId;
|
|
|
|
}
|
|
|
|
|
2014-05-08 15:20:56 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2015-03-13 16:51:38 +01:00
|
|
|
String response;
|
|
|
|
if(title==null || title.isEmpty()){
|
|
|
|
response=description;
|
|
|
|
} else {
|
|
|
|
response=title+": "+description;
|
|
|
|
}
|
|
|
|
return response;
|
2014-05-08 15:20:56 +02:00
|
|
|
}
|
2014-05-16 20:15:37 +02:00
|
|
|
|
2014-05-08 15:20:56 +02:00
|
|
|
}
|