aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/service')
-rw-r--r--juick-server/src/main/java/com/juick/service/SubscriptionService.java2
-rw-r--r--juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java7
2 files changed, 9 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/service/SubscriptionService.java b/juick-server/src/main/java/com/juick/service/SubscriptionService.java
index 00aee15d..074c73f5 100644
--- a/juick-server/src/main/java/com/juick/service/SubscriptionService.java
+++ b/juick-server/src/main/java/com/juick/service/SubscriptionService.java
@@ -30,6 +30,8 @@ public interface SubscriptionService {
boolean unSubscribeTag(User user, Tag toTag);
+ List<String> getSubscribedTags(User user);
+
NotifyOpts getNotifyOptions(User user);
boolean setNotifyOptions(User user, NotifyOpts options);
diff --git a/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java b/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java
index 4082e1ef..ae4af9df 100644
--- a/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java
@@ -173,6 +173,13 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip
@Transactional(readOnly = true)
@Override
+ public List<String> getSubscribedTags(User user) {
+ return getJdbcTemplate().queryForList("SELECT tags.name FROM subscr_tags INNER JOIN tags USING(tag_id) " +
+ "WHERE subscr_tags.suser_id=? ORDER BY tags.name", String.class, user.getUid());
+ }
+
+ @Transactional(readOnly = true)
+ @Override
public NotifyOpts getNotifyOptions(final User user) {
List<NotifyOpts> list = getJdbcTemplate().query(
"SELECT jnotify,subscr_notify,recommendations FROM useroptions WHERE user_id=?",