X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Freactor%2Floader%2FChain.java;h=c367da0ff935581b7600061b30f95fb600192e37;hb=90db6d61a40601f0f33435559d569105d9d5ff68;hp=91892a55e1999e98e73cf47cf92720665fc3fbfb;hpb=9bd0be10a640c02e27c509f5b2f6cbb01b0c87f6;p=rhynodge.git
diff --git a/src/main/java/net/pterodactylus/reactor/loader/Chain.java b/src/main/java/net/pterodactylus/reactor/loader/Chain.java
index 91892a5..c367da0 100644
--- a/src/main/java/net/pterodactylus/reactor/loader/Chain.java
+++ b/src/main/java/net/pterodactylus/reactor/loader/Chain.java
@@ -17,18 +17,16 @@
package net.pterodactylus.reactor.loader;
+import java.util.ArrayList;
import java.util.List;
-import org.simpleframework.xml.Element;
-import org.simpleframework.xml.ElementList;
-import org.simpleframework.xml.Root;
+import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Model for chain definitions.
*
* @author David âBombeâ Roden
*/
-@Root
public class Chain {
/**
@@ -39,11 +37,11 @@ public class Chain {
public static class Parameter {
/** The name of the parameter. */
- @Element
+ @JsonProperty
private String name;
/** The value of the parameter. */
- @Element
+ @JsonProperty
private String value;
/**
@@ -103,12 +101,12 @@ public class Chain {
public static class Part {
/** The class name of the part. */
- @Element(name = "class")
+ @JsonProperty(value = "class")
private String name;
/** The parameters of the part. */
- @ElementList(required = false, empty = false)
- private List parameters;
+ @JsonProperty
+ private List parameters = new ArrayList();
/**
* Returns the name of the partâs class.
@@ -167,27 +165,27 @@ public class Chain {
}
/** Whether this chain is enabled. */
- @Element
+ @JsonProperty
private boolean enabled;
/** The query of the chain. */
- @Element
+ @JsonProperty
private Part query;
/** The filters of the chain. */
- @ElementList(required = false, empty = false)
- private List filters;
+ @JsonProperty
+ private List filters = new ArrayList();
/** The trigger of the chain. */
- @Element
+ @JsonProperty
private Part trigger;
/** The action of the chain. */
- @Element
+ @JsonProperty
private Part action;
/** Interval between updates (in seconds). */
- @Element
+ @JsonProperty
private int updateInterval;
/**