Added jackson support for json marshalling/unmarshalling refs #5109
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-api@152809 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
858f31a6ef
commit
0dcebedb03
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE xml>
|
||||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.vre-management.smart-executor.1.6.0" date="${buildDate}">
|
||||
<Change></Change>
|
||||
<Change>Added jackson support for json marshalling/unmarshalling</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.vre-management.smart-executor-api.1.5.0" date="2017-03-16">
|
||||
<Change>Provided access to UUID and iteration number fro a plugin (refs #6733)</Change>
|
||||
|
|
|
@ -13,6 +13,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
import org.gcube.vremanagement.executor.utils.ObjectCompare;
|
||||
import org.quartz.CronExpression;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
|
||||
/**
|
||||
|
@ -30,6 +31,7 @@ public class Scheduling implements Comparable<Scheduling> {
|
|||
* This field is not valid when using delay
|
||||
*/
|
||||
@XmlElement
|
||||
@JsonProperty
|
||||
protected String cronExpression;
|
||||
|
||||
/**
|
||||
|
@ -37,6 +39,7 @@ public class Scheduling implements Comparable<Scheduling> {
|
|||
* This field is not valid when using cronExpression
|
||||
*/
|
||||
@XmlElement
|
||||
@JsonProperty
|
||||
protected Integer delay;
|
||||
|
||||
/**
|
||||
|
@ -44,12 +47,14 @@ public class Scheduling implements Comparable<Scheduling> {
|
|||
* 0 means indefinitely.
|
||||
*/
|
||||
@XmlElement
|
||||
@JsonProperty
|
||||
protected int schedulingTimes;
|
||||
|
||||
/**
|
||||
* The first instant when the scheduling can start
|
||||
*/
|
||||
@XmlElement
|
||||
@JsonProperty
|
||||
protected Long firstStartTime; // O or null means immediately
|
||||
|
||||
/**
|
||||
|
@ -57,6 +62,7 @@ public class Scheduling implements Comparable<Scheduling> {
|
|||
* has remaining repeats.
|
||||
*/
|
||||
@XmlElement
|
||||
@JsonProperty
|
||||
protected Long endTime; // O or null means never
|
||||
|
||||
/**
|
||||
|
@ -67,6 +73,7 @@ public class Scheduling implements Comparable<Scheduling> {
|
|||
* happened.
|
||||
*/
|
||||
@XmlElement
|
||||
@JsonProperty
|
||||
protected boolean previuosExecutionsMustBeCompleted;
|
||||
|
||||
/**
|
||||
|
@ -74,6 +81,7 @@ public class Scheduling implements Comparable<Scheduling> {
|
|||
* SmartExecutor instance if the initial one die.
|
||||
*/
|
||||
@XmlElement
|
||||
@JsonProperty
|
||||
protected boolean global;
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ package org.gcube.vremanagement.executor.plugin;
|
|||
|
||||
import org.gcube.vremanagement.executor.api.types.Scheduling;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
|
||||
|
@ -12,7 +13,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
|||
@JsonTypeName(value="Ref")
|
||||
public class Ref {
|
||||
|
||||
@JsonProperty
|
||||
protected String id;
|
||||
|
||||
@JsonProperty
|
||||
protected String address;
|
||||
|
||||
protected Ref() {}
|
||||
|
|
|
@ -5,6 +5,7 @@ package org.gcube.vremanagement.executor.plugin;
|
|||
|
||||
import org.gcube.vremanagement.executor.api.types.Scheduling;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
|
@ -48,6 +49,7 @@ public class RunOn {
|
|||
/**
|
||||
* @return the eServiceID
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Ref getEService() {
|
||||
return eService;
|
||||
}
|
||||
|
@ -55,6 +57,7 @@ public class RunOn {
|
|||
/**
|
||||
* @param eServiceID the eServiceID to set
|
||||
*/
|
||||
@JsonIgnore
|
||||
public void setEService(Ref eService) {
|
||||
this.eService = eService;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue