From ce43c3cc826a3150f0dab85bd85d9ea57c35b596 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 18 Feb 2023 20:45:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/PersonSettingRepository.java | 2 +- .../context/repository}/StorylineContext.java | 2 +- .../repository/StorylineRepository.java | 2 +- .../repository/UnitPointerRepository.java | 2 +- .../context/service/Accessibility.java | 10 ------ .../repository/PersonSettingRepository.java | 2 +- .../context/repository}/StorylineContext.java | 2 +- .../repository/StorylineRepository.java | 2 +- .../repository/UnitPointerRepository.java | 2 +- .../quarkus/core/GeneralAutoResponder.java | 8 ++--- .../godfather/quarkus/core/Storyline.java | 2 +- .../quarkus/core/StorylineFactory.java | 2 +- .../quarkus/core/action/ActionUnit.java | 4 +-- .../core/action/AnswerCheckAction.java | 6 ++-- .../quarkus/core/action/AnswerSaveAction.java | 14 ++++---- .../quarkus/core/action/AnswerTextAction.java | 28 +++------------- .../core/action/cmd/ReplaceCmdAction.java | 6 ++-- .../core/action/cmd/RollBackCmdAction.java | 6 ++-- .../service/PersonSettingServiceImpl.java | 2 +- .../core/service/StorylineContextMapImpl.java | 2 +- .../core/service/StorylineMailService.java | 4 +-- .../core/service/StorylineService.java | 2 +- .../core/service/UnitPointerServiceImpl.java | 2 +- .../core/unit/func/ActionBeforeSending.java | 10 ------ .../simple/core/GeneralAutoResponder.java | 12 +++---- .../godfather/simple/core/Storyline.java | 2 +- .../simple/core/StorylineFactory.java | 2 +- .../simple/core/action/ActionUnit.java | 4 +-- .../simple/core/action/AnswerCheckAction.java | 6 ++-- .../simple/core/action/AnswerSaveAction.java | 15 +++++---- .../simple/core/action/AnswerTextAction.java | 26 +++------------ .../core/action/cmd/ReplaceCmdAction.java | 6 ++-- .../core/action/cmd/RollBackCmdAction.java | 6 ++-- .../simple/core/pusher/UserSanderPusher.java | 3 +- .../service/PersonSettingServiceImpl.java | 2 +- .../core/service/StorylineContextMapImpl.java | 2 +- .../core/service/StorylineMailService.java | 4 +-- .../simple/core/service/StorylineService.java | 2 +- .../core/service/UnitPointerServiceImpl.java | 2 +- .../core/unit/func/ActionBeforeSending.java | 8 ----- .../impl/AnswerSaveMapPreservable.java | 4 +-- .../impl/PersonSettingLocalRepository.java | 2 +- .../impl/StorylineMapRepository.java | 2 +- .../impl/UnitPointLocalRepository.java | 2 +- .../impl/AnswerSaveMapPreservable.java | 7 ++-- .../impl/PersonSettingLocalRepository.java | 2 +- .../impl/StorylineMapRepository.java | 2 +- .../impl/UnitPointLocalRepository.java | 2 +- .../godfather/main/domain}/unit/TypeUnit.java | 3 +- .../main/domain}/unit/UnitActiveType.java | 2 +- .../quarkus/domain}/unit/AnswerCheck.java | 16 +++------- .../quarkus/domain}/unit/AnswerSave.java | 22 ++++--------- .../quarkus/domain}/unit/AnswerText.java | 32 +++---------------- .../quarkus/domain}/unit/MainUnit.java | 16 ++-------- .../quarkus/domain}/unit/UnitRequest.java | 2 +- .../quarkus/domain}/unit/cmd/ReplaceCmd.java | 9 +++--- .../quarkus/domain}/unit/cmd/RollBackCmd.java | 9 +++--- .../domain}/unit/func/CallBackConsumer.java | 2 +- .../quarkus/domain}/unit/func/CheckData.java | 2 +- .../quarkus/domain}/unit/func/CheckSave.java | 4 +-- .../domain}/unit/func/PreservableData.java | 2 +- .../domain}/unit/func/ProcessingData.java | 2 +- .../quarkus/domain/unit/func}/Pusher.java | 2 +- .../func}/preser/AnswerSavePreservable.java | 4 +-- .../domain/unit/func}/preser/Preservable.java | 2 +- .../simple/domain}/unit/AnswerCheck.java | 16 +++------- .../simple/domain}/unit/AnswerSave.java | 30 +++++++---------- .../simple/domain}/unit/AnswerText.java | 32 +++---------------- .../simple/domain}/unit/MainUnit.java | 16 ++-------- .../simple/domain}/unit/UnitRequest.java | 2 +- .../simple/domain}/unit/cmd/ReplaceCmd.java | 9 +++--- .../simple/domain}/unit/cmd/RollBackCmd.java | 14 ++++---- .../domain}/unit/func/CallBackConsumer.java | 2 +- .../simple/domain}/unit/func/CheckData.java | 2 +- .../simple/domain}/unit/func/CheckSave.java | 4 +-- .../domain}/unit/func/PreservableData.java | 2 +- .../unit/func/PreservableDataSimple.java | 2 +- .../domain}/unit/func/ProcessingData.java | 2 +- .../simple/domain/unit/func}/Pusher.java | 2 +- .../func}/preser/AnswerSavePreservable.java | 4 +-- .../domain/unit/func}/preser/Preservable.java | 2 +- 81 files changed, 177 insertions(+), 344 deletions(-) rename {bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data => bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context}/repository/PersonSettingRepository.java (85%) rename {bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data => bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository}/StorylineContext.java (91%) rename {bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data => bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context}/repository/StorylineRepository.java (88%) rename {bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data => bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context}/repository/UnitPointerRepository.java (88%) delete mode 100644 bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/Accessibility.java rename {bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data => bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context}/repository/PersonSettingRepository.java (84%) rename {bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data => bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository}/StorylineContext.java (91%) rename {bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data => bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context}/repository/StorylineRepository.java (88%) rename {bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data => bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context}/repository/UnitPointerRepository.java (88%) delete mode 100644 bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/ActionBeforeSending.java delete mode 100644 bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/ActionBeforeSending.java rename {bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core => bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain}/unit/TypeUnit.java (84%) rename {bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core => bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain}/unit/UnitActiveType.java (79%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/AnswerCheck.java (93%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/AnswerSave.java (91%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/AnswerText.java (86%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/MainUnit.java (84%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/UnitRequest.java (93%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/cmd/ReplaceCmd.java (94%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/cmd/RollBackCmd.java (96%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/func/CallBackConsumer.java (76%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/func/CheckData.java (77%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/func/CheckSave.java (72%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/func/PreservableData.java (78%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain}/unit/func/ProcessingData.java (76%) rename {bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func}/Pusher.java (82%) rename {bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func}/preser/AnswerSavePreservable.java (75%) rename {bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data => bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func}/preser/Preservable.java (91%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/AnswerCheck.java (93%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/AnswerSave.java (91%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/AnswerText.java (86%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/MainUnit.java (84%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/UnitRequest.java (93%) rename {bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/cmd/ReplaceCmd.java (94%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/cmd/RollBackCmd.java (94%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/func/CallBackConsumer.java (73%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/func/CheckData.java (74%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/func/CheckSave.java (70%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/func/PreservableData.java (74%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/func/PreservableDataSimple.java (91%) rename {bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain}/unit/func/ProcessingData.java (77%) rename {bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func}/Pusher.java (80%) rename {bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func}/preser/AnswerSavePreservable.java (73%) rename {bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data => bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func}/preser/Preservable.java (91%) diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/PersonSettingRepository.java b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/PersonSettingRepository.java similarity index 85% rename from bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/PersonSettingRepository.java rename to bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/PersonSettingRepository.java index 6160bf1..6749592 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/PersonSettingRepository.java +++ b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/PersonSettingRepository.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.data.repository; +package dev.struchkov.godfather.quarkus.context.repository; import io.smallrye.mutiny.Uni; diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/StorylineContext.java b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/StorylineContext.java similarity index 91% rename from bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/StorylineContext.java rename to bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/StorylineContext.java index bb0e9dc..54903c3 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/StorylineContext.java +++ b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/StorylineContext.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.data; +package dev.struchkov.godfather.quarkus.context.repository; import dev.struchkov.haiti.utils.container.ContextKey; import io.smallrye.mutiny.Uni; diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/StorylineRepository.java b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/StorylineRepository.java similarity index 88% rename from bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/StorylineRepository.java rename to bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/StorylineRepository.java index a0d68f5..34b2857 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/StorylineRepository.java +++ b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/StorylineRepository.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.data.repository; +package dev.struchkov.godfather.quarkus.context.repository; import dev.struchkov.godfather.main.domain.StorylineHistory; import io.smallrye.mutiny.Uni; diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/UnitPointerRepository.java b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/UnitPointerRepository.java similarity index 88% rename from bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/UnitPointerRepository.java rename to bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/UnitPointerRepository.java index acecadd..ac55e69 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/UnitPointerRepository.java +++ b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/repository/UnitPointerRepository.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.data.repository; +package dev.struchkov.godfather.quarkus.context.repository; import dev.struchkov.godfather.main.domain.UnitPointer; import io.smallrye.mutiny.Uni; diff --git a/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/Accessibility.java b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/Accessibility.java deleted file mode 100644 index 229db8d..0000000 --- a/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/Accessibility.java +++ /dev/null @@ -1,10 +0,0 @@ -package dev.struchkov.godfather.quarkus.context.service; - -import dev.struchkov.godfather.main.domain.content.Message; -import io.smallrye.mutiny.Uni; - -public interface Accessibility { - - Uni check(Message message); - -} diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/PersonSettingRepository.java b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/PersonSettingRepository.java similarity index 84% rename from bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/PersonSettingRepository.java rename to bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/PersonSettingRepository.java index 6277f4c..6f97cbf 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/PersonSettingRepository.java +++ b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/PersonSettingRepository.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.data.repository; +package dev.struchkov.godfather.simple.context.repository; import java.util.Optional; import java.util.Set; diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/StorylineContext.java b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/StorylineContext.java similarity index 91% rename from bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/StorylineContext.java rename to bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/StorylineContext.java index 4ccf27f..63cde9f 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/StorylineContext.java +++ b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/StorylineContext.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.data; +package dev.struchkov.godfather.simple.context.repository; import dev.struchkov.haiti.utils.container.ContextKey; import org.jetbrains.annotations.NotNull; diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/StorylineRepository.java b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/StorylineRepository.java similarity index 88% rename from bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/StorylineRepository.java rename to bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/StorylineRepository.java index 6457e09..e408595 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/StorylineRepository.java +++ b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/StorylineRepository.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.data.repository; +package dev.struchkov.godfather.simple.context.repository; import dev.struchkov.godfather.main.domain.StorylineHistory; import org.jetbrains.annotations.NotNull; diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/UnitPointerRepository.java b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/UnitPointerRepository.java similarity index 88% rename from bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/UnitPointerRepository.java rename to bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/UnitPointerRepository.java index ac163b5..22b09e6 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/UnitPointerRepository.java +++ b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/repository/UnitPointerRepository.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.data.repository; +package dev.struchkov.godfather.simple.context.repository; import dev.struchkov.godfather.main.domain.UnitPointer; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/GeneralAutoResponder.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/GeneralAutoResponder.java index 1b4dca2..e95bb4c 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/GeneralAutoResponder.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/GeneralAutoResponder.java @@ -2,9 +2,9 @@ package dev.struchkov.godfather.quarkus.core; import dev.struchkov.autoresponder.Responder; import dev.struchkov.godfather.exception.ConfigAppException; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import dev.struchkov.godfather.quarkus.context.service.ErrorHandler; import dev.struchkov.godfather.quarkus.context.service.Modifiable; import dev.struchkov.godfather.quarkus.context.service.PersonSettingService; @@ -15,8 +15,8 @@ import dev.struchkov.godfather.quarkus.core.action.AnswerSaveAction; import dev.struchkov.godfather.quarkus.core.action.AnswerTextAction; import dev.struchkov.godfather.quarkus.core.action.cmd.ReplaceCmdAction; import dev.struchkov.godfather.quarkus.core.service.StorylineService; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.core.unit.UnitRequest; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.UnitRequest; import dev.struchkov.haiti.context.exception.NotFoundException; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/Storyline.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/Storyline.java index d6ebf95..0a42db0 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/Storyline.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/Storyline.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.quarkus.core; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; import org.jetbrains.annotations.NotNull; import java.util.HashMap; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/StorylineFactory.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/StorylineFactory.java index d03e309..d8af91e 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/StorylineFactory.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/StorylineFactory.java @@ -4,7 +4,7 @@ import dev.struchkov.godfather.exception.UnitConfigException; import dev.struchkov.godfather.main.domain.UnitDefinition; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; import dev.struchkov.haiti.utils.Inspector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/ActionUnit.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/ActionUnit.java index a1f8a36..a2a20e8 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/ActionUnit.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/ActionUnit.java @@ -1,8 +1,8 @@ package dev.struchkov.godfather.quarkus.core.action; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.core.unit.UnitRequest; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.UnitRequest; import io.smallrye.mutiny.Uni; /** diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerCheckAction.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerCheckAction.java index 84ceb3f..e27311a 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerCheckAction.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerCheckAction.java @@ -2,10 +2,10 @@ package dev.struchkov.godfather.quarkus.core.action; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.godfather.quarkus.context.service.Sending; -import dev.struchkov.godfather.quarkus.core.unit.AnswerCheck; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.core.unit.UnitRequest; import dev.struchkov.godfather.quarkus.domain.BoxAnswer; +import dev.struchkov.godfather.quarkus.domain.unit.AnswerCheck; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.UnitRequest; import io.smallrye.mutiny.Uni; import java.util.Objects; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerSaveAction.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerSaveAction.java index 8129ce7..189e603 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerSaveAction.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerSaveAction.java @@ -1,13 +1,13 @@ package dev.struchkov.godfather.quarkus.core.action; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.context.service.Pusher; -import dev.struchkov.godfather.quarkus.core.unit.AnswerSave; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.core.unit.UnitRequest; -import dev.struchkov.godfather.quarkus.core.unit.func.CheckSave; -import dev.struchkov.godfather.quarkus.core.unit.func.PreservableData; -import dev.struchkov.godfather.quarkus.data.preser.AnswerSavePreservable; +import dev.struchkov.godfather.quarkus.domain.unit.AnswerSave; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.UnitRequest; +import dev.struchkov.godfather.quarkus.domain.unit.func.CheckSave; +import dev.struchkov.godfather.quarkus.domain.unit.func.PreservableData; +import dev.struchkov.godfather.quarkus.domain.unit.func.Pusher; +import dev.struchkov.godfather.quarkus.domain.unit.func.preser.AnswerSavePreservable; import io.smallrye.mutiny.Uni; import static dev.struchkov.haiti.utils.Checker.checkNotNull; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerTextAction.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerTextAction.java index ce9d98c..ddb3c6b 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerTextAction.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/AnswerTextAction.java @@ -2,11 +2,10 @@ package dev.struchkov.godfather.quarkus.core.action; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.godfather.quarkus.context.service.Sending; -import dev.struchkov.godfather.quarkus.core.unit.AnswerText; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.core.unit.UnitRequest; -import dev.struchkov.godfather.quarkus.core.unit.func.ActionBeforeSending; -import dev.struchkov.godfather.quarkus.core.unit.func.CallBackConsumer; +import dev.struchkov.godfather.quarkus.domain.unit.AnswerText; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.UnitRequest; +import dev.struchkov.godfather.quarkus.domain.unit.func.CallBackConsumer; import io.smallrye.mutiny.Uni; import static dev.struchkov.haiti.utils.Checker.checkNotNull; @@ -20,35 +19,16 @@ public class AnswerTextAction implements ActionUnit, Message private final Sending sending; - private ActionBeforeSending actionBeforeSending; - public AnswerTextAction(Sending sending) { this.sending = sending; } - public void setActionBeforeSending(ActionBeforeSending actionBeforeSending) { - this.actionBeforeSending = actionBeforeSending; - } - @Override public Uni> action(UnitRequest, Message> unitRequest) { final Message message = unitRequest.getMessage(); final AnswerText unit = unitRequest.getUnit(); return unit.getAnswer().processing(message) - .onItem().ifNotNull().call(v -> { - if (checkNotNull(actionBeforeSending)) { - return actionBeforeSending.execute(message.getPersonId()); - } - return Uni.createFrom().nullItem(); - }) - .onItem().ifNotNull().call(v -> { - final ActionBeforeSending unitActionBeforeSending = unit.getActionBeforeSending(); - if (checkNotNull(unitActionBeforeSending)) { - return unitActionBeforeSending.execute(message.getPersonId()); - } - return Uni.createFrom().nullItem(); - }) .onItem().ifNotNull().transformToUni(boxAnswer -> { boxAnswer.setRecipientIfNull(message.getPersonId()); return sending.send(boxAnswer); diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/ReplaceCmdAction.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/ReplaceCmdAction.java index c29dfb0..2445c5c 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/ReplaceCmdAction.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/ReplaceCmdAction.java @@ -2,9 +2,9 @@ package dev.struchkov.godfather.quarkus.core.action.cmd; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.godfather.quarkus.core.action.ActionUnit; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.core.unit.UnitRequest; -import dev.struchkov.godfather.quarkus.core.unit.cmd.ReplaceCmd; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.UnitRequest; +import dev.struchkov.godfather.quarkus.domain.unit.cmd.ReplaceCmd; import io.smallrye.mutiny.Uni; public class ReplaceCmdAction implements ActionUnit, Message> { diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/RollBackCmdAction.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/RollBackCmdAction.java index e20f218..da29931 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/RollBackCmdAction.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/action/cmd/RollBackCmdAction.java @@ -4,9 +4,9 @@ import dev.struchkov.godfather.main.domain.StorylineHistory; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.godfather.quarkus.core.action.ActionUnit; import dev.struchkov.godfather.quarkus.core.service.StorylineService; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.core.unit.UnitRequest; -import dev.struchkov.godfather.quarkus.core.unit.cmd.RollBackCmd; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.UnitRequest; +import dev.struchkov.godfather.quarkus.domain.unit.cmd.RollBackCmd; import io.smallrye.mutiny.Uni; import static dev.struchkov.godfather.exception.RollBackException.rollBackException; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/PersonSettingServiceImpl.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/PersonSettingServiceImpl.java index 1af2fb6..731f633 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/PersonSettingServiceImpl.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/PersonSettingServiceImpl.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.quarkus.core.service; +import dev.struchkov.godfather.quarkus.context.repository.PersonSettingRepository; import dev.struchkov.godfather.quarkus.context.service.PersonSettingService; -import dev.struchkov.godfather.quarkus.data.repository.PersonSettingRepository; import dev.struchkov.haiti.utils.Inspector; import io.smallrye.mutiny.Uni; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineContextMapImpl.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineContextMapImpl.java index 63e42a7..7048c71 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineContextMapImpl.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineContextMapImpl.java @@ -1,6 +1,6 @@ package dev.struchkov.godfather.quarkus.core.service; -import dev.struchkov.godfather.quarkus.data.StorylineContext; +import dev.struchkov.godfather.quarkus.context.repository.StorylineContext; import dev.struchkov.haiti.utils.container.ContextKey; import io.smallrye.mutiny.Uni; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineMailService.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineMailService.java index ac1111c..31a7e77 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineMailService.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineMailService.java @@ -3,11 +3,11 @@ package dev.struchkov.godfather.quarkus.core.service; import dev.struchkov.godfather.main.domain.StorylineHistory; import dev.struchkov.godfather.main.domain.UnitPointer; import dev.struchkov.godfather.main.domain.content.Mail; +import dev.struchkov.godfather.quarkus.context.repository.StorylineRepository; import dev.struchkov.godfather.quarkus.context.service.UnitPointerService; import dev.struchkov.godfather.quarkus.core.Storyline; import dev.struchkov.godfather.quarkus.core.StorylineFactory; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; -import dev.struchkov.godfather.quarkus.data.repository.StorylineRepository; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; import io.smallrye.mutiny.Uni; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineService.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineService.java index 7d91e84..da8fa22 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineService.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/StorylineService.java @@ -2,7 +2,7 @@ package dev.struchkov.godfather.quarkus.core.service; import dev.struchkov.godfather.main.domain.StorylineHistory; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; import io.smallrye.mutiny.Uni; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/UnitPointerServiceImpl.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/UnitPointerServiceImpl.java index 6280b59..ae2f311 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/UnitPointerServiceImpl.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/service/UnitPointerServiceImpl.java @@ -1,8 +1,8 @@ package dev.struchkov.godfather.quarkus.core.service; import dev.struchkov.godfather.main.domain.UnitPointer; +import dev.struchkov.godfather.quarkus.context.repository.UnitPointerRepository; import dev.struchkov.godfather.quarkus.context.service.UnitPointerService; -import dev.struchkov.godfather.quarkus.data.repository.UnitPointerRepository; import io.smallrye.mutiny.Uni; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/ActionBeforeSending.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/ActionBeforeSending.java deleted file mode 100644 index 2236fb0..0000000 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/ActionBeforeSending.java +++ /dev/null @@ -1,10 +0,0 @@ -package dev.struchkov.godfather.quarkus.core.unit.func; - -import io.smallrye.mutiny.Uni; - -@FunctionalInterface -public interface ActionBeforeSending { - - Uni execute(String personId); - -} diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/GeneralAutoResponder.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/GeneralAutoResponder.java index 8237a4f..14cd7b5 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/GeneralAutoResponder.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/GeneralAutoResponder.java @@ -2,9 +2,9 @@ package dev.struchkov.godfather.simple.core; import dev.struchkov.autoresponder.Responder; import dev.struchkov.godfather.exception.ConfigAppException; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import dev.struchkov.godfather.simple.context.service.Accessibility; import dev.struchkov.godfather.simple.context.service.ErrorHandler; import dev.struchkov.godfather.simple.context.service.Modifiable; @@ -16,8 +16,8 @@ import dev.struchkov.godfather.simple.core.action.AnswerSaveAction; import dev.struchkov.godfather.simple.core.action.AnswerTextAction; import dev.struchkov.godfather.simple.core.action.cmd.ReplaceCmdAction; import dev.struchkov.godfather.simple.core.service.StorylineService; -import dev.struchkov.godfather.simple.core.unit.MainUnit; -import dev.struchkov.godfather.simple.core.unit.UnitRequest; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.UnitRequest; import dev.struchkov.haiti.context.exception.NotFoundException; import java.util.HashMap; @@ -142,9 +142,7 @@ public class GeneralAutoResponder { .or(storyLineService::getDefaultUnit); if (optAnswer.isPresent()) { final MainUnit answer = optAnswer.get(); - if (checkPermission(answer.getAccessibility(), message)) { - answer(UnitRequest.of(answer, message)); - } + answer(UnitRequest.of(answer, message)); } } diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/Storyline.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/Storyline.java index 54ade5a..8ac62ce 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/Storyline.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/Storyline.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.simple.core; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.core.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import dev.struchkov.haiti.utils.Inspector; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/StorylineFactory.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/StorylineFactory.java index ebfc3cc..6ecc490 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/StorylineFactory.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/StorylineFactory.java @@ -4,7 +4,7 @@ import dev.struchkov.godfather.exception.UnitConfigException; import dev.struchkov.godfather.main.domain.UnitDefinition; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.core.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import dev.struchkov.haiti.utils.Inspector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/ActionUnit.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/ActionUnit.java index 3f7a931..fdc55f4 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/ActionUnit.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/ActionUnit.java @@ -1,8 +1,8 @@ package dev.struchkov.godfather.simple.core.action; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.core.unit.MainUnit; -import dev.struchkov.godfather.simple.core.unit.UnitRequest; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.UnitRequest; /** * Интерфейс для обработки Unit-ов. diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerCheckAction.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerCheckAction.java index 9705757..ac448e6 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerCheckAction.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerCheckAction.java @@ -2,10 +2,10 @@ package dev.struchkov.godfather.simple.core.action; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.godfather.simple.context.service.Sending; -import dev.struchkov.godfather.simple.core.unit.AnswerCheck; -import dev.struchkov.godfather.simple.core.unit.MainUnit; -import dev.struchkov.godfather.simple.core.unit.UnitRequest; import dev.struchkov.godfather.simple.domain.BoxAnswer; +import dev.struchkov.godfather.simple.domain.unit.AnswerCheck; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.UnitRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerSaveAction.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerSaveAction.java index dec3718..10f8fe8 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerSaveAction.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/AnswerSaveAction.java @@ -1,13 +1,13 @@ package dev.struchkov.godfather.simple.core.action; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.context.service.Pusher; -import dev.struchkov.godfather.simple.core.unit.AnswerSave; -import dev.struchkov.godfather.simple.core.unit.MainUnit; -import dev.struchkov.godfather.simple.core.unit.UnitRequest; -import dev.struchkov.godfather.simple.core.unit.func.CheckSave; -import dev.struchkov.godfather.simple.core.unit.func.PreservableData; -import dev.struchkov.godfather.simple.data.preser.AnswerSavePreservable; +import dev.struchkov.godfather.simple.domain.unit.AnswerSave; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.UnitRequest; +import dev.struchkov.godfather.simple.domain.unit.func.CheckSave; +import dev.struchkov.godfather.simple.domain.unit.func.PreservableData; +import dev.struchkov.godfather.simple.domain.unit.func.Pusher; +import dev.struchkov.godfather.simple.domain.unit.func.preser.AnswerSavePreservable; import static dev.struchkov.haiti.utils.Checker.checkNotNull; @@ -48,4 +48,5 @@ public class AnswerSaveAction implements ActionUnit, Message private final Sending sending; - private ActionBeforeSending actionBeforeSending; - public AnswerTextAction(Sending sending) { this.sending = sending; } - public void setActionBeforeSending(ActionBeforeSending actionBeforeSending) { - this.actionBeforeSending = actionBeforeSending; - } - @Override public UnitRequest action(UnitRequest, Message> unitRequest) { final Message message = unitRequest.getMessage(); @@ -47,15 +40,6 @@ public class AnswerTextAction implements ActionUnit, Message answer.setRecipientIfNull(message.getPersonId()); - if (checkNotNull(actionBeforeSending)) { - actionBeforeSending.execute(message.getPersonId()); - } - - final ActionBeforeSending unitActionBeforeSending = unit.getActionBeforeSending(); - if (checkNotNull(unitActionBeforeSending)) { - unitActionBeforeSending.execute(message.getPersonId()); - } - final Optional optSentBox = sending.send(answer); final CallBackConsumer callBack = unit.getCallBack(); if (checkNotNull(callBack) && optAnswer.isPresent()) { diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/ReplaceCmdAction.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/ReplaceCmdAction.java index 2c83ae1..8e5ddc4 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/ReplaceCmdAction.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/ReplaceCmdAction.java @@ -2,9 +2,9 @@ package dev.struchkov.godfather.simple.core.action.cmd; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.godfather.simple.core.action.ActionUnit; -import dev.struchkov.godfather.simple.core.unit.MainUnit; -import dev.struchkov.godfather.simple.core.unit.UnitRequest; -import dev.struchkov.godfather.simple.core.unit.cmd.ReplaceCmd; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.UnitRequest; +import dev.struchkov.godfather.simple.domain.unit.cmd.ReplaceCmd; public class ReplaceCmdAction implements ActionUnit, Message> { diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/RollBackCmdAction.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/RollBackCmdAction.java index c1eb94d..fa656c5 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/RollBackCmdAction.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/action/cmd/RollBackCmdAction.java @@ -4,9 +4,9 @@ import dev.struchkov.godfather.main.domain.StorylineHistory; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.godfather.simple.core.action.ActionUnit; import dev.struchkov.godfather.simple.core.service.StorylineService; -import dev.struchkov.godfather.simple.core.unit.MainUnit; -import dev.struchkov.godfather.simple.core.unit.UnitRequest; -import dev.struchkov.godfather.simple.core.unit.cmd.RollBackCmd; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.UnitRequest; +import dev.struchkov.godfather.simple.domain.unit.cmd.RollBackCmd; import static dev.struchkov.godfather.exception.RollBackException.rollBackException; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/pusher/UserSanderPusher.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/pusher/UserSanderPusher.java index fd53c01..d0286c3 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/pusher/UserSanderPusher.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/pusher/UserSanderPusher.java @@ -1,14 +1,13 @@ package dev.struchkov.godfather.simple.core.pusher; -import dev.struchkov.godfather.simple.context.service.Pusher; import dev.struchkov.godfather.simple.context.service.Sending; import dev.struchkov.godfather.simple.domain.BoxAnswer; +import dev.struchkov.godfather.simple.domain.unit.func.Pusher; import java.util.Map; import static dev.struchkov.godfather.simple.domain.BoxAnswer.boxAnswer; - public class UserSanderPusher implements Pusher { private final String personId; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/PersonSettingServiceImpl.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/PersonSettingServiceImpl.java index 15824b0..42bed65 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/PersonSettingServiceImpl.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/PersonSettingServiceImpl.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.simple.core.service; +import dev.struchkov.godfather.simple.context.repository.PersonSettingRepository; import dev.struchkov.godfather.simple.context.service.PersonSettingService; -import dev.struchkov.godfather.simple.data.repository.PersonSettingRepository; import dev.struchkov.haiti.utils.Inspector; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineContextMapImpl.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineContextMapImpl.java index c461962..c2df218 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineContextMapImpl.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineContextMapImpl.java @@ -1,6 +1,6 @@ package dev.struchkov.godfather.simple.core.service; -import dev.struchkov.godfather.simple.data.StorylineContext; +import dev.struchkov.godfather.simple.context.repository.StorylineContext; import dev.struchkov.haiti.utils.container.ContextKey; import org.jetbrains.annotations.NotNull; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineMailService.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineMailService.java index f0da316..6d7b414 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineMailService.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineMailService.java @@ -4,11 +4,11 @@ import dev.struchkov.autoresponder.entity.Unit; import dev.struchkov.godfather.main.domain.StorylineHistory; import dev.struchkov.godfather.main.domain.UnitPointer; import dev.struchkov.godfather.main.domain.content.Mail; +import dev.struchkov.godfather.simple.context.repository.StorylineRepository; import dev.struchkov.godfather.simple.context.service.UnitPointerService; import dev.struchkov.godfather.simple.core.Storyline; import dev.struchkov.godfather.simple.core.StorylineFactory; -import dev.struchkov.godfather.simple.core.unit.MainUnit; -import dev.struchkov.godfather.simple.data.repository.StorylineRepository; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import org.jetbrains.annotations.NotNull; import java.util.List; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineService.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineService.java index c637a17..6402225 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineService.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/StorylineService.java @@ -2,7 +2,7 @@ package dev.struchkov.godfather.simple.core.service; import dev.struchkov.godfather.main.domain.StorylineHistory; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.core.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import org.jetbrains.annotations.NotNull; import java.util.Optional; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/UnitPointerServiceImpl.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/UnitPointerServiceImpl.java index a5f28b9..e7451f3 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/UnitPointerServiceImpl.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/service/UnitPointerServiceImpl.java @@ -1,8 +1,8 @@ package dev.struchkov.godfather.simple.core.service; import dev.struchkov.godfather.main.domain.UnitPointer; +import dev.struchkov.godfather.simple.context.repository.UnitPointerRepository; import dev.struchkov.godfather.simple.context.service.UnitPointerService; -import dev.struchkov.godfather.simple.data.repository.UnitPointerRepository; import org.jetbrains.annotations.NotNull; import java.util.Optional; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/ActionBeforeSending.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/ActionBeforeSending.java deleted file mode 100644 index 747a824..0000000 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/ActionBeforeSending.java +++ /dev/null @@ -1,8 +0,0 @@ -package dev.struchkov.godfather.simple.core.unit.func; - -@FunctionalInterface -public interface ActionBeforeSending { - - void execute(String personId); - -} diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/AnswerSaveMapPreservable.java b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/AnswerSaveMapPreservable.java index 572d421..33920bd 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/AnswerSaveMapPreservable.java +++ b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/AnswerSaveMapPreservable.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.quarkus.data.repository.impl; -import dev.struchkov.godfather.quarkus.context.service.Pusher; -import dev.struchkov.godfather.quarkus.data.preser.AnswerSavePreservable; +import dev.struchkov.godfather.quarkus.domain.unit.func.Pusher; +import dev.struchkov.godfather.quarkus.domain.unit.func.preser.AnswerSavePreservable; import io.smallrye.mutiny.Uni; import java.util.HashMap; diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/PersonSettingLocalRepository.java b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/PersonSettingLocalRepository.java index 9b0a6a8..a4862c4 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/PersonSettingLocalRepository.java +++ b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/PersonSettingLocalRepository.java @@ -1,6 +1,6 @@ package dev.struchkov.godfather.quarkus.data.repository.impl; -import dev.struchkov.godfather.quarkus.data.repository.PersonSettingRepository; +import dev.struchkov.godfather.quarkus.context.repository.PersonSettingRepository; import io.smallrye.mutiny.Uni; import java.util.HashMap; diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/StorylineMapRepository.java b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/StorylineMapRepository.java index 1041eab..f86fb43 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/StorylineMapRepository.java +++ b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/StorylineMapRepository.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.quarkus.data.repository.impl; import dev.struchkov.godfather.main.domain.StorylineHistory; -import dev.struchkov.godfather.quarkus.data.repository.StorylineRepository; +import dev.struchkov.godfather.quarkus.context.repository.StorylineRepository; import io.smallrye.mutiny.Uni; import org.jetbrains.annotations.NotNull; diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/UnitPointLocalRepository.java b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/UnitPointLocalRepository.java index e32a02e..8333f5a 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/UnitPointLocalRepository.java +++ b/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/repository/impl/UnitPointLocalRepository.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.quarkus.data.repository.impl; import dev.struchkov.godfather.main.domain.UnitPointer; -import dev.struchkov.godfather.quarkus.data.repository.UnitPointerRepository; +import dev.struchkov.godfather.quarkus.context.repository.UnitPointerRepository; import io.smallrye.mutiny.Uni; import org.jetbrains.annotations.NotNull; diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/AnswerSaveMapPreservable.java b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/AnswerSaveMapPreservable.java index 11cd3d5..c8f8816 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/AnswerSaveMapPreservable.java +++ b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/AnswerSaveMapPreservable.java @@ -1,7 +1,8 @@ package dev.struchkov.godfather.simple.data.repository.impl; -import dev.struchkov.godfather.simple.context.service.Pusher; -import dev.struchkov.godfather.simple.data.preser.AnswerSavePreservable; + +import dev.struchkov.godfather.simple.domain.unit.func.Pusher; +import dev.struchkov.godfather.simple.domain.unit.func.preser.AnswerSavePreservable; import java.util.HashMap; import java.util.Map; @@ -19,7 +20,7 @@ public class AnswerSaveMapPreservable implements AnswerSavePreservable { @Override public Optional getByKey(String personId, String key) { if (saveMap.containsKey(personId) - && saveMap.get(personId).containsKey(key)) { + && saveMap.get(personId).containsKey(key)) { return Optional.of(saveMap.get(personId).get(key)); } return Optional.empty(); diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/PersonSettingLocalRepository.java b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/PersonSettingLocalRepository.java index c459817..69ed044 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/PersonSettingLocalRepository.java +++ b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/PersonSettingLocalRepository.java @@ -1,6 +1,6 @@ package dev.struchkov.godfather.simple.data.repository.impl; -import dev.struchkov.godfather.simple.data.repository.PersonSettingRepository; +import dev.struchkov.godfather.simple.context.repository.PersonSettingRepository; import java.util.HashMap; import java.util.Map; diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/StorylineMapRepository.java b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/StorylineMapRepository.java index 5b2c3a4..8620aab 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/StorylineMapRepository.java +++ b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/StorylineMapRepository.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.simple.data.repository.impl; import dev.struchkov.godfather.main.domain.StorylineHistory; -import dev.struchkov.godfather.simple.data.repository.StorylineRepository; +import dev.struchkov.godfather.simple.context.repository.StorylineRepository; import org.jetbrains.annotations.NotNull; import java.util.HashMap; diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/UnitPointLocalRepository.java b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/UnitPointLocalRepository.java index b5aac4c..29c6b03 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/UnitPointLocalRepository.java +++ b/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/repository/impl/UnitPointLocalRepository.java @@ -1,7 +1,7 @@ package dev.struchkov.godfather.simple.data.repository.impl; import dev.struchkov.godfather.main.domain.UnitPointer; -import dev.struchkov.godfather.simple.data.repository.UnitPointerRepository; +import dev.struchkov.godfather.simple.context.repository.UnitPointerRepository; import org.jetbrains.annotations.NotNull; import java.util.HashMap; diff --git a/bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core/unit/TypeUnit.java b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/unit/TypeUnit.java similarity index 84% rename from bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core/unit/TypeUnit.java rename to bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/unit/TypeUnit.java index 367728b..9a3c071 100644 --- a/bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core/unit/TypeUnit.java +++ b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/unit/TypeUnit.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.main.core.unit; +package dev.struchkov.godfather.main.domain.unit; import static dev.struchkov.haiti.utils.Exceptions.utilityClass; @@ -11,7 +11,6 @@ public class TypeUnit { public static final String TEXT = "TEXT"; public static final String SAVE = "SAVE"; - public static final String TIMER = "TIMER"; public static final String CHECK = "CHECK"; public static final String BACK_CMD = "BACK_CMD"; diff --git a/bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core/unit/UnitActiveType.java b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/unit/UnitActiveType.java similarity index 79% rename from bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core/unit/UnitActiveType.java rename to bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/unit/UnitActiveType.java index 76a70c9..42cb45a 100644 --- a/bot-core/bot-core-main/src/main/java/dev/struchkov/godfather/main/core/unit/UnitActiveType.java +++ b/bot-domain/bot-domain-main/src/main/java/dev/struchkov/godfather/main/domain/unit/UnitActiveType.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.main.core.unit; +package dev.struchkov.godfather.main.domain.unit; /** * Тип активации Unit-а. Определяет порядок обработки Unit. diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerCheck.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerCheck.java similarity index 93% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerCheck.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerCheck.java index 2943e4c..156456d 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerCheck.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerCheck.java @@ -1,12 +1,11 @@ -package dev.struchkov.godfather.quarkus.core.unit; +package dev.struchkov.godfather.quarkus.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.context.service.Accessibility; -import dev.struchkov.godfather.quarkus.core.unit.func.CheckData; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import dev.struchkov.godfather.quarkus.domain.BoxAnswer; +import dev.struchkov.godfather.quarkus.domain.unit.func.CheckData; import java.util.HashSet; import java.util.Set; @@ -60,7 +59,6 @@ public class AnswerCheck extends MainUnit { new HashSet<>(), builder.activeType, builder.notSaveHistory, - builder.accessibility, TypeUnit.CHECK ); unitTrue = builder.unitTrue; @@ -108,7 +106,6 @@ public class AnswerCheck extends MainUnit { private Integer priority; private UnitActiveType activeType; - private Accessibility accessibility; private boolean notSaveHistory; private MainUnit unitTrue; @@ -218,11 +215,6 @@ public class AnswerCheck extends MainUnit { return this; } - public Builder accessibility(Accessibility val) { - accessibility = val; - return this; - } - public Builder activeType(UnitActiveType val) { activeType = val; return this; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerSave.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerSave.java similarity index 91% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerSave.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerSave.java index 221618f..3fdc40a 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerSave.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerSave.java @@ -1,14 +1,13 @@ -package dev.struchkov.godfather.quarkus.core.unit; +package dev.struchkov.godfather.quarkus.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.context.service.Accessibility; -import dev.struchkov.godfather.quarkus.context.service.Pusher; -import dev.struchkov.godfather.quarkus.core.unit.func.CheckSave; -import dev.struchkov.godfather.quarkus.core.unit.func.PreservableData; -import dev.struchkov.godfather.quarkus.data.preser.AnswerSavePreservable; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; +import dev.struchkov.godfather.quarkus.domain.unit.func.CheckSave; +import dev.struchkov.godfather.quarkus.domain.unit.func.PreservableData; +import dev.struchkov.godfather.quarkus.domain.unit.func.Pusher; +import dev.struchkov.godfather.quarkus.domain.unit.func.preser.AnswerSavePreservable; import java.util.Collection; import java.util.HashSet; @@ -67,7 +66,6 @@ public class AnswerSave extends MainUnit { builder.nextUnits, (builder.hidden) ? UnitActiveType.AFTER : UnitActiveType.DEFAULT, builder.notSaveHistory, - builder.accessibility, TypeUnit.SAVE ); maintenanceNextUnit(nextUnits); @@ -126,7 +124,6 @@ public class AnswerSave extends MainUnit { private Integer matchThreshold; private Integer priority; - private Accessibility accessibility; private boolean notSaveHistory; private AnswerSavePreservable preservable; @@ -260,11 +257,6 @@ public class AnswerSave extends MainUnit { return this; } - public Builder accessibility(Accessibility val) { - accessibility = val; - return this; - } - public Builder notSaveHistory() { notSaveHistory = true; return this; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerText.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerText.java similarity index 86% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerText.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerText.java index 591d0c6..223ea6b 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/AnswerText.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/AnswerText.java @@ -1,14 +1,12 @@ -package dev.struchkov.godfather.quarkus.core.unit; +package dev.struchkov.godfather.quarkus.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.context.service.Accessibility; -import dev.struchkov.godfather.quarkus.core.unit.func.ActionBeforeSending; -import dev.struchkov.godfather.quarkus.core.unit.func.CallBackConsumer; -import dev.struchkov.godfather.quarkus.core.unit.func.ProcessingData; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import dev.struchkov.godfather.quarkus.domain.BoxAnswer; +import dev.struchkov.godfather.quarkus.domain.unit.func.CallBackConsumer; +import dev.struchkov.godfather.quarkus.domain.unit.func.ProcessingData; import io.smallrye.mutiny.Uni; import java.util.HashSet; @@ -39,8 +37,6 @@ public class AnswerText extends MainUnit { */ private final CallBackConsumer callBack; - private final ActionBeforeSending actionBeforeSending; - private AnswerText(Builder builder) { super( builder.name, @@ -54,12 +50,10 @@ public class AnswerText extends MainUnit { builder.nextUnits, builder.activeType, builder.notSaveHistory, - builder.accessibility, TypeUnit.TEXT ); answer = builder.boxAnswer; callBack = builder.callBack; - actionBeforeSending = builder.actionBeforeSending; } public static AnswerText of(String message) { @@ -82,10 +76,6 @@ public class AnswerText extends MainUnit { return callBack; } - public ActionBeforeSending getActionBeforeSending() { - return actionBeforeSending; - } - public static final class Builder { private String name = UUID.randomUUID().toString(); @@ -101,12 +91,10 @@ public class AnswerText extends MainUnit { private Integer priority; private UnitActiveType activeType; - private Accessibility accessibility; private boolean notSaveHistory; private ProcessingData boxAnswer; private CallBackConsumer callBack; - private ActionBeforeSending actionBeforeSending; private Builder() { } @@ -149,11 +137,6 @@ public class AnswerText extends MainUnit { return this; } - public Builder actionBeforeSending(ActionBeforeSending action) { - this.actionBeforeSending = action; - return this; - } - public Builder triggerWords(Set val) { if (triggerWords == null) { triggerWords = new HashSet<>(); @@ -235,11 +218,6 @@ public class AnswerText extends MainUnit { return this; } - public Builder accessibility(Accessibility val) { - accessibility = val; - return this; - } - public Builder notSaveHistory() { notSaveHistory = true; return this; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/MainUnit.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/MainUnit.java similarity index 84% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/MainUnit.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/MainUnit.java index 5542f75..6ebc83e 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/MainUnit.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/MainUnit.java @@ -1,10 +1,9 @@ -package dev.struchkov.godfather.simple.core.unit; +package dev.struchkov.godfather.quarkus.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; import dev.struchkov.autoresponder.entity.Unit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.context.service.Accessibility; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import java.util.Objects; import java.util.Optional; @@ -39,11 +38,6 @@ public abstract class MainUnit extends Unit, M> { */ protected UnitActiveType activeType; - /** - * Проверка доступа пользователя к юниту. - */ - private final Accessibility accessibility; - private final boolean notSaveHistory; protected MainUnit( @@ -58,14 +52,12 @@ public abstract class MainUnit extends Unit, M> { Set> nextUnits, UnitActiveType activeType, boolean notSaveHistory, - Accessibility accessibility, String type ) { super(keyWords, phrases, triggerCheck, patterns, matchThreshold, priority, nextUnits); this.name = name; this.description = description; this.activeType = Optional.ofNullable(activeType).orElse(UnitActiveType.DEFAULT); - this.accessibility = accessibility; this.type = type; this.notSaveHistory = notSaveHistory; } @@ -94,10 +86,6 @@ public abstract class MainUnit extends Unit, M> { return notSaveHistory; } - public Optional getAccessibility() { - return Optional.ofNullable(accessibility); - } - public String getDescription() { return description; } diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/UnitRequest.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/UnitRequest.java similarity index 93% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/UnitRequest.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/UnitRequest.java index 303303c..18dc450 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/UnitRequest.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/UnitRequest.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.core.unit; +package dev.struchkov.godfather.quarkus.domain.unit; import dev.struchkov.godfather.main.domain.content.Message; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/cmd/ReplaceCmd.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/cmd/ReplaceCmd.java similarity index 94% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/cmd/ReplaceCmd.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/cmd/ReplaceCmd.java index 191c58d..f09d4c9 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/cmd/ReplaceCmd.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/cmd/ReplaceCmd.java @@ -1,10 +1,10 @@ -package dev.struchkov.godfather.simple.core.unit.cmd; +package dev.struchkov.godfather.quarkus.domain.unit.cmd; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.core.unit.MainUnit; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; import dev.struchkov.haiti.utils.Checker; import java.util.HashSet; @@ -31,7 +31,6 @@ public class ReplaceCmd extends MainUnit { new HashSet<>(), builder.activeType, true, - null, TypeUnit.REPLACE_CMD ); this.thisUnit = builder.thisUnit; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/cmd/RollBackCmd.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/cmd/RollBackCmd.java similarity index 96% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/cmd/RollBackCmd.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/cmd/RollBackCmd.java index 6330e76..76415f0 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/cmd/RollBackCmd.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/cmd/RollBackCmd.java @@ -1,11 +1,11 @@ -package dev.struchkov.godfather.quarkus.core.unit.cmd; +package dev.struchkov.godfather.quarkus.domain.unit.cmd; import dev.struchkov.autoresponder.entity.KeyWord; import dev.struchkov.godfather.exception.UnitConfigException; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; import java.util.HashSet; import java.util.Set; @@ -44,7 +44,6 @@ public class RollBackCmd extends MainUnit { new HashSet<>(), builder.activeType, true, - null, TypeUnit.BACK_CMD ); this.countBack = builder.countBack; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CallBackConsumer.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CallBackConsumer.java similarity index 76% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CallBackConsumer.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CallBackConsumer.java index de1ac72..c8dbac8 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CallBackConsumer.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CallBackConsumer.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.core.unit.func; +package dev.struchkov.godfather.quarkus.domain.unit.func; import dev.struchkov.godfather.quarkus.domain.SentBox; import io.smallrye.mutiny.Uni; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CheckData.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CheckData.java similarity index 77% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CheckData.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CheckData.java index 73d6251..1e04aab 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CheckData.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CheckData.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.core.unit.func; +package dev.struchkov.godfather.quarkus.domain.unit.func; import dev.struchkov.godfather.main.domain.content.Message; import io.smallrye.mutiny.Uni; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CheckSave.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CheckSave.java similarity index 72% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CheckSave.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CheckSave.java index b4931fc..e091b02 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/CheckSave.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/CheckSave.java @@ -1,7 +1,7 @@ -package dev.struchkov.godfather.quarkus.core.unit.func; +package dev.struchkov.godfather.quarkus.domain.unit.func; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; +import dev.struchkov.godfather.quarkus.domain.unit.MainUnit; import io.smallrye.mutiny.Uni; /** diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/PreservableData.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/PreservableData.java similarity index 78% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/PreservableData.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/PreservableData.java index 9004497..6b3686e 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/PreservableData.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/PreservableData.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.core.unit.func; +package dev.struchkov.godfather.quarkus.domain.unit.func; import dev.struchkov.godfather.main.domain.content.Message; import io.smallrye.mutiny.Uni; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/ProcessingData.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/ProcessingData.java similarity index 76% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/ProcessingData.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/ProcessingData.java index 3d457a4..d14b7ba 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/func/ProcessingData.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/ProcessingData.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.core.unit.func; +package dev.struchkov.godfather.quarkus.domain.unit.func; import dev.struchkov.godfather.quarkus.domain.BoxAnswer; import io.smallrye.mutiny.Uni; diff --git a/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/Pusher.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/Pusher.java similarity index 82% rename from bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/Pusher.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/Pusher.java index 13cab48..9b2c8f9 100644 --- a/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/Pusher.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/Pusher.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.context.service; +package dev.struchkov.godfather.quarkus.domain.unit.func; import io.smallrye.mutiny.Uni; diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/preser/AnswerSavePreservable.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/preser/AnswerSavePreservable.java similarity index 75% rename from bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/preser/AnswerSavePreservable.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/preser/AnswerSavePreservable.java index 729caa1..3dbe3c6 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/preser/AnswerSavePreservable.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/preser/AnswerSavePreservable.java @@ -1,6 +1,6 @@ -package dev.struchkov.godfather.quarkus.data.preser; +package dev.struchkov.godfather.quarkus.domain.unit.func.preser; -import dev.struchkov.godfather.quarkus.context.service.Pusher; +import dev.struchkov.godfather.quarkus.domain.unit.func.Pusher; import io.smallrye.mutiny.Uni; public interface AnswerSavePreservable extends Preservable { diff --git a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/preser/Preservable.java b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/preser/Preservable.java similarity index 91% rename from bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/preser/Preservable.java rename to bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/preser/Preservable.java index 5583a6b..316f6ce 100644 --- a/bot-data/bot-data-quarkus/src/main/java/dev/struchkov/godfather/quarkus/data/preser/Preservable.java +++ b/bot-domain/bot-domain-quarkus/src/main/java/dev/struchkov/godfather/quarkus/domain/unit/func/preser/Preservable.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.data.preser; +package dev.struchkov.godfather.quarkus.domain.unit.func.preser; import io.smallrye.mutiny.Uni; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerCheck.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerCheck.java similarity index 93% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerCheck.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerCheck.java index 161f844..2bcbc7f 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerCheck.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerCheck.java @@ -1,12 +1,11 @@ -package dev.struchkov.godfather.simple.core.unit; +package dev.struchkov.godfather.simple.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.context.service.Accessibility; -import dev.struchkov.godfather.simple.core.unit.func.CheckData; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import dev.struchkov.godfather.simple.domain.BoxAnswer; +import dev.struchkov.godfather.simple.domain.unit.func.CheckData; import java.util.HashSet; import java.util.Set; @@ -60,7 +59,6 @@ public class AnswerCheck extends MainUnit { new HashSet<>(), builder.activeType, builder.notSaveHistory, - builder.accessibility, TypeUnit.CHECK ); unitTrue = builder.unitTrue; @@ -108,7 +106,6 @@ public class AnswerCheck extends MainUnit { private Integer priority; private UnitActiveType activeType; - private Accessibility accessibility; private boolean notSaveHistory; private MainUnit unitTrue; @@ -218,11 +215,6 @@ public class AnswerCheck extends MainUnit { return this; } - public Builder accessibility(Accessibility val) { - accessibility = val; - return this; - } - public Builder activeType(UnitActiveType val) { activeType = val; return this; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerSave.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerSave.java similarity index 91% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerSave.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerSave.java index 86f5d38..2c46251 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerSave.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerSave.java @@ -1,14 +1,13 @@ -package dev.struchkov.godfather.simple.core.unit; +package dev.struchkov.godfather.simple.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.context.service.Accessibility; -import dev.struchkov.godfather.simple.context.service.Pusher; -import dev.struchkov.godfather.simple.core.unit.func.CheckSave; -import dev.struchkov.godfather.simple.core.unit.func.PreservableData; -import dev.struchkov.godfather.simple.data.preser.AnswerSavePreservable; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; +import dev.struchkov.godfather.simple.domain.unit.func.CheckSave; +import dev.struchkov.godfather.simple.domain.unit.func.PreservableData; +import dev.struchkov.godfather.simple.domain.unit.func.Pusher; +import dev.struchkov.godfather.simple.domain.unit.func.preser.AnswerSavePreservable; import dev.struchkov.haiti.utils.Checker; import java.util.Collection; @@ -66,7 +65,6 @@ public class AnswerSave extends MainUnit { builder.nextUnits, (builder.hidden) ? UnitActiveType.AFTER : UnitActiveType.DEFAULT, builder.notSaveHistory, - builder.accessibility, TypeUnit.SAVE ); maintenanceNextUnit(nextUnits); @@ -88,9 +86,6 @@ public class AnswerSave extends MainUnit { } } - public AnswerSavePreservable getPreservable() { - return preservable; - } public String getKey() { return key; @@ -112,7 +107,12 @@ public class AnswerSave extends MainUnit { return checkSave; } + public AnswerSavePreservable getPreservable() { + return preservable; + } + public static final class Builder { + private String name = UUID.randomUUID().toString(); private String description; private Set> nextUnits; @@ -125,7 +125,6 @@ public class AnswerSave extends MainUnit { private Integer matchThreshold; private Integer priority; - private Accessibility accessibility; private boolean notSaveHistory; private AnswerSavePreservable preservable; @@ -259,11 +258,6 @@ public class AnswerSave extends MainUnit { return this; } - public Builder accessibility(Accessibility val) { - accessibility = val; - return this; - } - public Builder notSaveHistory() { notSaveHistory = true; return this; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerText.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerText.java similarity index 86% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerText.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerText.java index b6c0f26..0f1caf4 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/AnswerText.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/AnswerText.java @@ -1,14 +1,12 @@ -package dev.struchkov.godfather.simple.core.unit; +package dev.struchkov.godfather.simple.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.context.service.Accessibility; -import dev.struchkov.godfather.simple.core.unit.func.ActionBeforeSending; -import dev.struchkov.godfather.simple.core.unit.func.CallBackConsumer; -import dev.struchkov.godfather.simple.core.unit.func.ProcessingData; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import dev.struchkov.godfather.simple.domain.BoxAnswer; +import dev.struchkov.godfather.simple.domain.unit.func.CallBackConsumer; +import dev.struchkov.godfather.simple.domain.unit.func.ProcessingData; import java.util.HashSet; import java.util.List; @@ -36,8 +34,6 @@ public class AnswerText extends MainUnit { private final CallBackConsumer callBack; - private final ActionBeforeSending actionBeforeSending; - private AnswerText(Builder builder) { super( builder.name, @@ -51,12 +47,10 @@ public class AnswerText extends MainUnit { builder.nextUnits, builder.activeType, builder.notSaveHistory, - builder.accessibility, TypeUnit.TEXT ); answer = builder.boxAnswer; callBack = builder.callBack; - actionBeforeSending = builder.actionBeforeSending; } public static AnswerText of(String message) { @@ -79,10 +73,6 @@ public class AnswerText extends MainUnit { return callBack; } - public ActionBeforeSending getActionBeforeSending() { - return actionBeforeSending; - } - public static final class Builder { private String name = UUID.randomUUID().toString(); @@ -98,12 +88,10 @@ public class AnswerText extends MainUnit { private Integer priority; private UnitActiveType activeType; - private Accessibility accessibility; private boolean notSaveHistory; private ProcessingData boxAnswer; private CallBackConsumer callBack; - private ActionBeforeSending actionBeforeSending; private Builder() { } @@ -146,11 +134,6 @@ public class AnswerText extends MainUnit { return this; } - public Builder actionBeforeSending(ActionBeforeSending action) { - this.actionBeforeSending = action; - return this; - } - public Builder triggerWords(Set val) { if (triggerWords == null) { triggerWords = new HashSet<>(); @@ -232,11 +215,6 @@ public class AnswerText extends MainUnit { return this; } - public Builder accessibility(Accessibility val) { - accessibility = val; - return this; - } - public Builder notSaveHistory() { notSaveHistory = true; return this; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/MainUnit.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/MainUnit.java similarity index 84% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/MainUnit.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/MainUnit.java index 0cbc19c..7b5a375 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/MainUnit.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/MainUnit.java @@ -1,10 +1,9 @@ -package dev.struchkov.godfather.quarkus.core.unit; +package dev.struchkov.godfather.simple.domain.unit; import dev.struchkov.autoresponder.entity.KeyWord; import dev.struchkov.autoresponder.entity.Unit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.context.service.Accessibility; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; import java.util.Objects; import java.util.Optional; @@ -39,11 +38,6 @@ public abstract class MainUnit extends Unit, M> { */ protected UnitActiveType activeType; - /** - * Проверка доступа пользователя к юниту. - */ - private final Accessibility accessibility; - private final boolean notSaveHistory; protected MainUnit( @@ -58,14 +52,12 @@ public abstract class MainUnit extends Unit, M> { Set> nextUnits, UnitActiveType activeType, boolean notSaveHistory, - Accessibility accessibility, String type ) { super(keyWords, phrases, triggerCheck, patterns, matchThreshold, priority, nextUnits); this.name = name; this.description = description; this.activeType = Optional.ofNullable(activeType).orElse(UnitActiveType.DEFAULT); - this.accessibility = accessibility; this.type = type; this.notSaveHistory = notSaveHistory; } @@ -94,10 +86,6 @@ public abstract class MainUnit extends Unit, M> { return notSaveHistory; } - public Optional getAccessibility() { - return Optional.ofNullable(accessibility); - } - public String getDescription() { return description; } diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/UnitRequest.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/UnitRequest.java similarity index 93% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/UnitRequest.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/UnitRequest.java index 30b36d6..68828af 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/UnitRequest.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/UnitRequest.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.quarkus.core.unit; +package dev.struchkov.godfather.simple.domain.unit; import dev.struchkov.godfather.main.domain.content.Message; diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/cmd/ReplaceCmd.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/cmd/ReplaceCmd.java similarity index 94% rename from bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/cmd/ReplaceCmd.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/cmd/ReplaceCmd.java index 84c2431..d1d960a 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/unit/cmd/ReplaceCmd.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/cmd/ReplaceCmd.java @@ -1,10 +1,10 @@ -package dev.struchkov.godfather.quarkus.core.unit.cmd; +package dev.struchkov.godfather.simple.domain.unit.cmd; import dev.struchkov.autoresponder.entity.KeyWord; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.quarkus.core.unit.MainUnit; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import dev.struchkov.haiti.utils.Checker; import java.util.HashSet; @@ -31,7 +31,6 @@ public class ReplaceCmd extends MainUnit { new HashSet<>(), builder.activeType, true, - null, TypeUnit.REPLACE_CMD ); this.thisUnit = builder.thisUnit; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/cmd/RollBackCmd.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/cmd/RollBackCmd.java similarity index 94% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/cmd/RollBackCmd.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/cmd/RollBackCmd.java index 5cd421b..701cd35 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/cmd/RollBackCmd.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/cmd/RollBackCmd.java @@ -1,11 +1,11 @@ -package dev.struchkov.godfather.simple.core.unit.cmd; +package dev.struchkov.godfather.simple.domain.unit.cmd; import dev.struchkov.autoresponder.entity.KeyWord; import dev.struchkov.godfather.exception.UnitConfigException; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.core.unit.UnitActiveType; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.core.unit.MainUnit; +import dev.struchkov.godfather.main.domain.unit.TypeUnit; +import dev.struchkov.godfather.main.domain.unit.UnitActiveType; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import java.util.HashSet; import java.util.Set; @@ -44,15 +44,14 @@ public class RollBackCmd extends MainUnit { new HashSet<>(), builder.activeType, true, - null, TypeUnit.BACK_CMD ); this.countBack = builder.countBack; this.rollbackUnitName = builder.rollbackUnitName; } - public static RollBackCmd.Builder builder() { - return new RollBackCmd.Builder<>(); + public static Builder builder() { + return new Builder<>(); } public static RollBackCmd rollBack(int countToBack) { @@ -84,6 +83,7 @@ public class RollBackCmd extends MainUnit { } public static final class Builder { + private String name = UUID.randomUUID().toString(); private String description; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CallBackConsumer.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CallBackConsumer.java similarity index 73% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CallBackConsumer.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CallBackConsumer.java index 58b698c..6b2519b 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CallBackConsumer.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CallBackConsumer.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.core.unit.func; +package dev.struchkov.godfather.simple.domain.unit.func; import dev.struchkov.godfather.simple.domain.SentBox; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CheckData.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CheckData.java similarity index 74% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CheckData.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CheckData.java index b2f8d8f..db09e06 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CheckData.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CheckData.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.core.unit.func; +package dev.struchkov.godfather.simple.domain.unit.func; import dev.struchkov.godfather.main.domain.content.Message; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CheckSave.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CheckSave.java similarity index 70% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CheckSave.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CheckSave.java index 53b2480..b0fd1e3 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/CheckSave.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/CheckSave.java @@ -1,7 +1,7 @@ -package dev.struchkov.godfather.simple.core.unit.func; +package dev.struchkov.godfather.simple.domain.unit.func; import dev.struchkov.godfather.main.domain.content.Message; -import dev.struchkov.godfather.simple.core.unit.MainUnit; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; /** * TODO: Добавить описание интерфейса. diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/PreservableData.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/PreservableData.java similarity index 74% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/PreservableData.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/PreservableData.java index ceb3d78..740f219 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/PreservableData.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/PreservableData.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.core.unit.func; +package dev.struchkov.godfather.simple.domain.unit.func; import dev.struchkov.godfather.main.domain.content.Message; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/PreservableDataSimple.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/PreservableDataSimple.java similarity index 91% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/PreservableDataSimple.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/PreservableDataSimple.java index df8f09a..e6e7c14 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/PreservableDataSimple.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/PreservableDataSimple.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.core.unit.func; +package dev.struchkov.godfather.simple.domain.unit.func; import dev.struchkov.godfather.main.domain.content.Message; import dev.struchkov.haiti.utils.container.Pair; diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/ProcessingData.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/ProcessingData.java similarity index 77% rename from bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/ProcessingData.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/ProcessingData.java index a3de325..1342ba4 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/unit/func/ProcessingData.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/ProcessingData.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.core.unit.func; +package dev.struchkov.godfather.simple.domain.unit.func; import dev.struchkov.godfather.simple.domain.BoxAnswer; diff --git a/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service/Pusher.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/Pusher.java similarity index 80% rename from bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service/Pusher.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/Pusher.java index d934f5a..8eeb820 100644 --- a/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service/Pusher.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/Pusher.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.context.service; +package dev.struchkov.godfather.simple.domain.unit.func; import java.util.Map; diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/preser/AnswerSavePreservable.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/preser/AnswerSavePreservable.java similarity index 73% rename from bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/preser/AnswerSavePreservable.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/preser/AnswerSavePreservable.java index 8f0df33..e765f83 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/preser/AnswerSavePreservable.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/preser/AnswerSavePreservable.java @@ -1,6 +1,6 @@ -package dev.struchkov.godfather.simple.data.preser; +package dev.struchkov.godfather.simple.domain.unit.func.preser; -import dev.struchkov.godfather.simple.context.service.Pusher; +import dev.struchkov.godfather.simple.domain.unit.func.Pusher; public interface AnswerSavePreservable extends Preservable { diff --git a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/preser/Preservable.java b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/preser/Preservable.java similarity index 91% rename from bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/preser/Preservable.java rename to bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/preser/Preservable.java index 5f418b8..dfa04d5 100644 --- a/bot-data/bot-data-simple/src/main/java/dev/struchkov/godfather/simple/data/preser/Preservable.java +++ b/bot-domain/bot-domain-simple/src/main/java/dev/struchkov/godfather/simple/domain/unit/func/preser/Preservable.java @@ -1,4 +1,4 @@ -package dev.struchkov.godfather.simple.data.preser; +package dev.struchkov.godfather.simple.domain.unit.func.preser; import java.util.Map; import java.util.Optional;