diff options
Diffstat (limited to 'juick-core')
-rw-r--r-- | juick-core/src/main/java/com/juick/DeviceRegistration.java | 30 | ||||
-rw-r--r-- | juick-core/src/main/java/com/juick/TokensList.java | 35 | ||||
-rw-r--r-- | juick-core/src/main/java/com/juick/User.java | 16 |
3 files changed, 46 insertions, 35 deletions
diff --git a/juick-core/src/main/java/com/juick/DeviceRegistration.java b/juick-core/src/main/java/com/juick/DeviceRegistration.java new file mode 100644 index 00000000..9b6f1d4b --- /dev/null +++ b/juick-core/src/main/java/com/juick/DeviceRegistration.java @@ -0,0 +1,30 @@ +package com.juick; + +/** + * Created by vitalyster on 22.11.2016. + */ +public class DeviceRegistration { + private String type; + private String token; + + public DeviceRegistration(String type, String token) { + this.type = type; + this.token = token; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } +} diff --git a/juick-core/src/main/java/com/juick/TokensList.java b/juick-core/src/main/java/com/juick/TokensList.java deleted file mode 100644 index 0da95951..00000000 --- a/juick-core/src/main/java/com/juick/TokensList.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.juick; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.ArrayList; -import java.util.List; - -/** - * Created by vitalyster on 22.11.2016. - */ -public class TokensList { - private String type; - private List<String> tokens; - - public TokensList() { - tokens = new ArrayList<>(); - } - - @JsonProperty("type") - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public List<String> getTokens() { - return tokens; - } - - public void setTokens(List<String> tokens) { - this.tokens = tokens; - } -} diff --git a/juick-core/src/main/java/com/juick/User.java b/juick-core/src/main/java/com/juick/User.java index 9a3d619c..d0b37c1b 100644 --- a/juick-core/src/main/java/com/juick/User.java +++ b/juick-core/src/main/java/com/juick/User.java @@ -23,6 +23,9 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; /** * @author Ugnich Anton @@ -40,6 +43,11 @@ public class User { private boolean banned; private String credentials; private String lang; + private List<DeviceRegistration> devices; + + public User() { + devices = new ArrayList<>(); + } @Override public boolean equals(Object obj) { @@ -175,4 +183,12 @@ public class User { public boolean isAnonymous() { return false; } + + public List<DeviceRegistration> getDevices() { + return devices; + } + + public void setDevices(List<DeviceRegistration> devices) { + this.devices = devices; + } } |