From b75b5a3d1a3bf001923d49923dcebee95ba2327e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 29 Jun 2017 17:09:49 +0300 Subject: notifications and configurations refactoring --- .../main/java/com/juick/DeviceRegistration.java | 30 +++++++++++++++++++ juick-core/src/main/java/com/juick/TokensList.java | 35 ---------------------- juick-core/src/main/java/com/juick/User.java | 16 ++++++++++ 3 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 juick-core/src/main/java/com/juick/DeviceRegistration.java delete mode 100644 juick-core/src/main/java/com/juick/TokensList.java (limited to 'juick-core/src/main') 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 tokens; - - public TokensList() { - tokens = new ArrayList<>(); - } - - @JsonProperty("type") - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public List getTokens() { - return tokens; - } - - public void setTokens(List 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 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 getDevices() { + return devices; + } + + public void setDevices(List devices) { + this.devices = devices; + } } -- cgit v1.2.3