aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-core/src/main/java/com')
-rw-r--r--juick-core/src/main/java/com/juick/Tag.java1
-rw-r--r--juick-core/src/main/java/com/juick/User.java60
-rw-r--r--juick-core/src/main/java/com/juick/json/UserSerializer.java4
3 files changed, 32 insertions, 33 deletions
diff --git a/juick-core/src/main/java/com/juick/Tag.java b/juick-core/src/main/java/com/juick/Tag.java
index 4ba3a812..3f5add6e 100644
--- a/juick-core/src/main/java/com/juick/Tag.java
+++ b/juick-core/src/main/java/com/juick/Tag.java
@@ -32,7 +32,6 @@ import java.util.Objects;
@XmlRootElement(name = "tag", namespace = "http://juick.com/message")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class Tag {
-
private String name;
public int TID = 0;
diff --git a/juick-core/src/main/java/com/juick/User.java b/juick-core/src/main/java/com/juick/User.java
index c64c55d5..f71ec781 100644
--- a/juick-core/src/main/java/com/juick/User.java
+++ b/juick-core/src/main/java/com/juick/User.java
@@ -28,27 +28,27 @@ import javax.xml.bind.annotation.*;
@XmlRootElement(name = "user", namespace = "http://juick.com/user")
@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
public class User {
- private int uid = 0;
- private String name = null;
- private Object Avatar = null;
- private String FullName = null;
- private String JID = null;
- private int MessagesCount = 0;
- private String AuthHash = null;
- private boolean Banned = false;
+ private int uid;
+ private String name;
+ private Object avatar;
+ private String fullName;
+ private String jid;
+ private int messagesCount;
+ private String authHash;
+ private boolean banned;
public User() {
}
public User(User u) {
- setUid(u.getUid());
- setName(u.getName());
- Avatar = u.Avatar;
- setFullName(u.getFullName());
- setJID(u.getJID());
- MessagesCount = u.MessagesCount;
- setAuthHash(u.getAuthHash());
- Banned = u.Banned;
+ this.uid = u.getUid();
+ this.name = u.getName();
+ this.avatar = u.getAvatar();
+ this.fullName = u.fullName;
+ this.jid = u.getJid();
+ this.messagesCount = u.getUnreadCount();
+ this.authHash = u.getAuthHash();
+ this.banned = u.isBanned();
}
@Override
@@ -80,56 +80,56 @@ public class User {
@JsonProperty("fullname")
@XmlTransient
public String getFullName() {
- return FullName;
+ return fullName;
}
public void setFullName(String fullName) {
- FullName = fullName;
+ this.fullName = fullName;
}
@JsonProperty("jid")
- public String getJID() {
- return JID;
+ public String getJid() {
+ return jid;
}
- public void setJID(String JID) {
- this.JID = JID;
+ public void setJid(String jid) {
+ this.jid = jid;
}
@XmlTransient
@JsonIgnore
public String getAuthHash() {
- return AuthHash;
+ return authHash;
}
public void setAuthHash(String authHash) {
- AuthHash = authHash;
+ this.authHash = authHash;
}
@JsonProperty("unreadCount")
@XmlTransient
public Integer getUnreadCount() {
- return MessagesCount;
+ return messagesCount;
}
public void setUnreadCount(Integer count) {
- MessagesCount = count;
+ this.messagesCount = count;
}
@XmlTransient
public boolean isBanned() {
- return Banned;
+ return banned;
}
public void setBanned(boolean banned) {
- Banned = banned;
+ this.banned = banned;
}
public Object getAvatar() {
- return Avatar;
+ return avatar;
}
public void setAvatar(Object avatar) {
- Avatar = avatar;
+ this.avatar = avatar;
}
}
diff --git a/juick-core/src/main/java/com/juick/json/UserSerializer.java b/juick-core/src/main/java/com/juick/json/UserSerializer.java
index 08d21d39..120645a6 100644
--- a/juick-core/src/main/java/com/juick/json/UserSerializer.java
+++ b/juick-core/src/main/java/com/juick/json/UserSerializer.java
@@ -52,8 +52,8 @@ public class UserSerializer extends JSONSerializer<User> {
if (user.getFullName() != null) {
json.put("fullname", user.getFullName());
}
- if (user.getJID() != null) {
- json.put("jid", user.getJID());
+ if (user.getJid() != null) {
+ json.put("jid", user.getJid());
}
if (user.getUnreadCount() > 0) {
json.put("unreadCount", user.getUnreadCount());