aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-04-03 23:53:23 +0300
committerGravatar Vitaly Takmazov2020-04-03 23:53:23 +0300
commit7a2f89266c8f6337e4e81a2fd8488e0f80f4f9bd (patch)
tree3b83cf2edb18b224e6e0b7924624310d68acc93a
parent1b93e5b16ee5bc7253f3b06639fb9e9abb46acd0 (diff)
Reorganize layout and code cleanup
-rw-r--r--src/main/java/com/juick/model/AuthResponse.java2
-rw-r--r--src/main/java/com/juick/server/ActivityPubManager.java16
-rw-r--r--src/main/java/com/juick/server/CommandsManager.java2
-rw-r--r--src/main/java/com/juick/server/EmailManager.java2
-rw-r--r--src/main/java/com/juick/server/KeystoreManager.java3
-rw-r--r--src/main/java/com/juick/server/ServerManager.java4
-rw-r--r--src/main/java/com/juick/server/SignatureManager.java10
-rw-r--r--src/main/java/com/juick/server/TelegramBotManager.java2
-rw-r--r--src/main/java/com/juick/server/TopManager.java2
-rw-r--r--src/main/java/com/juick/server/TwitterManager.java2
-rw-r--r--src/main/java/com/juick/server/XMPPManager.java2
-rw-r--r--src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java2
-rw-r--r--src/main/java/com/juick/server/configuration/ApiAppConfiguration.java4
-rw-r--r--src/main/java/com/juick/server/configuration/BaseWebConfiguration.java3
-rw-r--r--src/main/java/com/juick/server/configuration/SecurityConfig.java6
-rw-r--r--src/main/java/com/juick/server/configuration/WwwAppConfiguration.java6
-rw-r--r--src/main/java/com/juick/server/configuration/XMPPConfig.java2
-rw-r--r--src/main/java/com/juick/service/HelpService.java (renamed from src/main/java/com/juick/www/HelpService.java)4
-rw-r--r--src/main/java/com/juick/service/activities/FollowEvent.java2
-rw-r--r--src/main/java/com/juick/service/component/SystemEvent.java2
-rw-r--r--src/main/java/com/juick/www/ad/SapeService.java4
-rw-r--r--src/main/java/com/juick/www/api/ApiSocialLogin.java (renamed from src/main/java/com/juick/server/api/ApiSocialLogin.java)2
-rw-r--r--src/main/java/com/juick/www/api/Index.java (renamed from src/main/java/com/juick/server/api/Index.java)2
-rw-r--r--src/main/java/com/juick/www/api/Messages.java (renamed from src/main/java/com/juick/server/api/Messages.java)2
-rw-r--r--src/main/java/com/juick/www/api/Notifications.java (renamed from src/main/java/com/juick/server/api/Notifications.java)2
-rw-r--r--src/main/java/com/juick/www/api/PM.java (renamed from src/main/java/com/juick/server/api/PM.java)2
-rw-r--r--src/main/java/com/juick/www/api/Post.java (renamed from src/main/java/com/juick/server/api/Post.java)2
-rw-r--r--src/main/java/com/juick/www/api/Service.java (renamed from src/main/java/com/juick/server/api/Service.java)2
-rw-r--r--src/main/java/com/juick/www/api/SystemActivity.java (renamed from src/main/java/com/juick/server/api/SystemActivity.java)2
-rw-r--r--src/main/java/com/juick/www/api/Tags.java (renamed from src/main/java/com/juick/server/api/Tags.java)2
-rw-r--r--src/main/java/com/juick/www/api/Users.java (renamed from src/main/java/com/juick/server/api/Users.java)2
-rw-r--r--src/main/java/com/juick/www/api/activity/Profile.java (renamed from src/main/java/com/juick/server/api/activity/Profile.java)30
-rw-r--r--src/main/java/com/juick/www/api/activity/helpers/ActivityIdDeserializer.java (renamed from src/main/java/com/juick/server/api/activity/helpers/ActivityIdDeserializer.java)2
-rw-r--r--src/main/java/com/juick/www/api/activity/helpers/LinkValueDeserializer.java (renamed from src/main/java/com/juick/server/api/activity/helpers/LinkValueDeserializer.java)2
-rw-r--r--src/main/java/com/juick/www/api/activity/model/Activity.java (renamed from src/main/java/com/juick/server/api/activity/model/Activity.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/Context.java (renamed from src/main/java/com/juick/server/api/activity/model/Context.java)8
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Accept.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Accept.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Announce.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Announce.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Block.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Block.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Create.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Create.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Delete.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Delete.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Follow.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Follow.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Like.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Like.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Undo.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Undo.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Update.java (renamed from src/main/java/com/juick/server/api/activity/model/activities/Update.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Emoji.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Emoji.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Hashtag.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Hashtag.java)2
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Image.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Image.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Key.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Key.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Link.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Link.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Mention.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Mention.java)2
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Note.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Note.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/OrderedCollection.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/OrderedCollection.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/OrderedCollectionPage.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/OrderedCollectionPage.java)4
-rw-r--r--src/main/java/com/juick/www/api/activity/model/objects/Person.java (renamed from src/main/java/com/juick/server/api/activity/model/objects/Person.java)4
-rw-r--r--src/main/java/com/juick/www/api/apple/AppSiteAssociation.java (renamed from src/main/java/com/juick/server/api/apple/AppSiteAssociation.java)2
-rw-r--r--src/main/java/com/juick/www/api/hostmeta/HostMeta.java (renamed from src/main/java/com/juick/server/api/hostmeta/HostMeta.java)2
-rw-r--r--src/main/java/com/juick/www/api/webfinger/Resource.java (renamed from src/main/java/com/juick/server/api/webfinger/Resource.java)8
-rw-r--r--src/main/java/com/juick/www/api/webfinger/model/Account.java (renamed from src/main/java/com/juick/server/api/webfinger/model/Account.java)2
-rw-r--r--src/main/java/com/juick/www/api/webfinger/model/Link.java (renamed from src/main/java/com/juick/server/api/webfinger/model/Link.java)2
-rw-r--r--src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java (renamed from src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java)2
-rw-r--r--src/main/java/com/juick/www/api/xnodeinfo2/Info.java (renamed from src/main/java/com/juick/server/api/xnodeinfo2/Info.java)4
-rw-r--r--src/main/java/com/juick/www/api/xnodeinfo2/model/NodeInfo.java (renamed from src/main/java/com/juick/server/api/xnodeinfo2/model/NodeInfo.java)2
-rw-r--r--src/main/java/com/juick/www/api/xnodeinfo2/model/Server.java (renamed from src/main/java/com/juick/server/api/xnodeinfo2/model/Server.java)2
-rw-r--r--src/main/java/com/juick/www/api/xnodeinfo2/model/ServiceInfo.java (renamed from src/main/java/com/juick/server/api/xnodeinfo2/model/ServiceInfo.java)2
-rw-r--r--src/main/java/com/juick/www/api/xnodeinfo2/model/Usage.java (renamed from src/main/java/com/juick/server/api/xnodeinfo2/model/Usage.java)2
-rw-r--r--src/main/java/com/juick/www/api/xnodeinfo2/model/UserStats.java (renamed from src/main/java/com/juick/server/api/xnodeinfo2/model/UserStats.java)2
-rw-r--r--src/main/java/com/juick/www/controllers/Help.java7
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java (renamed from src/main/java/com/juick/www/controllers/MessagesWWW.java)2
-rw-r--r--src/main/java/com/juick/www/rss/Feeds.java (renamed from src/main/java/com/juick/server/api/rss/Feeds.java)2
-rw-r--r--src/main/java/com/juick/www/rss/MessagesView.java (renamed from src/main/java/com/juick/server/api/rss/MessagesView.java)6
-rw-r--r--src/main/java/com/juick/www/rss/RepliesView.java (renamed from src/main/java/com/juick/server/api/rss/RepliesView.java)2
-rw-r--r--src/main/java/com/juick/www/rss/extension/JuickModule.java (renamed from src/main/java/com/juick/server/api/rss/extension/JuickModule.java)2
-rw-r--r--src/main/java/com/juick/www/rss/extension/JuickModuleGenerator.java (renamed from src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java)4
-rw-r--r--src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java (renamed from src/main/java/com/juick/server/api/rss/extension/JuickModuleImpl.java)2
-rw-r--r--src/main/java/com/juick/www/rss/extension/JuickModuleParser.java (renamed from src/main/java/com/juick/server/api/rss/extension/JuickModuleParser.java)2
-rw-r--r--src/main/resources/rome.properties4
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java20
78 files changed, 141 insertions, 164 deletions
diff --git a/src/main/java/com/juick/model/AuthResponse.java b/src/main/java/com/juick/model/AuthResponse.java
index b229c7ac..7af3e114 100644
--- a/src/main/java/com/juick/model/AuthResponse.java
+++ b/src/main/java/com/juick/model/AuthResponse.java
@@ -17,7 +17,7 @@
package com.juick.model;
-import com.juick.server.api.Users;
+import com.juick.www.api.Users;
/**
* Created by vt on 09/02/16.
diff --git a/src/main/java/com/juick/server/ActivityPubManager.java b/src/main/java/com/juick/server/ActivityPubManager.java
index 739b8b58..50af506b 100644
--- a/src/main/java/com/juick/server/ActivityPubManager.java
+++ b/src/main/java/com/juick/server/ActivityPubManager.java
@@ -22,14 +22,14 @@ import com.juick.model.Reaction;
import com.juick.model.User;
import com.juick.formatters.PlainTextFormatter;
import com.juick.model.Tag;
-import com.juick.server.api.SystemActivity.ActivityType;
-import com.juick.server.api.activity.model.Context;
-import com.juick.server.api.activity.model.activities.*;
-import com.juick.server.api.activity.model.objects.Hashtag;
-import com.juick.server.api.activity.model.objects.Image;
-import com.juick.server.api.activity.model.objects.Mention;
-import com.juick.server.api.activity.model.objects.Note;
-import com.juick.server.api.activity.model.objects.Person;
+import com.juick.www.api.SystemActivity.ActivityType;
+import com.juick.www.api.activity.model.Context;
+import com.juick.www.api.activity.model.activities.*;
+import com.juick.www.api.activity.model.objects.Hashtag;
+import com.juick.www.api.activity.model.objects.Image;
+import com.juick.www.api.activity.model.objects.Mention;
+import com.juick.www.api.activity.model.objects.Note;
+import com.juick.www.api.activity.model.objects.Person;
import com.juick.server.util.HttpBadRequestException;
import com.juick.server.util.HttpUtils;
import com.juick.service.MessagesService;
diff --git a/src/main/java/com/juick/server/CommandsManager.java b/src/main/java/com/juick/server/CommandsManager.java
index 8029c301..bf907855 100644
--- a/src/main/java/com/juick/server/CommandsManager.java
+++ b/src/main/java/com/juick/server/CommandsManager.java
@@ -23,7 +23,7 @@ import com.juick.model.User;
import com.juick.formatters.PlainTextFormatter;
import com.juick.model.CommandResult;
import com.juick.model.TagStats;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import com.juick.server.helpers.annotation.UserCommand;
import com.juick.server.util.HttpUtils;
import com.juick.www.WebApp;
diff --git a/src/main/java/com/juick/server/EmailManager.java b/src/main/java/com/juick/server/EmailManager.java
index 0782f858..522f1db6 100644
--- a/src/main/java/com/juick/server/EmailManager.java
+++ b/src/main/java/com/juick/server/EmailManager.java
@@ -21,7 +21,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.model.Message;
import com.juick.model.User;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import com.juick.server.util.HttpBadRequestException;
import com.juick.www.WebApp;
import com.juick.service.EmailService;
diff --git a/src/main/java/com/juick/server/KeystoreManager.java b/src/main/java/com/juick/server/KeystoreManager.java
index 64a3a00b..0a66c2c8 100644
--- a/src/main/java/com/juick/server/KeystoreManager.java
+++ b/src/main/java/com/juick/server/KeystoreManager.java
@@ -17,7 +17,7 @@
package com.juick.server;
-import com.juick.server.api.activity.model.objects.Person;
+import com.juick.www.api.activity.model.objects.Person;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
@@ -31,7 +31,6 @@ import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.spec.X509EncodedKeySpec;
import java.util.Arrays;
-import java.util.stream.Collectors;
public class KeystoreManager {
private static final Logger logger = LoggerFactory.getLogger("ActivityPub");
diff --git a/src/main/java/com/juick/server/ServerManager.java b/src/main/java/com/juick/server/ServerManager.java
index ee8d2147..1f11a9fb 100644
--- a/src/main/java/com/juick/server/ServerManager.java
+++ b/src/main/java/com/juick/server/ServerManager.java
@@ -16,12 +16,10 @@
*/
package com.juick.server;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.model.Message;
import com.juick.model.User;
import com.juick.model.AnonymousUser;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import com.juick.service.MessagesService;
import com.juick.service.SubscriptionService;
import com.juick.service.UserService;
diff --git a/src/main/java/com/juick/server/SignatureManager.java b/src/main/java/com/juick/server/SignatureManager.java
index c622c7e2..602b4285 100644
--- a/src/main/java/com/juick/server/SignatureManager.java
+++ b/src/main/java/com/juick/server/SignatureManager.java
@@ -20,10 +20,10 @@ package com.juick.server;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.model.User;
import com.juick.model.AnonymousUser;
-import com.juick.server.api.activity.model.Context;
-import com.juick.server.api.activity.model.objects.Person;
-import com.juick.server.api.webfinger.model.Account;
-import com.juick.server.api.webfinger.model.Link;
+import com.juick.www.api.activity.model.Context;
+import com.juick.www.api.activity.model.objects.Person;
+import com.juick.www.api.webfinger.model.Account;
+import com.juick.www.api.webfinger.model.Link;
import com.juick.service.UserService;
import com.juick.util.DateFormattersHolder;
import org.slf4j.Logger;
@@ -51,7 +51,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
-import static com.juick.server.api.activity.model.Context.ACTIVITY_MEDIA_TYPE;
+import static com.juick.www.api.activity.model.Context.ACTIVITY_MEDIA_TYPE;
@Component
public class SignatureManager {
diff --git a/src/main/java/com/juick/server/TelegramBotManager.java b/src/main/java/com/juick/server/TelegramBotManager.java
index f35a73d3..3c38e5de 100644
--- a/src/main/java/com/juick/server/TelegramBotManager.java
+++ b/src/main/java/com/juick/server/TelegramBotManager.java
@@ -20,7 +20,7 @@ package com.juick.server;
import com.juick.model.User;
import com.juick.model.AnonymousUser;
import com.juick.model.CommandResult;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import com.juick.server.util.HttpUtils;
import com.juick.service.MessagesService;
import com.juick.service.TelegramService;
diff --git a/src/main/java/com/juick/server/TopManager.java b/src/main/java/com/juick/server/TopManager.java
index 338b0e49..15abb6cc 100644
--- a/src/main/java/com/juick/server/TopManager.java
+++ b/src/main/java/com/juick/server/TopManager.java
@@ -20,7 +20,7 @@ package com.juick.server;
import com.juick.model.Message;
import com.juick.model.Tag;
import com.juick.model.User;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import com.juick.service.MessagesService;
import com.juick.service.UserService;
import com.juick.service.component.SystemEvent;
diff --git a/src/main/java/com/juick/server/TwitterManager.java b/src/main/java/com/juick/server/TwitterManager.java
index 1b66358d..e424784c 100644
--- a/src/main/java/com/juick/server/TwitterManager.java
+++ b/src/main/java/com/juick/server/TwitterManager.java
@@ -18,7 +18,7 @@ package com.juick.server;
import com.juick.model.Message;
import com.juick.model.User;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import com.juick.service.UserService;
import com.juick.service.component.*;
import com.juick.service.CrosspostService;
diff --git a/src/main/java/com/juick/server/XMPPManager.java b/src/main/java/com/juick/server/XMPPManager.java
index af6fe022..32f1b94e 100644
--- a/src/main/java/com/juick/server/XMPPManager.java
+++ b/src/main/java/com/juick/server/XMPPManager.java
@@ -20,7 +20,7 @@ package com.juick.server;
import com.juick.model.User;
import com.juick.formatters.PlainTextFormatter;
import com.juick.model.CommandResult;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import com.juick.www.WebApp;
import com.juick.server.xmpp.iq.MessageQuery;
import com.juick.service.MessagesService;
diff --git a/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java b/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
index 35d5d043..56edffa7 100644
--- a/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
+++ b/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
@@ -18,7 +18,7 @@
package com.juick.server.configuration;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
import com.juick.server.helpers.HeaderRequestInterceptor;
import org.apache.http.client.config.CookieSpecs;
import org.apache.http.client.config.RequestConfig;
diff --git a/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java b/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
index d2c10411..75d247bf 100644
--- a/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
+++ b/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
@@ -17,8 +17,8 @@
package com.juick.server.configuration;
-import com.juick.server.api.rss.MessagesView;
-import com.juick.server.api.rss.RepliesView;
+import com.juick.www.rss.MessagesView;
+import com.juick.www.rss.RepliesView;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
diff --git a/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java b/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java
index f8357b42..e84c0c40 100644
--- a/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java
+++ b/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java
@@ -24,12 +24,9 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter;
-import java.util.concurrent.Executor;
-
/**
* Created by vitalyster on 28.06.2016.
*/
diff --git a/src/main/java/com/juick/server/configuration/SecurityConfig.java b/src/main/java/com/juick/server/configuration/SecurityConfig.java
index 23a41e11..0fab087f 100644
--- a/src/main/java/com/juick/server/configuration/SecurityConfig.java
+++ b/src/main/java/com/juick/server/configuration/SecurityConfig.java
@@ -59,10 +59,6 @@ import java.util.concurrent.TimeUnit;
public class SecurityConfig {
@Resource
private UserService userService;
- @Value("${auth_remember_me_key:secret}")
- private String rememberMeKey;
- @Value("${web_domain:localhost}")
- private String webDomain;
private static final String COOKIE_NAME = "juick-remember-me";
@@ -90,8 +86,6 @@ public class SecurityConfig {
public static class ApiConfig extends WebSecurityConfigurerAdapter {
@Value("${auth_remember_me_key:secret}")
private String rememberMeKey;
- @Value("${web_domain:localhost}")
- private String webDomain;
@Resource
private UserService userService;
@Resource
diff --git a/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java b/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java
index e8733e35..8e874e43 100644
--- a/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java
+++ b/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java
@@ -17,7 +17,7 @@
package com.juick.server.configuration;
-import com.juick.www.HelpService;
+import com.juick.service.HelpService;
import com.juick.service.TagService;
import com.juick.service.UserService;
import com.mitchellbosecke.pebble.PebbleEngine;
@@ -54,10 +54,6 @@ import java.util.concurrent.TimeUnit;
@Configuration
@EnableCaching
public class WwwAppConfiguration implements WebMvcConfigurer {
- @Inject
- private UserService userService;
- @Inject
- private TagService tagService;
@Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String imgDir;
@Bean
diff --git a/src/main/java/com/juick/server/configuration/XMPPConfig.java b/src/main/java/com/juick/server/configuration/XMPPConfig.java
index a002493e..62e19c71 100644
--- a/src/main/java/com/juick/server/configuration/XMPPConfig.java
+++ b/src/main/java/com/juick/server/configuration/XMPPConfig.java
@@ -29,8 +29,6 @@ import org.springframework.format.support.DefaultFormattingConversionService;
@Configuration
@ConditionalOnProperty("xmppbot_jid")
public class XMPPConfig {
- @Value("${hostname:localhost}")
- private String hostname;
@Bean
public static ConversionService conversionService() {
DefaultFormattingConversionService cs = new DefaultFormattingConversionService();
diff --git a/src/main/java/com/juick/www/HelpService.java b/src/main/java/com/juick/service/HelpService.java
index 9d3c3f16..fef427ef 100644
--- a/src/main/java/com/juick/www/HelpService.java
+++ b/src/main/java/com/juick/service/HelpService.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2019, Juick
+ * Copyright (C) 2008-2020, 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
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.www;
+package com.juick.service;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
diff --git a/src/main/java/com/juick/service/activities/FollowEvent.java b/src/main/java/com/juick/service/activities/FollowEvent.java
index 055b79f4..e7c144b7 100644
--- a/src/main/java/com/juick/service/activities/FollowEvent.java
+++ b/src/main/java/com/juick/service/activities/FollowEvent.java
@@ -17,7 +17,7 @@
package com.juick.service.activities;
-import com.juick.server.api.activity.model.activities.Follow;
+import com.juick.www.api.activity.model.activities.Follow;
import org.springframework.context.ApplicationEvent;
public class FollowEvent extends ApplicationEvent {
diff --git a/src/main/java/com/juick/service/component/SystemEvent.java b/src/main/java/com/juick/service/component/SystemEvent.java
index f9908e8e..9db4ffcd 100644
--- a/src/main/java/com/juick/service/component/SystemEvent.java
+++ b/src/main/java/com/juick/service/component/SystemEvent.java
@@ -17,7 +17,7 @@
package com.juick.service.component;
-import com.juick.server.api.SystemActivity;
+import com.juick.www.api.SystemActivity;
import org.springframework.context.ApplicationEvent;
public class SystemEvent extends ApplicationEvent {
diff --git a/src/main/java/com/juick/www/ad/SapeService.java b/src/main/java/com/juick/www/ad/SapeService.java
index 9d58f8b4..4ef4a213 100644
--- a/src/main/java/com/juick/www/ad/SapeService.java
+++ b/src/main/java/com/juick/www/ad/SapeService.java
@@ -19,7 +19,7 @@ package com.juick.www.ad;
import com.juick.model.User;
import com.juick.service.security.annotation.Visitor;
-import com.juick.www.controllers.MessagesWWW;
+import com.juick.www.controllers.Site;
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.ui.ModelMap;
@@ -34,7 +34,7 @@ import ru.sape.Sape;
import javax.inject.Inject;
import java.net.URI;
-@ControllerAdvice(assignableTypes = MessagesWWW.class)
+@ControllerAdvice(assignableTypes = Site.class)
@ConditionalOnProperty("sape_user")
public class SapeService {
diff --git a/src/main/java/com/juick/server/api/ApiSocialLogin.java b/src/main/java/com/juick/www/api/ApiSocialLogin.java
index 24010dd2..6499b507 100644
--- a/src/main/java/com/juick/server/api/ApiSocialLogin.java
+++ b/src/main/java/com/juick/www/api/ApiSocialLogin.java
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.scribejava.apis.AppleClientSecretGenerator;
diff --git a/src/main/java/com/juick/server/api/Index.java b/src/main/java/com/juick/www/api/Index.java
index 607536b3..5b771efd 100644
--- a/src/main/java/com/juick/server/api/Index.java
+++ b/src/main/java/com/juick/www/api/Index.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
diff --git a/src/main/java/com/juick/server/api/Messages.java b/src/main/java/com/juick/www/api/Messages.java
index 5e0743dd..59ed7c8f 100644
--- a/src/main/java/com/juick/server/api/Messages.java
+++ b/src/main/java/com/juick/www/api/Messages.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.Message;
import com.juick.model.Tag;
diff --git a/src/main/java/com/juick/server/api/Notifications.java b/src/main/java/com/juick/www/api/Notifications.java
index eb15917e..ca382246 100644
--- a/src/main/java/com/juick/server/api/Notifications.java
+++ b/src/main/java/com/juick/www/api/Notifications.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.ExternalToken;
import com.juick.model.Message;
diff --git a/src/main/java/com/juick/server/api/PM.java b/src/main/java/com/juick/www/api/PM.java
index a37cc85e..b81dcc78 100644
--- a/src/main/java/com/juick/server/api/PM.java
+++ b/src/main/java/com/juick/www/api/PM.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.Chat;
import com.juick.model.Message;
diff --git a/src/main/java/com/juick/server/api/Post.java b/src/main/java/com/juick/www/api/Post.java
index 700249cc..3c1fbf6b 100644
--- a/src/main/java/com/juick/server/api/Post.java
+++ b/src/main/java/com/juick/www/api/Post.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.Message;
import com.juick.model.Reaction;
diff --git a/src/main/java/com/juick/server/api/Service.java b/src/main/java/com/juick/www/api/Service.java
index d056d9b0..cb918682 100644
--- a/src/main/java/com/juick/server/api/Service.java
+++ b/src/main/java/com/juick/www/api/Service.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.Message;
import com.juick.model.User;
diff --git a/src/main/java/com/juick/server/api/SystemActivity.java b/src/main/java/com/juick/www/api/SystemActivity.java
index 820f9307..0827537a 100644
--- a/src/main/java/com/juick/server/api/SystemActivity.java
+++ b/src/main/java/com/juick/www/api/SystemActivity.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.Message;
import com.juick.model.User;
diff --git a/src/main/java/com/juick/server/api/Tags.java b/src/main/java/com/juick/www/api/Tags.java
index 6041adcf..b50e9bd5 100644
--- a/src/main/java/com/juick/server/api/Tags.java
+++ b/src/main/java/com/juick/www/api/Tags.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.User;
import com.juick.model.TagStats;
diff --git a/src/main/java/com/juick/server/api/Users.java b/src/main/java/com/juick/www/api/Users.java
index 84ac5174..06467b7d 100644
--- a/src/main/java/com/juick/server/api/Users.java
+++ b/src/main/java/com/juick/www/api/Users.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api;
+package com.juick.www.api;
import com.juick.model.User;
import com.juick.model.AnonymousUser;
diff --git a/src/main/java/com/juick/server/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java
index bbe3c0af..bdd7cab2 100644
--- a/src/main/java/com/juick/server/api/activity/Profile.java
+++ b/src/main/java/com/juick/www/api/activity/Profile.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity;
+package com.juick.www.api.activity;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.model.Message;
@@ -26,20 +26,20 @@ import com.juick.server.ActivityPubManager;
import com.juick.server.CommandsManager;
import com.juick.server.KeystoreManager;
import com.juick.server.SignatureManager;
-import com.juick.server.api.activity.model.Activity;
-import com.juick.server.api.activity.model.Context;
-import com.juick.server.api.activity.model.activities.Announce;
-import com.juick.server.api.activity.model.activities.Create;
-import com.juick.server.api.activity.model.activities.Delete;
-import com.juick.server.api.activity.model.activities.Follow;
-import com.juick.server.api.activity.model.activities.Like;
-import com.juick.server.api.activity.model.activities.Undo;
-import com.juick.server.api.activity.model.objects.Image;
-import com.juick.server.api.activity.model.objects.Key;
-import com.juick.server.api.activity.model.objects.Note;
-import com.juick.server.api.activity.model.objects.OrderedCollection;
-import com.juick.server.api.activity.model.objects.OrderedCollectionPage;
-import com.juick.server.api.activity.model.objects.Person;
+import com.juick.www.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Context;
+import com.juick.www.api.activity.model.activities.Announce;
+import com.juick.www.api.activity.model.activities.Create;
+import com.juick.www.api.activity.model.activities.Delete;
+import com.juick.www.api.activity.model.activities.Follow;
+import com.juick.www.api.activity.model.activities.Like;
+import com.juick.www.api.activity.model.activities.Undo;
+import com.juick.www.api.activity.model.objects.Image;
+import com.juick.www.api.activity.model.objects.Key;
+import com.juick.www.api.activity.model.objects.Note;
+import com.juick.www.api.activity.model.objects.OrderedCollection;
+import com.juick.www.api.activity.model.objects.OrderedCollectionPage;
+import com.juick.www.api.activity.model.objects.Person;
import com.juick.server.util.HttpNotFoundException;
import com.juick.www.WebApp;
import com.juick.service.MessagesService;
diff --git a/src/main/java/com/juick/server/api/activity/helpers/ActivityIdDeserializer.java b/src/main/java/com/juick/www/api/activity/helpers/ActivityIdDeserializer.java
index 46b7ebab..e349bff7 100644
--- a/src/main/java/com/juick/server/api/activity/helpers/ActivityIdDeserializer.java
+++ b/src/main/java/com/juick/www/api/activity/helpers/ActivityIdDeserializer.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.helpers;
+package com.juick.www.api.activity.helpers;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
diff --git a/src/main/java/com/juick/server/api/activity/helpers/LinkValueDeserializer.java b/src/main/java/com/juick/www/api/activity/helpers/LinkValueDeserializer.java
index 81d66088..ab797f6c 100644
--- a/src/main/java/com/juick/server/api/activity/helpers/LinkValueDeserializer.java
+++ b/src/main/java/com/juick/www/api/activity/helpers/LinkValueDeserializer.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.helpers;
+package com.juick.www.api.activity.helpers;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
diff --git a/src/main/java/com/juick/server/api/activity/model/Activity.java b/src/main/java/com/juick/www/api/activity/model/Activity.java
index 1462aadd..2ac22349 100644
--- a/src/main/java/com/juick/server/api/activity/model/Activity.java
+++ b/src/main/java/com/juick/www/api/activity/model/Activity.java
@@ -15,10 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model;
+package com.juick.www.api.activity.model;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.juick.server.api.activity.helpers.ActivityIdDeserializer;
+import com.juick.www.api.activity.helpers.ActivityIdDeserializer;
import org.apache.commons.lang3.StringUtils;
import java.util.UUID;
diff --git a/src/main/java/com/juick/server/api/activity/model/Context.java b/src/main/java/com/juick/www/api/activity/model/Context.java
index 14b65e25..57e29e0f 100644
--- a/src/main/java/com/juick/server/api/activity/model/Context.java
+++ b/src/main/java/com/juick/www/api/activity/model/Context.java
@@ -15,13 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model;
+package com.juick.www.api.activity.model;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.juick.server.api.activity.helpers.LinkValueDeserializer;
-import com.juick.server.api.activity.model.activities.*;
-import com.juick.server.api.activity.model.objects.*;
+import com.juick.www.api.activity.helpers.LinkValueDeserializer;
+import com.juick.www.api.activity.model.activities.*;
+import com.juick.www.api.activity.model.objects.*;
import java.time.Instant;
import java.util.ArrayList;
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Accept.java b/src/main/java/com/juick/www/api/activity/model/activities/Accept.java
index 376f76fc..30a55839 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Accept.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Accept.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Accept extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Announce.java b/src/main/java/com/juick/www/api/activity/model/activities/Announce.java
index 7d3298f9..4561b10e 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Announce.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Announce.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Announce extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Block.java b/src/main/java/com/juick/www/api/activity/model/activities/Block.java
index 54c8c485..66919235 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Block.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Block.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Block extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Create.java b/src/main/java/com/juick/www/api/activity/model/activities/Create.java
index 6ac6ad23..5da46545 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Create.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Create.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Create extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Delete.java b/src/main/java/com/juick/www/api/activity/model/activities/Delete.java
index 253627c2..0214f869 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Delete.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Delete.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Delete extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Follow.java b/src/main/java/com/juick/www/api/activity/model/activities/Follow.java
index 9475b4a1..b7653d23 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Follow.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Follow.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Follow extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Like.java b/src/main/java/com/juick/www/api/activity/model/activities/Like.java
index efd25e24..76a35a3c 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Like.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Like.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Like extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Undo.java b/src/main/java/com/juick/www/api/activity/model/activities/Undo.java
index bfaddaee..0e1c7e8a 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Undo.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Undo.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Undo extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/activities/Update.java b/src/main/java/com/juick/www/api/activity/model/activities/Update.java
index 17dfc105..d6ca9c1b 100644
--- a/src/main/java/com/juick/server/api/activity/model/activities/Update.java
+++ b/src/main/java/com/juick/www/api/activity/model/activities/Update.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.activities;
+package com.juick.www.api.activity.model.activities;
-import com.juick.server.api.activity.model.Activity;
+import com.juick.www.api.activity.model.Activity;
public class Update extends Activity {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Emoji.java b/src/main/java/com/juick/www/api/activity/model/objects/Emoji.java
index 8cb69ee4..bb556292 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Emoji.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Emoji.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
public class Emoji extends Context {
}
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Hashtag.java b/src/main/java/com/juick/www/api/activity/model/objects/Hashtag.java
index 8cfd2d71..175cc305 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Hashtag.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Hashtag.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Image.java b/src/main/java/com/juick/www/api/activity/model/objects/Image.java
index 6b9be752..0dfa6271 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Image.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Image.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
public class Image extends Context {
private String mediaType;
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Key.java b/src/main/java/com/juick/www/api/activity/model/objects/Key.java
index 8af232da..26d60213 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Key.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Key.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
public class Key extends Context {
private String owner;
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Link.java b/src/main/java/com/juick/www/api/activity/model/objects/Link.java
index 9014baff..58bf2304 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Link.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Link.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
public class Link extends Context {
private String href;
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Mention.java b/src/main/java/com/juick/www/api/activity/model/objects/Mention.java
index 9f471664..a6099b53 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Mention.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Mention.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Note.java b/src/main/java/com/juick/www/api/activity/model/objects/Note.java
index 9cb2c945..b04b1ec9 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Note.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Note.java
@@ -15,10 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
import com.fasterxml.jackson.annotation.JsonFormat;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
import java.util.List;
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/OrderedCollection.java b/src/main/java/com/juick/www/api/activity/model/objects/OrderedCollection.java
index 7060f15b..d7d43a26 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/OrderedCollection.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/OrderedCollection.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
public class OrderedCollection extends Context {
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/OrderedCollectionPage.java b/src/main/java/com/juick/www/api/activity/model/objects/OrderedCollectionPage.java
index 22e655c8..340e24cf 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/OrderedCollectionPage.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/OrderedCollectionPage.java
@@ -15,9 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
import java.util.List;
diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Person.java b/src/main/java/com/juick/www/api/activity/model/objects/Person.java
index 0ac13017..c653bee1 100644
--- a/src/main/java/com/juick/server/api/activity/model/objects/Person.java
+++ b/src/main/java/com/juick/www/api/activity/model/objects/Person.java
@@ -15,10 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.activity.model.objects;
+package com.juick.www.api.activity.model.objects;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.juick.server.api.activity.model.Context;
+import com.juick.www.api.activity.model.Context;
public class Person extends Context {
diff --git a/src/main/java/com/juick/server/api/apple/AppSiteAssociation.java b/src/main/java/com/juick/www/api/apple/AppSiteAssociation.java
index f4a6fa06..c4afb9fb 100644
--- a/src/main/java/com/juick/server/api/apple/AppSiteAssociation.java
+++ b/src/main/java/com/juick/www/api/apple/AppSiteAssociation.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.apple;
+package com.juick.www.api.apple;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
diff --git a/src/main/java/com/juick/server/api/hostmeta/HostMeta.java b/src/main/java/com/juick/www/api/hostmeta/HostMeta.java
index 688a848a..5c500d6d 100644
--- a/src/main/java/com/juick/server/api/hostmeta/HostMeta.java
+++ b/src/main/java/com/juick/www/api/hostmeta/HostMeta.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.hostmeta;
+package com.juick.www.api.hostmeta;
import com.cliqset.xrd.Link;
import com.cliqset.xrd.XRD;
diff --git a/src/main/java/com/juick/server/api/webfinger/Resource.java b/src/main/java/com/juick/www/api/webfinger/Resource.java
index 8fb808b1..1529ea09 100644
--- a/src/main/java/com/juick/server/api/webfinger/Resource.java
+++ b/src/main/java/com/juick/www/api/webfinger/Resource.java
@@ -15,11 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.webfinger;
+package com.juick.www.api.webfinger;
import com.juick.model.User;
-import com.juick.server.api.webfinger.model.Account;
-import com.juick.server.api.webfinger.model.Link;
+import com.juick.www.api.webfinger.model.Account;
+import com.juick.www.api.webfinger.model.Link;
import com.juick.server.util.HttpNotFoundException;
import com.juick.service.UserService;
import org.springframework.beans.factory.annotation.Value;
@@ -32,7 +32,7 @@ import rocks.xmpp.addr.Jid;
import javax.inject.Inject;
import java.util.Collections;
-import static com.juick.server.api.activity.model.Context.ACTIVITY_MEDIA_TYPE;
+import static com.juick.www.api.activity.model.Context.ACTIVITY_MEDIA_TYPE;
@RestController
public class Resource {
diff --git a/src/main/java/com/juick/server/api/webfinger/model/Account.java b/src/main/java/com/juick/www/api/webfinger/model/Account.java
index 8683af5c..92008604 100644
--- a/src/main/java/com/juick/server/api/webfinger/model/Account.java
+++ b/src/main/java/com/juick/www/api/webfinger/model/Account.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.webfinger.model;
+package com.juick.www.api.webfinger.model;
import java.util.List;
diff --git a/src/main/java/com/juick/server/api/webfinger/model/Link.java b/src/main/java/com/juick/www/api/webfinger/model/Link.java
index 59d0ad80..437b53f7 100644
--- a/src/main/java/com/juick/server/api/webfinger/model/Link.java
+++ b/src/main/java/com/juick/www/api/webfinger/model/Link.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.webfinger.model;
+package com.juick.www.api.webfinger.model;
public class Link {
private String rel;
diff --git a/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java b/src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java
index 1a7c73bb..32218b3a 100644
--- a/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java
+++ b/src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.webhooks;
+package com.juick.www.api.webhooks;
import com.juick.server.TelegramBotManager;
import com.pengrad.telegrambot.BotUtils;
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/Info.java b/src/main/java/com/juick/www/api/xnodeinfo2/Info.java
index fe12ee30..36be1a16 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
+++ b/src/main/java/com/juick/www/api/xnodeinfo2/Info.java
@@ -15,12 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.xnodeinfo2;
+package com.juick.www.api.xnodeinfo2;
import com.cliqset.xrd.Link;
import com.cliqset.xrd.XRD;
import com.fasterxml.jackson.annotation.JsonView;
-import com.juick.server.api.xnodeinfo2.model.*;
+import com.juick.www.api.xnodeinfo2.model.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/model/NodeInfo.java b/src/main/java/com/juick/www/api/xnodeinfo2/model/NodeInfo.java
index 33fb9e95..04526961 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/model/NodeInfo.java
+++ b/src/main/java/com/juick/www/api/xnodeinfo2/model/NodeInfo.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.xnodeinfo2.model;
+package com.juick.www.api.xnodeinfo2.model;
import com.fasterxml.jackson.annotation.JsonView;
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/model/Server.java b/src/main/java/com/juick/www/api/xnodeinfo2/model/Server.java
index 77c5d54a..a03695f6 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/model/Server.java
+++ b/src/main/java/com/juick/www/api/xnodeinfo2/model/Server.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.xnodeinfo2.model;
+package com.juick.www.api.xnodeinfo2.model;
import com.fasterxml.jackson.annotation.JsonView;
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/model/ServiceInfo.java b/src/main/java/com/juick/www/api/xnodeinfo2/model/ServiceInfo.java
index 9f8bdec3..a9482731 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/model/ServiceInfo.java
+++ b/src/main/java/com/juick/www/api/xnodeinfo2/model/ServiceInfo.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.xnodeinfo2.model;
+package com.juick.www.api.xnodeinfo2.model;
import com.fasterxml.jackson.annotation.JsonView;
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/model/Usage.java b/src/main/java/com/juick/www/api/xnodeinfo2/model/Usage.java
index 7bd4337c..436b2565 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/model/Usage.java
+++ b/src/main/java/com/juick/www/api/xnodeinfo2/model/Usage.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.xnodeinfo2.model;
+package com.juick.www.api.xnodeinfo2.model;
import com.fasterxml.jackson.annotation.JsonView;
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/model/UserStats.java b/src/main/java/com/juick/www/api/xnodeinfo2/model/UserStats.java
index f8388b5f..15c42fc9 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/model/UserStats.java
+++ b/src/main/java/com/juick/www/api/xnodeinfo2/model/UserStats.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.xnodeinfo2.model;
+package com.juick.www.api.xnodeinfo2.model;
import com.fasterxml.jackson.annotation.JsonView;
diff --git a/src/main/java/com/juick/www/controllers/Help.java b/src/main/java/com/juick/www/controllers/Help.java
index d2796def..7fc84060 100644
--- a/src/main/java/com/juick/www/controllers/Help.java
+++ b/src/main/java/com/juick/www/controllers/Help.java
@@ -19,10 +19,9 @@ package com.juick.www.controllers;
import com.juick.model.User;
import com.juick.server.util.HttpNotFoundException;
-import com.juick.www.HelpService;
-import com.juick.www.WebApp;
-import com.juick.service.MessagesService;
+import com.juick.service.HelpService;
import com.juick.service.security.annotation.Visitor;
+import com.juick.www.WebApp;
import org.commonmark.parser.Parser;
import org.commonmark.renderer.html.HtmlRenderer;
import org.springframework.stereotype.Controller;
@@ -42,8 +41,6 @@ public class Help {
@Inject
private HelpService helpService;
@Inject
- private MessagesService messagesService;
- @Inject
private Parser cmParser;
@Inject
private HtmlRenderer helpRenderer;
diff --git a/src/main/java/com/juick/www/controllers/MessagesWWW.java b/src/main/java/com/juick/www/controllers/Site.java
index 4b0bb17f..61b84f71 100644
--- a/src/main/java/com/juick/www/controllers/MessagesWWW.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -53,7 +53,7 @@ import java.util.stream.Collectors;
* @author Ugnich Anton
*/
@Controller
-public class MessagesWWW {
+public class Site {
@Inject
private UserService userService;
@Inject
diff --git a/src/main/java/com/juick/server/api/rss/Feeds.java b/src/main/java/com/juick/www/rss/Feeds.java
index 76c2b217..42cadc5d 100644
--- a/src/main/java/com/juick/server/api/rss/Feeds.java
+++ b/src/main/java/com/juick/www/rss/Feeds.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.rss;
+package com.juick.www.rss;
import com.juick.model.User;
import com.juick.server.util.HttpNotFoundException;
diff --git a/src/main/java/com/juick/server/api/rss/MessagesView.java b/src/main/java/com/juick/www/rss/MessagesView.java
index a03dd723..d9c5a6b7 100644
--- a/src/main/java/com/juick/server/api/rss/MessagesView.java
+++ b/src/main/java/com/juick/www/rss/MessagesView.java
@@ -15,12 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.rss;
+package com.juick.www.rss;
import com.juick.model.Message;
import com.juick.model.User;
-import com.juick.server.api.rss.extension.JuickModule;
-import com.juick.server.api.rss.extension.JuickModuleImpl;
+import com.juick.www.rss.extension.JuickModule;
+import com.juick.www.rss.extension.JuickModuleImpl;
import com.juick.www.WebApp;
import com.juick.util.MessageUtils;
import com.rometools.modules.atom.modules.AtomLinkModule;
diff --git a/src/main/java/com/juick/server/api/rss/RepliesView.java b/src/main/java/com/juick/www/rss/RepliesView.java
index c848217a..2e5b9f67 100644
--- a/src/main/java/com/juick/server/api/rss/RepliesView.java
+++ b/src/main/java/com/juick/www/rss/RepliesView.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.rss;
+package com.juick.www.rss;
import com.juick.model.ResponseReply;
import com.juick.util.MessageUtils;
diff --git a/src/main/java/com/juick/server/api/rss/extension/JuickModule.java b/src/main/java/com/juick/www/rss/extension/JuickModule.java
index b9b659c8..6b24390a 100644
--- a/src/main/java/com/juick/server/api/rss/extension/JuickModule.java
+++ b/src/main/java/com/juick/www/rss/extension/JuickModule.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.rss.extension;
+package com.juick.www.rss.extension;
import com.rometools.rome.feed.module.Module;
diff --git a/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java b/src/main/java/com/juick/www/rss/extension/JuickModuleGenerator.java
index fc8586ea..61368785 100644
--- a/src/main/java/com/juick/server/api/rss/extension/JuickModuleGenerator.java
+++ b/src/main/java/com/juick/www/rss/extension/JuickModuleGenerator.java
@@ -15,15 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.rss.extension;
+package com.juick.www.rss.extension;
import com.rometools.rome.feed.module.Module;
import com.rometools.rome.io.ModuleGenerator;
import org.jdom2.Element;
import org.jdom2.Namespace;
-import java.util.Collections;
-import java.util.HashSet;
import java.util.Set;
/**
diff --git a/src/main/java/com/juick/server/api/rss/extension/JuickModuleImpl.java b/src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java
index a32f2794..ea6c4a66 100644
--- a/src/main/java/com/juick/server/api/rss/extension/JuickModuleImpl.java
+++ b/src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.rss.extension;
+package com.juick.www.rss.extension;
import com.rometools.rome.feed.CopyFrom;
import com.rometools.rome.feed.module.ModuleImpl;
diff --git a/src/main/java/com/juick/server/api/rss/extension/JuickModuleParser.java b/src/main/java/com/juick/www/rss/extension/JuickModuleParser.java
index 445815a6..fbf8c8bb 100644
--- a/src/main/java/com/juick/server/api/rss/extension/JuickModuleParser.java
+++ b/src/main/java/com/juick/www/rss/extension/JuickModuleParser.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package com.juick.server.api.rss.extension;
+package com.juick.www.rss.extension;
import com.rometools.rome.feed.module.Module;
import com.rometools.rome.io.ModuleParser;
diff --git a/src/main/resources/rome.properties b/src/main/resources/rome.properties
index fdb9aaa2..64ff5c39 100644
--- a/src/main/resources/rome.properties
+++ b/src/main/resources/rome.properties
@@ -1,2 +1,2 @@
-rss_2.0.item.ModuleParser.classes=com.juick.server.api.rss.extension.JuickModuleParser
-rss_2.0.item.ModuleGenerator.classes=com.juick.server.api.rss.extension.JuickModuleGenerator \ No newline at end of file
+rss_2.0.item.ModuleParser.classes=com.juick.www.rss.extension.JuickModuleParser
+rss_2.0.item.ModuleGenerator.classes=com.juick.www.rss.extension.JuickModuleGenerator \ No newline at end of file
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 85aedc9a..80c8fe4e 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -32,15 +32,15 @@ import com.jayway.jsonpath.JsonPath;
import com.juick.formatters.PlainTextFormatter;
import com.juick.model.*;
import com.juick.server.*;
-import com.juick.server.api.SystemActivity;
-import com.juick.server.api.Users;
-import com.juick.server.api.activity.Profile;
-import com.juick.server.api.activity.model.Context;
-import com.juick.server.api.activity.model.activities.*;
-import com.juick.server.api.activity.model.objects.Note;
-import com.juick.server.api.activity.model.objects.Person;
-import com.juick.server.api.webfinger.model.Account;
-import com.juick.server.api.xnodeinfo2.model.NodeInfo;
+import com.juick.www.api.SystemActivity;
+import com.juick.www.api.Users;
+import com.juick.www.api.activity.Profile;
+import com.juick.www.api.activity.model.Context;
+import com.juick.www.api.activity.model.activities.*;
+import com.juick.www.api.activity.model.objects.Note;
+import com.juick.www.api.activity.model.objects.Person;
+import com.juick.www.api.webfinger.model.Account;
+import com.juick.www.api.xnodeinfo2.model.NodeInfo;
import com.juick.server.util.HttpUtils;
import com.juick.server.util.ImageUtils;
import com.juick.www.WebApp;
@@ -141,7 +141,7 @@ import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.StreamSupport;
-import static com.juick.server.api.activity.model.Context.ACTIVITY_MEDIA_TYPE;
+import static com.juick.www.api.activity.model.Context.ACTIVITY_MEDIA_TYPE;
import static junit.framework.TestCase.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;