131 lines
2.7 KiB
Java
131 lines
2.7 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.portlets.user.dataminermanager.client.bean;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Date;
|
|
|
|
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
|
|
|
|
|
|
|
|
|
|
|
public class ComputationItem implements Serializable{
|
|
|
|
private static final long serialVersionUID = 7948340340190844208L;
|
|
|
|
// force to implement these objects in javascript
|
|
private ComputationId computationId;
|
|
|
|
|
|
private String id;
|
|
private String name;
|
|
private String description;
|
|
private String categoryId;
|
|
private String operatorId;
|
|
private String infrastructure;
|
|
private Date creationDate;
|
|
private Date endDate;
|
|
private ComputationStatus status;
|
|
private Resource resource;
|
|
private Operator operator;
|
|
|
|
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public ComputationItem() {
|
|
super();
|
|
}
|
|
|
|
public ComputationItem(ComputationId computationId, String name, String description,
|
|
String categoryId, String operatorId, String infrastructure,
|
|
Date creationDate, Date endDate,
|
|
ComputationStatus status, Resource resource) {
|
|
super();
|
|
this.computationId=computationId;
|
|
this.id=computationId.getId();
|
|
this.name=name;
|
|
this.description=description;
|
|
this.categoryId=categoryId;
|
|
this.operatorId=operatorId;
|
|
this.infrastructure=infrastructure;
|
|
this.creationDate=creationDate;
|
|
this.endDate=endDate;
|
|
this.status=status;
|
|
this.resource=resource;
|
|
}
|
|
|
|
public OperatorCategory getOperatorCategory() {
|
|
OperatorsClassification classification = DataMinerManager.getDefaultOperatorsClassification();
|
|
if (classification==null)
|
|
return null;
|
|
else
|
|
return classification.getCategoryById(categoryId);
|
|
}
|
|
|
|
public Operator getOperator() {
|
|
if (operator==null) {
|
|
OperatorsClassification classification = DataMinerManager.getDefaultOperatorsClassification();
|
|
if (classification!=null)
|
|
operator=classification.getOperatorById(operatorId);
|
|
}
|
|
return operator;
|
|
}
|
|
|
|
|
|
public ComputationId getComputationId() {
|
|
return computationId;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public String getCategoryId() {
|
|
return categoryId;
|
|
}
|
|
|
|
public String getOperatorId() {
|
|
return operatorId;
|
|
}
|
|
|
|
public String getInfrastructure() {
|
|
return infrastructure;
|
|
}
|
|
|
|
public Date getCreationDate() {
|
|
return creationDate;
|
|
}
|
|
|
|
public Date getEndDate() {
|
|
return endDate;
|
|
}
|
|
|
|
public ComputationStatus getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public Resource getResource() {
|
|
return resource;
|
|
}
|
|
|
|
public void setEndDate(Date endDate) {
|
|
this.endDate=endDate;
|
|
}
|
|
|
|
}
|