From a35fe74a641d1f5a173fae82d863d658b03f30b3 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 18 Mar 2023 11:07:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20Event?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simple/core/provider/ChatStoryLineHandler.java | 2 +- .../simple/core/provider/PersonStoryLineHandler.java | 2 +- .../struchkov/godfather/main/domain/content/ChatMail.java | 8 +------- .../dev/struchkov/godfather/main/domain/content/Mail.java | 8 +------- .../dev/struchkov/godfather/main/domain/event/Event.java | 7 ------- 5 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/event/Event.java diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java index af40257..bd5506c 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java @@ -19,7 +19,7 @@ public class ChatStoryLineHandler implements EventHandler { @Override public String getEventType() { - return ChatMail.class.getName(); + return ChatMail.class.getSimpleName(); } } diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java index 776bfbf..0c2fa67 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java @@ -19,7 +19,7 @@ public class PersonStoryLineHandler implements EventHandler { @Override public String getEventType() { - return Mail.class.getName(); + return Mail.class.getSimpleName(); } } diff --git a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/ChatMail.java b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/ChatMail.java index 77d3b31..bdc26a9 100644 --- a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/ChatMail.java +++ b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/ChatMail.java @@ -1,6 +1,5 @@ package dev.struchkov.godfather.main.domain.content; -import dev.struchkov.godfather.main.domain.event.Event; import lombok.Getter; import lombok.Setter; @@ -10,7 +9,7 @@ import java.util.List; @Getter @Setter -public class ChatMail extends Message implements Event { +public class ChatMail extends Message { public static final String TYPE = "CHAT_MAIL"; @@ -44,9 +43,4 @@ public class ChatMail extends Message implements Event { this.attachments.addAll(attachments); } - @Override - public String getEventType() { - return TYPE; - } - } diff --git a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/Mail.java b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/Mail.java index f7e6ea0..56fb81f 100644 --- a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/Mail.java +++ b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/content/Mail.java @@ -1,6 +1,5 @@ package dev.struchkov.godfather.main.domain.content; -import dev.struchkov.godfather.main.domain.event.Event; import lombok.Getter; import lombok.Setter; @@ -16,7 +15,7 @@ import java.util.List; @Getter @Setter -public class Mail extends Message implements Event { +public class Mail extends Message { public static final String TYPE = "MAIL"; @@ -80,9 +79,4 @@ public class Mail extends Message implements Event { this.forwardMail = forwardMail; } - @Override - public String getEventType() { - return TYPE; - } - } diff --git a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/event/Event.java b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/event/Event.java deleted file mode 100644 index 808e7ea..0000000 --- a/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/event/Event.java +++ /dev/null @@ -1,7 +0,0 @@ -package dev.struchkov.godfather.main.domain.event; - -public interface Event { - - String getEventType(); - -}