aboutsummaryrefslogtreecommitdiff
path: root/juick-server-core
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-10-24 17:18:29 +0300
committerGravatar Vitaly Takmazov2017-10-24 22:34:41 +0300
commitde2cc2db73a5de42d9bfaeb92604f28abe2a328a (patch)
tree352a3d76fcbc987f068527ff043174308a666654 /juick-server-core
parent881a546bf7a56550eec1e38ce839f47a1cb1a750 (diff)
crosspost: refactoring
* spring-social * get tokens via service api
Diffstat (limited to 'juick-server-core')
-rw-r--r--juick-server-core/build.gradle1
-rw-r--r--juick-server-core/src/main/java/com/juick/service/CrosspostService.java5
2 files changed, 4 insertions, 2 deletions
diff --git a/juick-server-core/build.gradle b/juick-server-core/build.gradle
index fa7883ba..83a02452 100644
--- a/juick-server-core/build.gradle
+++ b/juick-server-core/build.gradle
@@ -17,7 +17,6 @@ dependencies {
compile "rocks.xmpp:xmpp-extensions-client:0.7.4"
compile "javax.inject:javax.inject:1"
- compile 'com.google.code.findbugs:jsr305:3.0.2'
testCompile "junit:junit:${rootProject.junitVersion}"
testCompile "org.hamcrest:hamcrest-all:${rootProject.hamcrestVersion}"
diff --git a/juick-server-core/src/main/java/com/juick/service/CrosspostService.java b/juick-server-core/src/main/java/com/juick/service/CrosspostService.java
index f491c797..2ece8305 100644
--- a/juick-server-core/src/main/java/com/juick/service/CrosspostService.java
+++ b/juick-server-core/src/main/java/com/juick/service/CrosspostService.java
@@ -17,9 +17,11 @@
package com.juick.service;
+import com.juick.ExternalToken;
import com.juick.server.helpers.ApplicationStatus;
import org.apache.commons.lang3.tuple.Pair;
+import javax.annotation.Nonnull;
import java.util.Optional;
/**
@@ -27,7 +29,7 @@ import java.util.Optional;
*/
public interface CrosspostService {
- Optional<Pair<String, String>> getTwitterTokens(int uid);
+ Optional<ExternalToken> getTwitterToken(int uid);
boolean deleteTwitterToken(Integer uid);
@@ -39,6 +41,7 @@ public interface CrosspostService {
void disableFBCrosspost(Integer uid);
+ @Nonnull
String getTwitterName(int uid);
String getTelegramName(int uid);