modified the JobStatusType names, and added the service name attribute to the RunningJob class
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@141662 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
872dd71b75
commit
214e3ec5b7
|
@ -9,45 +9,45 @@ public enum JobStatusType {
|
|||
/**
|
||||
* The job has been cancelled.
|
||||
*/
|
||||
STATUS_CANCELLED,
|
||||
CANCELLED,
|
||||
/**
|
||||
* The job is in the process of being cancelled.
|
||||
*/
|
||||
STATUS_CANCELLING,
|
||||
CANCELLING,
|
||||
/**
|
||||
* The job has been deleted.
|
||||
*/
|
||||
STATUS_DELETED,
|
||||
DELETED,
|
||||
/**
|
||||
* The job is in the process of being deleted.
|
||||
*/
|
||||
STATUS_DELETING,//
|
||||
DELETING,//
|
||||
/**
|
||||
* The job is being executed by job processor.
|
||||
*/
|
||||
STATUS_EXECUTING,//
|
||||
EXECUTING,//
|
||||
/**
|
||||
* he job execution has failed.
|
||||
*/
|
||||
STATUS_FAILED,
|
||||
FAILED,
|
||||
/**
|
||||
* The job is new.
|
||||
*/
|
||||
STATUS_NEW,//
|
||||
NEW,//
|
||||
/**
|
||||
* The job is submitted for execution.
|
||||
*/
|
||||
STATUS_SUBMITTED,
|
||||
SUBMITTED,
|
||||
/**
|
||||
* The job has completed successfully
|
||||
*/
|
||||
STATUS_SUCCEEDED,
|
||||
SUCCEEDED,
|
||||
/**
|
||||
* The job execution has timed out.
|
||||
*/
|
||||
STATUS_TIMED_OUT,
|
||||
TIMED_OUT,
|
||||
/**
|
||||
* The job is waiting for available job processor.
|
||||
*/
|
||||
STATUS_WAITING
|
||||
WAITING
|
||||
}
|
||||
|
|
|
@ -3,10 +3,9 @@ package org.gcube.portal.databook.shared;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Massimiliano Assante, ISTI-CNR
|
||||
* @version 0.1 Dec 2012
|
||||
*
|
||||
* The RunningJob class.
|
||||
* @author Massimiliano Assante, ISTI-CNR (massimiliano.assante@isti.cnr.it)
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class RunningJob implements Serializable {
|
||||
|
@ -14,18 +13,37 @@ public class RunningJob implements Serializable {
|
|||
private String jobId;
|
||||
private String jobName;
|
||||
private JobStatusType status;
|
||||
private String message;
|
||||
private String serviceName; // i.e., Dataminer, SmartExecutor..
|
||||
|
||||
public RunningJob() {
|
||||
super();
|
||||
}
|
||||
|
||||
public RunningJob(String jobId, String jobName, JobStatusType status) {
|
||||
/** Buind a RunningJob object.
|
||||
* @param jobId
|
||||
* @param jobName
|
||||
* @param status
|
||||
* @param message
|
||||
* @param serviceName
|
||||
*/
|
||||
public RunningJob(String jobId, String jobName, JobStatusType status,
|
||||
String message, String serviceName) {
|
||||
super();
|
||||
this.jobId = jobId;
|
||||
this.jobName = jobName;
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
this.serviceName = serviceName;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
@ -44,10 +62,22 @@ public class RunningJob implements Serializable {
|
|||
public void setStatus(JobStatusType status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getServiceName() {
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
public void setServiceName(String serviceName) {
|
||||
this.serviceName = serviceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RunningJob [jobId=" + jobId + ", jobName=" + jobName
|
||||
+ ", status=" + status + "]";
|
||||
return "RunningJob [" + (jobId != null ? "jobId=" + jobId + ", " : "")
|
||||
+ (jobName != null ? "jobName=" + jobName + ", " : "")
|
||||
+ (status != null ? "status=" + status + ", " : "")
|
||||
+ (message != null ? "message=" + message + ", " : "")
|
||||
+ (serviceName != null ? "serviceName=" + serviceName : "")
|
||||
+ "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue