aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service/MessagesService.java
blob: ad7774b7cfb2be173cab8469adef88cd68ae0977 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package com.juick.service;

import com.juick.Message;
import com.juick.User;
import com.juick.server.helpers.ResponseReply;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.Collection;
import java.util.List;

/**
 * Created by aalexeev on 11/13/16.
 */
public interface MessagesService {
    int createMessage(int uid, String txt, String attachment, Collection<com.juick.Tag> tags);

    int createReply(int mid, int rid, int uid, String txt, String attachment);

    int getReplyIDIncrement(int mid);

    boolean recommendMessage(int mid, int vuid);

    boolean canViewThread(int mid, int uid);

    boolean isReadOnly(int mid);

    boolean isSubscribed(int uid, int mid);

    int getMessagePrivacy(int mid);

    com.juick.Message getMessage(int mid);

    com.juick.Message getReply(int mid, int rid);

    User getMessageAuthor(int mid);

    List<String> getMessageRecommendations(int mid);

    List<Integer> getAll(int visitorUid, int before);

    List<Integer> getTag(int tid, int visitorUid, int before, int cnt);

    List<Integer> getTags(String tids, int visitorUid, int before, int cnt);

    List<Integer> getPlace(int placeId, int visitorUid, int before);

    List<Integer> getMyFeed(int uid, int before);

    List<Integer> getPrivate(int uid, int before);

    List<Integer> getDiscussions(int uid, int before);

    List<Integer> getRecommended(int uid, int before);

    List<Integer> getPopular(int visitorUid, int before);

    List<Integer> getPhotos(int visitorUid, int before);

    List<Integer> getSearch(String search, int before);

    List<Integer> getUserBlog(int uid, int privacy, int before);

    List<Integer> getUserTag(int uid, int tid, int privacy, int before);

    List<Integer> getUserBlogWithRecommendations(int uid, int privacy, int before);

    List<Integer> getUserRecommendations(int uid, int before);

    List<Integer> getUserPhotos(int uid, int privacy, int before);

    List<Integer> getUserSearch(int UID, String search, int privacy, int before);

    List<com.juick.Message> getMessages(Collection<Integer> mids);

    List<com.juick.Message> getReplies(int mid);

    boolean setMessagePopular(int mid, int popular);

    boolean setMessagePrivacy(int mid);

    boolean deleteMessage(int uid, int mid);

    List<Integer> getLastMessages(int hours);

    List<ResponseReply> getLastReplies(int hours);

    boolean isReadonly();
}