From ab52fb5b3dc9a0aa2f41e3fb9173247db1023aec Mon Sep 17 00:00:00 2001 From: Maxi Date: Sun, 27 Oct 2019 22:10:47 +0100 Subject: [PATCH] * Replacing the message_schema.xsd and the user_schema.xsd with sync_schema.xsd. * Added UserStatus * Changed bindings.xml to support the UserStatus Enum properly. --- src/main/java/envoy/schema/UserStatus.java | 22 ++++ .../{message_schema.xsd => sync_schema.xsd} | 116 ++++++++++-------- src/main/resources/user_schema.xsd | 23 ---- src/main/xjb/bindings.xml | 7 +- 4 files changed, 96 insertions(+), 72 deletions(-) create mode 100644 src/main/java/envoy/schema/UserStatus.java rename src/main/resources/{message_schema.xsd => sync_schema.xsd} (51%) delete mode 100644 src/main/resources/user_schema.xsd diff --git a/src/main/java/envoy/schema/UserStatus.java b/src/main/java/envoy/schema/UserStatus.java new file mode 100644 index 0000000..c4a5607 --- /dev/null +++ b/src/main/java/envoy/schema/UserStatus.java @@ -0,0 +1,22 @@ +package envoy.schema; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + +/** + * Project: envoy-common
+ * File: UserStatus.java
+ * Created: 27 Nov 2019
+ * + * @author Maximilian Käfer + */ +@XmlType(name = "") +@XmlEnum +public enum UserStatus { + + ONLINE, DONOTDISTURB, AFK, OFFLINE; + + public String value() { return name(); } + + public static UserStatus fromValue(String v) { return valueOf(v); } +} diff --git a/src/main/resources/message_schema.xsd b/src/main/resources/sync_schema.xsd similarity index 51% rename from src/main/resources/message_schema.xsd rename to src/main/resources/sync_schema.xsd index 0b27158..58d1ce7 100644 --- a/src/main/resources/message_schema.xsd +++ b/src/main/resources/sync_schema.xsd @@ -1,48 +1,68 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/user_schema.xsd b/src/main/resources/user_schema.xsd deleted file mode 100644 index 93c18f9..0000000 --- a/src/main/resources/user_schema.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/xjb/bindings.xml b/src/main/xjb/bindings.xml index 66ef12c..a690920 100644 --- a/src/main/xjb/bindings.xml +++ b/src/main/xjb/bindings.xml @@ -6,10 +6,15 @@ fixedAttributeAsConstantProperty="true"> - + + + + + \ No newline at end of file