diff options
author | Vitaly Takmazov | 2020-04-04 01:15:01 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-04-04 01:15:01 +0300 |
commit | a608baeed738894433aacfa041e2617f60ce959f (patch) | |
tree | 1e0de7056417ff0833ae3d4600de9fec6eb81631 /src/main/java/com/juick/service | |
parent | 7a2f89266c8f6337e4e81a2fd8488e0f80f4f9bd (diff) |
Initialize all components from configuration
Diffstat (limited to 'src/main/java/com/juick/service')
4 files changed, 2 insertions, 32 deletions
diff --git a/src/main/java/com/juick/service/ImagesServiceImpl.java b/src/main/java/com/juick/service/ImagesServiceImpl.java index abaec940..5884b0d0 100644 --- a/src/main/java/com/juick/service/ImagesServiceImpl.java +++ b/src/main/java/com/juick/service/ImagesServiceImpl.java @@ -20,7 +20,7 @@ package com.juick.service; import com.juick.model.Attachment; import com.juick.model.Message; import com.juick.model.Photo; -import com.juick.server.util.ImageUtils; +import com.juick.util.ImageUtils; import org.springframework.util.StringUtils; import java.io.File; diff --git a/src/main/java/com/juick/service/UserService.java b/src/main/java/com/juick/service/UserService.java index 4bd5486d..fbbab0ad 100644 --- a/src/main/java/com/juick/service/UserService.java +++ b/src/main/java/com/juick/service/UserService.java @@ -55,12 +55,8 @@ public interface UserService { List<String> getJIDsbyUID(int uid); - int getUIDbyJID(String jid); - int getUIDbyName(String uname); - int getUIDbyHash(String hash); - @Nonnull User getUserByHash(String hash); diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index 23c55bbe..84ff1ff5 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -250,19 +250,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @Transactional(readOnly = true) @Override - public int getUIDbyJID(final String jid) { - if (StringUtils.isNotBlank(jid)) { - List<Integer> list = getJdbcTemplate().queryForList( - "SELECT user_id FROM jids WHERE jid = ?", Integer.class, jid); - - if (!list.isEmpty()) - return list.get(0); - } - return 0; - } - - @Transactional(readOnly = true) - @Override public int getUIDbyName(final String uname) { if (StringUtils.isNotBlank(uname)) { List<Integer> list = getJdbcTemplate().queryForList( @@ -276,19 +263,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @Transactional(readOnly = true) @Override - public int getUIDbyHash(final String hash) { - if (StringUtils.isNotBlank(hash)) { - List<Integer> list = getJdbcTemplate().queryForList( - "SELECT user_id FROM logins WHERE hash = ?", Integer.class, hash); - - if (!list.isEmpty()) - return list.get(0); - } - return 0; - } - - @Transactional(readOnly = true) - @Override public User getUserByHash(final String hash) { if (StringUtils.isNotBlank(hash)) { List<User> list = getJdbcTemplate().query( diff --git a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java index 1b3cb936..9878df82 100644 --- a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java +++ b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java @@ -18,7 +18,7 @@ package com.juick.service.security; import com.juick.model.User; -import com.juick.server.SignatureManager; +import com.juick.SignatureManager; import com.juick.service.UserService; import com.juick.service.security.entities.JuickUser; import org.apache.commons.lang3.StringUtils; |