From b2f3afebc7de684d1d49042f5f79a9cbf9c1f2f2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 14 Mar 2018 10:04:40 +0300 Subject: refactor email settings --- .../java/com/juick/server/helpers/EmailOpts.java | 41 ---------------------- .../main/java/com/juick/service/EmailService.java | 1 + .../main/java/com/juick/service/UserService.java | 3 -- 3 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 juick-server-core/src/main/java/com/juick/server/helpers/EmailOpts.java (limited to 'juick-server-core/src/main/java/com') diff --git a/juick-server-core/src/main/java/com/juick/server/helpers/EmailOpts.java b/juick-server-core/src/main/java/com/juick/server/helpers/EmailOpts.java deleted file mode 100644 index b8af8f88..00000000 --- a/juick-server-core/src/main/java/com/juick/server/helpers/EmailOpts.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2008-2017, Juick - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package com.juick.server.helpers; - -import org.apache.commons.lang3.StringUtils; - -/** - * Created by vitalyster on 09.02.2016. - */ -public class EmailOpts { - private String email; - private String subscriptionHour; - - public EmailOpts(String email, int subscriptionHour) { - this.email = email; - this.subscriptionHour = StringUtils.leftPad(String.format("%d", subscriptionHour), 2, "0"); - } - - public String getSubscriptionHour() { - return subscriptionHour; - } - - public String getEmail() { - return email; - } -} \ No newline at end of file diff --git a/juick-server-core/src/main/java/com/juick/service/EmailService.java b/juick-server-core/src/main/java/com/juick/service/EmailService.java index ac63f4da..2440bcb4 100644 --- a/juick-server-core/src/main/java/com/juick/service/EmailService.java +++ b/juick-server-core/src/main/java/com/juick/service/EmailService.java @@ -27,6 +27,7 @@ public interface EmailService { boolean addVerificationCode(Integer userId, String account, String code); boolean addEmail(Integer userId, String email); boolean deleteEmail(Integer userId, String account); + String getNotificationsEmail(Integer userId); boolean setNotificationsEmail(Integer userId, String account); List getEmails(Integer userId, boolean active); } diff --git a/juick-server-core/src/main/java/com/juick/service/UserService.java b/juick-server-core/src/main/java/com/juick/service/UserService.java index 6ca6fb98..115c7dfc 100644 --- a/juick-server-core/src/main/java/com/juick/service/UserService.java +++ b/juick-server-core/src/main/java/com/juick/service/UserService.java @@ -19,7 +19,6 @@ package com.juick.service; import com.juick.User; import com.juick.server.helpers.Auth; -import com.juick.server.helpers.EmailOpts; import com.juick.server.helpers.UserInfo; import java.util.Collection; @@ -123,8 +122,6 @@ public interface UserService { List getEmails(User user); - EmailOpts getEmailOpts(User user); - String getEmailHash(User user); int deleteLoginForUser(String name); -- cgit v1.2.3