From 7f632d2b6e229a72f61a77e8cd012d34a31e7e30 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Fri, 14 Apr 2023 16:36:46 +0200 Subject: [PATCH] chore: add FIXME before PR merge --- .../polpetta/mezzotre/i18n/TemplateContentGenerator.java | 1 + .../polpetta/mezzotre/orm/CallbackQueryContextCleaner.java | 1 + .../com/github/polpetta/mezzotre/orm/telegram/ChatUtil.java | 6 ------ .../polpetta/mezzotre/telegram/callbackquery/Field.java | 1 + .../polpetta/mezzotre/telegram/callbackquery/NotFound.java | 1 + .../polpetta/mezzotre/telegram/callbackquery/Processor.java | 1 + .../polpetta/mezzotre/telegram/command/Processor.java | 4 ++-- .../com/github/polpetta/mezzotre/util/ServiceModule.java | 1 + 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/github/polpetta/mezzotre/i18n/TemplateContentGenerator.java b/src/main/java/com/github/polpetta/mezzotre/i18n/TemplateContentGenerator.java index bb98afe..4e00a02 100644 --- a/src/main/java/com/github/polpetta/mezzotre/i18n/TemplateContentGenerator.java +++ b/src/main/java/com/github/polpetta/mezzotre/i18n/TemplateContentGenerator.java @@ -8,6 +8,7 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.tools.ToolManager; import org.apache.velocity.util.StringBuilderWriter; +// FIXME doc, tests public class TemplateContentGenerator { private final LocalizedMessageFactory localizedMessageFactory; diff --git a/src/main/java/com/github/polpetta/mezzotre/orm/CallbackQueryContextCleaner.java b/src/main/java/com/github/polpetta/mezzotre/orm/CallbackQueryContextCleaner.java index 0119168..190e664 100644 --- a/src/main/java/com/github/polpetta/mezzotre/orm/CallbackQueryContextCleaner.java +++ b/src/main/java/com/github/polpetta/mezzotre/orm/CallbackQueryContextCleaner.java @@ -8,6 +8,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.slf4j.Logger; +// FIXME tests, doc @Singleton public class CallbackQueryContextCleaner { diff --git a/src/main/java/com/github/polpetta/mezzotre/orm/telegram/ChatUtil.java b/src/main/java/com/github/polpetta/mezzotre/orm/telegram/ChatUtil.java index b722f2b..4fc26fd 100644 --- a/src/main/java/com/github/polpetta/mezzotre/orm/telegram/ChatUtil.java +++ b/src/main/java/com/github/polpetta/mezzotre/orm/telegram/ChatUtil.java @@ -2,7 +2,6 @@ package com.github.polpetta.mezzotre.orm.telegram; import com.github.polpetta.mezzotre.orm.model.CallbackQueryContext; import com.github.polpetta.mezzotre.orm.model.TgChat; -import com.github.polpetta.mezzotre.orm.model.query.QCallbackQueryContext; import com.github.polpetta.mezzotre.orm.model.query.QTgChat; import com.github.polpetta.mezzotre.util.Clock; import com.github.polpetta.types.json.ChatContext; @@ -81,9 +80,4 @@ public class ChatUtil { .filter(chatId -> chatId != 0L && chatId != Long.MIN_VALUE) .flatMap(chatId -> new QTgChat().id.eq(chatId).findOneOrEmpty()); } - - public T cleanCallbackQuery(T toReturn, CallbackQueryContext callbackQueryContext) { - new QCallbackQueryContext().entryGroup.eq(callbackQueryContext.getId()).delete(); - return toReturn; - } } diff --git a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Field.java b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Field.java index e2a485d..f66a1eb 100644 --- a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Field.java +++ b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Field.java @@ -1,5 +1,6 @@ package com.github.polpetta.mezzotre.telegram.callbackquery; +// FIXME doc public interface Field { /** * Additional fields that are related to {@code changeLanguage} event diff --git a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/NotFound.java b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/NotFound.java index b63a9bd..a35720d 100644 --- a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/NotFound.java +++ b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/NotFound.java @@ -10,6 +10,7 @@ import java.util.concurrent.CompletableFuture; import javax.inject.Inject; import org.slf4j.Logger; +// FIXME doc public class NotFound implements Processor { private final Logger log; diff --git a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Processor.java b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Processor.java index 020d1d6..ecba2a4 100644 --- a/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Processor.java +++ b/src/main/java/com/github/polpetta/mezzotre/telegram/callbackquery/Processor.java @@ -23,6 +23,7 @@ public interface Processor { */ String getEventName(); + // FIXME javadoc default boolean canBeDirectlyInvokedByTheUser() { return false; } diff --git a/src/main/java/com/github/polpetta/mezzotre/telegram/command/Processor.java b/src/main/java/com/github/polpetta/mezzotre/telegram/command/Processor.java index ed5f028..c9a6216 100644 --- a/src/main/java/com/github/polpetta/mezzotre/telegram/command/Processor.java +++ b/src/main/java/com/github/polpetta/mezzotre/telegram/command/Processor.java @@ -17,10 +17,10 @@ import java.util.concurrent.CompletableFuture; public interface Processor { /** - * Provides the keyword to trigger this executor. Note that it must start with "/" at the + * Provides the keywords to trigger this executor. Note that it must start with "/" at the * beginning, e.g. {@code /start}. * - * @return a {@link String} providing the keyword to trigger the current {@link Processor} + * @return a {@link Set} providing the keywords to trigger the current {@link Processor} */ Set getTriggerKeywords(); diff --git a/src/main/java/com/github/polpetta/mezzotre/util/ServiceModule.java b/src/main/java/com/github/polpetta/mezzotre/util/ServiceModule.java index e725c4d..e9db94d 100644 --- a/src/main/java/com/github/polpetta/mezzotre/util/ServiceModule.java +++ b/src/main/java/com/github/polpetta/mezzotre/util/ServiceModule.java @@ -13,6 +13,7 @@ import javax.inject.Inject; import javax.inject.Named; import org.jetbrains.annotations.NotNull; +// FIXME doc, tests(?) public class ServiceModule implements Extension { private final ServiceManager serviceManager;