aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java/com/juick/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-core/src/main/java/com/juick/Message.java')
-rw-r--r--juick-core/src/main/java/com/juick/Message.java62
1 files changed, 2 insertions, 60 deletions
diff --git a/juick-core/src/main/java/com/juick/Message.java b/juick-core/src/main/java/com/juick/Message.java
index 0d91cc63..699920f6 100644
--- a/juick-core/src/main/java/com/juick/Message.java
+++ b/juick-core/src/main/java/com/juick/Message.java
@@ -21,13 +21,13 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.juick.xml.adapters.SimpleDateAdapter;
import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.time.Instant;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
/**
* @author Ugnich Anton
@@ -67,30 +67,13 @@ public class Message implements Comparable {
private Photo photo;
@XmlTransient
private Attachment attachment;
- public String Video = null;
- public Place Place = null;
private int likes;
- public final List<Message> childs;
private User to;
private Recommendation Recommendation;
private String replyQuote;
public Message() {
tags = new ArrayList<>();
- childs = new ArrayList<>();
- }
-
- public void parseTags(String strTags) {
- if (StringUtils.isNotEmpty(strTags)) {
- Set<Tag> tagSet = new TreeSet<>(tags);
- for (String str : strTags.split(" ")) {
- Tag tag = new Tag(str);
- if (!tagSet.contains(tag)) {
- tags.add(tag);
- tagSet.add(tag);
- }
- }
- }
}
@Override
@@ -140,47 +123,6 @@ public class Message implements Comparable {
return cmp;
}
- @JsonIgnore
- public int getChildsCount() {
- int cnt = childs.size();
- for (Message child : childs) {
- cnt += child.getChildsCount();
- }
- return cnt;
- }
-
- public void cleanupChilds() {
- if (!childs.isEmpty()) {
- for (Message child : childs) {
- child.cleanupChilds();
- }
- childs.clear();
- }
- }
-
- @JsonIgnore
- public String getTagsString() {
- StringBuilder builder = new StringBuilder();
- if (!tags.isEmpty()) {
- for (Tag Tag : tags)
- builder.append(" *").append(Tag.getName());
-
- if (FriendsOnly)
- builder.append(" *friends");
-
- if (privacy == -2)
- builder.append(" *private");
- else if (privacy == -1)
- builder.append(" *friends");
- else if (privacy == 2)
- builder.append(" *public");
-
- if (ReadOnly)
- builder.append(" *readonly");
- }
- return builder.toString();
- }
-
@JsonProperty("mid")
@XmlAttribute(name = "mid")
public int getMid() {