projects
/
rhynodge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use JSON for configuration files, remove all references to XML.
[rhynodge.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
reactor
/
loader
/
Chain.java
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
(file)
--- 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;
package net.pterodactylus.reactor.loader;
+import java.util.ArrayList;
import java.util.List;
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 <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
/**
* Model for chain definitions.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
-@Root
public class Chain {
/**
public class Chain {
/**
@@
-39,11
+37,11
@@
public class Chain {
public static class Parameter {
/** The name of the parameter. */
public static class Parameter {
/** The name of the parameter. */
- @
Element
+ @
JsonProperty
private String name;
/** The value of the parameter. */
private String name;
/** The value of the parameter. */
- @
Element
+ @
JsonProperty
private String value;
/**
private String value;
/**
@@
-103,12
+101,12
@@
public class Chain {
public static class Part {
/** The class name of the part. */
public static class Part {
/** The class name of the part. */
- @
Element(nam
e = "class")
+ @
JsonProperty(valu
e = "class")
private String name;
/** The parameters of the part. */
private String name;
/** The parameters of the part. */
- @
ElementList(required = false, empty = false)
- private List<Parameter> parameters;
+ @
JsonProperty
+ private List<Parameter> parameters
= new ArrayList<Parameter>()
;
/**
* Returns the name of the part’s class.
/**
* Returns the name of the part’s class.
@@
-167,27
+165,27
@@
public class Chain {
}
/** Whether this chain is enabled. */
}
/** Whether this chain is enabled. */
- @
Element
+ @
JsonProperty
private boolean enabled;
/** The query of the chain. */
private boolean enabled;
/** The query of the chain. */
- @
Element
+ @
JsonProperty
private Part query;
/** The filters of the chain. */
private Part query;
/** The filters of the chain. */
- @
ElementList(required = false, empty = false)
- private List<Part> filters;
+ @
JsonProperty
+ private List<Part> filters
= new ArrayList<Part>()
;
/** The trigger of the chain. */
/** The trigger of the chain. */
- @
Element
+ @
JsonProperty
private Part trigger;
/** The action of the chain. */
private Part trigger;
/** The action of the chain. */
- @
Element
+ @
JsonProperty
private Part action;
/** Interval between updates (in seconds). */
private Part action;
/** Interval between updates (in seconds). */
- @
Element
+ @
JsonProperty
private int updateInterval;
/**
private int updateInterval;
/**