diff options
author | Vitaly Takmazov | 2017-06-29 17:09:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-29 17:13:29 +0300 |
commit | b75b5a3d1a3bf001923d49923dcebee95ba2327e (patch) | |
tree | 5080eacdf348c9598885ad5d3b5c567632db3717 /juick-core/src | |
parent | 02723131139806c761539a42a5fa80b68ecadee8 (diff) |
notifications and configurations refactoring
Diffstat (limited to 'juick-core/src')
-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; + } } |