From a36a884ae932ea8ea0fb545f9d3856f9f887af2f Mon Sep 17 00:00:00 2001 From: Sheldan <5037282+Sheldan@users.noreply.github.com> Date: Fri, 12 Mar 2021 23:43:52 +0100 Subject: [PATCH] [AB-199] adding build of sources and javadoc fixing javadoc as various places adding release plugin adding developer connection to scm updating release pipeline to new action versions --- .github/workflows/release.yml | 18 +++++------ .../service/AssignableRolePlaceService.java | 6 ++++ .../AssignableRoleManagementService.java | 6 ++-- ...ignableRolePlacePostManagementService.java | 2 +- .../database/LeaderBoardEntryResult.java | 4 +++ .../service/AUserExperienceService.java | 1 + .../management/MuteManagementService.java | 3 +- .../service/ModMailThreadServiceBean.java | 19 ++++++++++-- .../template/ModMailClosingHeaderModel.java | 2 +- .../modmail/service/ModMailThreadService.java | 11 ++++++- .../ModMailMessageManagementService.java | 2 +- .../emote/model/EmoteStatsModel.java | 1 + .../emote/model/EmoteStatsResult.java | 6 ++-- abstracto-application/bundle/pom.xml | 12 ------- .../config/FreemarkerConfiguration.java | 2 ++ .../EffectiveTemplateManagementService.java | 11 +++++-- abstracto-application/documentation/pom.xml | 1 - abstracto-application/pom.xml | 31 ++++++++++++++++++- .../service/SchedulerStartupService.java | 1 + 19 files changed, 99 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5c4227c2..5d872ca12 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,20 +15,16 @@ jobs: java-version: 1.8 - name: Load current version id: version - run: echo "::set-output name=version::$(mvn --file abstracto-application/pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" + run: echo "version=$(mvn --file abstracto-application/pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV - name: Publish to GitHub Packages run: mvn --file abstracto-application/pom.xml -B deploy -P documentation,deployment-docker -Dmaven.wagon.http.pool=false -DskipTests=true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install SSH Client - uses: webfactory/ssh-agent@v0.3.0 - with: - ssh-private-key: ${{ secrets.ACTIONS_DEPLOY_KEY }} - name: Deploy documentation to GitHub pages - uses: JamesIves/github-pages-deploy-action@releases/v3 + uses: JamesIves/github-pages-deploy-action@4.1.0 with: - REPOSITORY_NAME: Sheldan/abstracto-docs - TARGET_FOLDER: docs/${{ steps.version.outputs.version }} - BRANCH: master - SSH: true - FOLDER: abstracto-application/documentation/target/generated-docs \ No newline at end of file + repository-name: Sheldan/abstracto-docs + target-folder: docs/${{ env.version }} + branch: master + ssh-key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + folder: abstracto-application/documentation/target/generated-docs \ No newline at end of file diff --git a/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/AssignableRolePlaceService.java b/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/AssignableRolePlaceService.java index 9602dad3c..791bbeb69 100644 --- a/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/AssignableRolePlaceService.java +++ b/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/AssignableRolePlaceService.java @@ -213,6 +213,7 @@ public interface AssignableRolePlaceService { * @param server The {@link AServer server} in which the {@link AssignableRolePlace place} is * @param name The key of the {@link AssignableRolePlace place} * @param newValue The new vale of the inline attribute + * @return A {@link CompletableFuture future} which completes when the config has been updated, or when the message was edited (if the posts already exist) */ CompletableFuture setAssignablePlaceInlineTo(AServer server, String name, Boolean newValue); @@ -222,6 +223,7 @@ public interface AssignableRolePlaceService { * are any. * @param server The {@link AServer server} in which the {@link AssignableRolePlace place} is * @param name The key of the {@link AssignableRolePlace place} to inline + * @return A {@link CompletableFuture future} which completes when the config has been updated, or when the message was edited (if the posts already exist) */ CompletableFuture inlineAssignableRolePlace(AServer server, String name); @@ -229,6 +231,7 @@ public interface AssignableRolePlaceService { * Sets the inline attribute of the {@link AssignableRolePlace place} to true. This method will update any existing * {@link AssignableRolePlacePost posts} of the place, if there are any. * @param place The {@link AssignableRolePlace place} to inline + * @return A {@link CompletableFuture future} which completes when the config has been updated, or when the message was edited (if the posts already exist) */ CompletableFuture inlineAssignableRolePlace(AssignableRolePlace place); @@ -238,6 +241,7 @@ public interface AssignableRolePlaceService { * are any. * @param server The {@link AServer server} in which the {@link AssignableRolePlace place} is * @param name The key of the {@link AssignableRolePlace place} to spread + * @return A {@link CompletableFuture future} which completes when the config has been updated, or when the message was edited (if the posts already exist) */ CompletableFuture spreadAssignableRolePlace(AServer server, String name); @@ -245,6 +249,7 @@ public interface AssignableRolePlaceService { * Sets the inline attribute of the {@link AssignableRolePlace place} to false. This method will update any existing * {@link AssignableRolePlacePost posts} of the place, if there are any. * @param place The {@link AssignableRolePlace place} to spread + * @return A {@link CompletableFuture future} which completes when the config has been updated, or when the message was edited (if the posts already exist) */ CompletableFuture spreadAssignableRolePlace(AssignableRolePlace place); @@ -389,6 +394,7 @@ public interface AssignableRolePlaceService { * @param server The {@link AServer server} in which the {@link AssignableRolePlace place} is * @param name The key of the {@link AssignableRolePlace place} * @param newText The new value for the text attribute displayed in the first {@link AssignableRolePlacePost post} + * @return A {@link CompletableFuture future} which completes when the config has been updated, or when the message was edited (if the posts already exist) */ CompletableFuture changeTextAsync(AServer server, String name, String newText); diff --git a/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRoleManagementService.java b/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRoleManagementService.java index a77b4aadf..96ec0b0e9 100644 --- a/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRoleManagementService.java +++ b/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRoleManagementService.java @@ -59,9 +59,9 @@ public interface AssignableRoleManagementService { /** * Returns the respective {@link AssignableRole assignableRole} for the {@link CachedEmote emote} which is part of the * {@link AssignableRolePlace place}. It will throw an exception, if the {@link CachedEmote emote} is not used. - * @param cachedEmote - * @param assignableRolePlace - * @return + * @param cachedEmote The {@link CachedEmote emote} which should be used to identify the {@link AssignableRole role} + * @param assignableRolePlace The {@link AssignableRolePlace place} from which the {@link AssignableRole role} should be retrieved for + * @return An instance of {@link AssignableRole role} which was in the place and identified by the emote */ AssignableRole getRoleForReactionEmote(CachedEmote cachedEmote, AssignableRolePlace assignableRolePlace); } diff --git a/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRolePlacePostManagementService.java b/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRolePlacePostManagementService.java index f4cddb112..ceb0dd1ba 100644 --- a/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRolePlacePostManagementService.java +++ b/abstracto-application/abstracto-modules/assignable-roles/assignable-roles-int/src/main/java/dev/sheldan/abstracto/assignableroles/service/management/AssignableRolePlacePostManagementService.java @@ -31,7 +31,7 @@ public interface AssignableRolePlacePostManagementService { * Creates an {@link AssignableRolePlacePost post} for the given {@link AssignableRolePlace place} in the given message ID * @param updatedPlace The {@link AssignableRolePlace place} this post should be part of * @param messageId The ID of the message in which the post exists - * @return + * @return The {@link AssignableRolePlacePost post} which is found in the given {@link AssignableRolePlace place} of the {@link net.dv8tion.jda.api.entities.Message message} ID */ AssignableRolePlacePost createAssignableRolePlacePost(AssignableRolePlace updatedPlace, Long messageId); } diff --git a/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/model/database/LeaderBoardEntryResult.java b/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/model/database/LeaderBoardEntryResult.java index 5b4327c32..113205811 100644 --- a/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/model/database/LeaderBoardEntryResult.java +++ b/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/model/database/LeaderBoardEntryResult.java @@ -15,22 +15,26 @@ public interface LeaderBoardEntryResult { /** * The experience of the {@link dev.sheldan.abstracto.core.models.database.AUserInAServer} + * @return experience count */ Long getExperience(); /** * The current raw level of the {@link dev.sheldan.abstracto.core.models.database.AUserInAServer} + * @return Level as integer */ Integer getLevel(); /** * The amount of messages tracked by the {@link dev.sheldan.abstracto.core.models.database.AUserInAServer} + * @return The amount of tracked messages */ Long getMessageCount(); /** * The current position of the {@link dev.sheldan.abstracto.core.models.database.AUserInAServer} in the leader board * ordered by experience count + * @return The position in the current server */ Integer getRank(); } diff --git a/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/service/AUserExperienceService.java b/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/service/AUserExperienceService.java index 82186c22f..728738df9 100644 --- a/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/service/AUserExperienceService.java +++ b/abstracto-application/abstracto-modules/experience-tracking/experience-tracking-int/src/main/java/dev/sheldan/abstracto/experience/service/AUserExperienceService.java @@ -65,6 +65,7 @@ public interface AUserExperienceService { * state in the server and the database. * @param userExperience The {@link AUserExperience userExperience} object to recalculate the {@link AExperienceRole experienceRole} for * @param roles The list of {@link AExperienceRole roles} used as a role configuration + * @param currentLevel The current level of the user * @return A {@link CompletableFuture future} containing the {@link RoleCalculationResult result} of the role calculation, * completing after the role of the {@link net.dv8tion.jda.api.entities.Member} has been updated, if any */ diff --git a/abstracto-application/abstracto-modules/moderation/moderation-int/src/main/java/dev/sheldan/abstracto/moderation/service/management/MuteManagementService.java b/abstracto-application/abstracto-modules/moderation/moderation-int/src/main/java/dev/sheldan/abstracto/moderation/service/management/MuteManagementService.java index 44b2bec82..e829cff21 100644 --- a/abstracto-application/abstracto-modules/moderation/moderation-int/src/main/java/dev/sheldan/abstracto/moderation/service/management/MuteManagementService.java +++ b/abstracto-application/abstracto-modules/moderation/moderation-int/src/main/java/dev/sheldan/abstracto/moderation/service/management/MuteManagementService.java @@ -28,7 +28,8 @@ public interface MuteManagementService { /** * Finds the mute from the database by the given ID. - * @param muteId The id of the mute to search for + * @param muteId The ID of the mute to search for + * @param serverId The ID of the server to retrieve the {@link Mute mute} in * @return An optional containing a {@link Mute} if the ID exists, and null otherwise */ Optional findMuteOptional(Long muteId, Long serverId); diff --git a/abstracto-application/abstracto-modules/modmail/modmail-impl/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadServiceBean.java b/abstracto-application/abstracto-modules/modmail/modmail-impl/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadServiceBean.java index fc54a822d..e90345385 100644 --- a/abstracto-application/abstracto-modules/modmail/modmail-impl/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadServiceBean.java +++ b/abstracto-application/abstracto-modules/modmail/modmail-impl/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadServiceBean.java @@ -198,6 +198,7 @@ public class ModMailThreadServiceBean implements ModMailThreadService { * @param channel The created {@link TextChannel} in which the mod mail thread is dealt with * @param userInitiated Whether or not the thread was initiated by a member * @param undoActions The list of actions to undo, in case an exception occurs + * @return A {@link CompletableFuture future} which completes when the setup is done */ @Transactional public CompletableFuture performModMailThreadSetup(Member member, Message initialMessage, TextChannel channel, boolean userInitiated, List undoActions) { @@ -237,6 +238,8 @@ public class ModMailThreadServiceBean implements ModMailThreadService { /** * Sends the message containing the pings to notify the staff members to handle the opened {@link ModMailThread} * @param member The {@link FullUserInServer} which opened the thread + * @param channel The created {@link TextChannel} in which the mod mail thread is dealt with + * @return A {@link CompletableFuture future} which complets when the notification has been sent */ @Transactional public CompletableFuture sendModMailNotification(Member member, TextChannel channel) { @@ -519,7 +522,7 @@ public class ModMailThreadServiceBean implements ModMailThreadService { @Override public CompletableFuture closeModMailThread(ModMailThread modMailThread, String note, boolean notifyUser, boolean logThread, List undoActions) { - metricService.incrementCounter(MODMAIL_THREAD_CREATED_COUNTER); + metricService.incrementCounter(MODMAIL_THREAD_CLOSED_COUNTER); Long modMailThreadId = modMailThread.getId(); log.info("Starting closing procedure for thread {}", modMailThread.getId()); List modMailMessages = modMailThread.getMessages(); @@ -562,6 +565,7 @@ public class ModMailThreadServiceBean implements ModMailThreadService { * @param messages The list of loaded {@link Message} to log * @param serverId The ID of the {@link Guild} the {@link ModMailThread} is in * @param userId The ID of the user the {@link ModMailThread} is about + * @return A {@link CompletableFuture future} which completes when the messages have been logged */ @Transactional public CompletableFuture logMessagesToModMailLog(String note, Boolean notifyUser, Long modMailThreadId, List undoActions, LoadedModmailThreadMessageList messages, Long serverId, Long userId) { @@ -575,7 +579,11 @@ public class ModMailThreadServiceBean implements ModMailThreadService { }); return memberService.getMemberInServerAsync(serverId, userId).thenCompose(member -> self.afterSuccessfulLog(modMailThreadId, notifyUser, member, undoActions) - ); + ).exceptionally(throwable -> { + log.warn("Failed to retrieve member for closing the modmail thread. Closing without member information.", throwable); + self.afterSuccessfulLog(modMailThreadId, false, null, undoActions); + return null; + }); }); } catch (Exception e) { log.error("Failed to log mod mail messages", e); @@ -589,7 +597,9 @@ public class ModMailThreadServiceBean implements ModMailThreadService { * @param modMailThreadId The ID of the {@link ModMailThread} which is being closed. * @param notifyUser Whether or not the user should be notified * @param undoActions The list of {@link UndoActionInstance} to execute in case of exceptions + * @param modMailThreaduser The {@link Member member} for which the {@link ModMailThread thread} was for * @throws ModMailThreadNotFoundException in case the {@link ModMailThread} is not found by the ID + * @return A {@link CompletableFuture future} which completes after the messages have been logged */ @Transactional public CompletableFuture afterSuccessfulLog(Long modMailThreadId, Boolean notifyUser, Member modMailThreaduser, List undoActions) { @@ -620,6 +630,7 @@ public class ModMailThreadServiceBean implements ModMailThreadService { * @param modMailThreadId The ID of the {@link ModMailThread} to delete the {@link MessageChannel} from * @param undoActions The list of {@link UndoActionInstance} to execute in case of exceptions * @throws ModMailThreadNotFoundException in case the {@link ModMailThread} is not found by the ID + * @return A {@link CompletableFuture future} which completes after the {@link TextChannel channel} in which the thread was has been deleted */ @Transactional public CompletableFuture deleteChannelAndClose(Long modMailThreadId, List undoActions) { @@ -653,6 +664,7 @@ public class ModMailThreadServiceBean implements ModMailThreadService { * @param modMailThreadId The ID of the {@link ModMailThread} to log the messages of * @param messages The list of {@link CompletableFuture} which contain the {@link Message} which could be loaded * @param note The note which was entered when closing the {@link ModMailThread} + * @param undoActions A list of {@link dev.sheldan.abstracto.core.models.UndoAction actions} to be undone in case the operation fails. This list will be filled in the method. * @throws ModMailThreadNotFoundException in case the {@link ModMailThread} is not found by the ID * @return An instance of {@link CompletableFutureList}, which contains a main {@link CompletableFuture} which is resolved, * when all of the smaller {@link CompletableFuture} in it are resolved. We need this construct, because we need to access @@ -762,6 +774,9 @@ public class ModMailThreadServiceBean implements ModMailThreadService { * @param modMailThreadId The ID of the {@link ModMailThread} for which the messages were sent for * @param anonymous Whether or not the messages were send anonymous * @param moderator The original {@link AUserInAServer} which authored the messages + * @param createdMessageInDM The {@link Message message} which was sent to the private channel with the {@link User user} + * @param modMailThreadMessage The {@link Message message} which was sent in the channel representing the {@link ModMailThread thread}. Might be null. + * @param replyCommandMessage The {@link Message message} which contained the command used to reply to the user * @throws ModMailThreadNotFoundException in case the {@link ModMailThread} is not found by the ID */ @Transactional diff --git a/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/model/template/ModMailClosingHeaderModel.java b/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/model/template/ModMailClosingHeaderModel.java index 526b68ab6..b7989825f 100644 --- a/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/model/template/ModMailClosingHeaderModel.java +++ b/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/model/template/ModMailClosingHeaderModel.java @@ -26,7 +26,7 @@ public class ModMailClosingHeaderModel { /** * The duration between the creation and closed date of a {@link ModMailThread} - * @return + * @return The duration between the creation date and the date the thread has been closed */ public Duration getDuration() { return Duration.between(closedThread.getCreated(), closedThread.getClosed()); diff --git a/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadService.java b/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadService.java index 5bd484ac1..8f76b8c27 100644 --- a/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadService.java +++ b/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/ModMailThreadService.java @@ -26,6 +26,8 @@ public interface ModMailThreadService { * @param initialMessage The initial message sparking this mod mail thread, null in case it was created by a command * @param feedBackChannel The {@link MessageChannel} in which feedback about exceptions should be posted to * @param userInitiated Whether or not the mod mail thread was initiated by a user + * @param undoActions A list of {@link dev.sheldan.abstracto.core.models.UndoAction actions} to be undone in case the operation fails. This list will be filled in the method. + * @return A {@link CompletableFuture future} which completes when the modmail thread is set up */ CompletableFuture createModMailThreadForUser(Member member, Message initialMessage, MessageChannel feedBackChannel, boolean userInitiated, List undoActions); @@ -51,7 +53,9 @@ public interface ModMailThreadService { * In case there was no channel found, this will cause a message to be shown to the user and the existing mod mail thread will be closed. * This is the case, if the mod mail thread was still open in the database, but no text channel was found anymore. * @param modMailThread The {@link ModMailThread} on which the user answered + * @param undoActions A list of {@link dev.sheldan.abstracto.core.models.UndoAction actions} to be undone in case the operation fails. This list will be filled in the method. * @param messageFromUser The {@link Message} object which was sent by the user as an answer + * @return A {@link CompletableFuture future} which completes when the message has been relayed to the channel */ CompletableFuture relayMessageToModMailThread(ModMailThread modMailThread, Message messageFromUser, List undoActions); @@ -63,8 +67,9 @@ public interface ModMailThreadService { * @param message The pure {@link Message} containing the command which caused the reply * @param anonymous Whether or nor the message should be send anonymous * @param feedBack The {@link MessageChannel} in which feedback about possible exceptions should be sent to - * @param undoActions list of {@link UndoActionInstance} to execute in case this fails + * @param undoActions A list of {@link dev.sheldan.abstracto.core.models.UndoAction actions} to be undone in case the operation fails. This list will be filled in the method. * @param targetMember The {@link Member} the {@link ModMailThread} is about. + * @return A {@link CompletableFuture future} which completes when the message has been relayed to the DM */ CompletableFuture relayMessageToDm(Long threadId, String text, Message message, boolean anonymous, MessageChannel feedBack, List undoActions, Member targetMember); @@ -77,6 +82,8 @@ public interface ModMailThreadService { * @param note The text of the note used for the header message of the logged mod mail thread. * @param notifyUser Whether or not the user should be notified * @param log whether or not the closed {@link ModMailThread} should be logged (if the {@link dev.sheldan.abstracto.core.config.FeatureMode} is enabled) + * @param undoActions A list of {@link dev.sheldan.abstracto.core.models.UndoAction actions} to be undone in case the operation fails. This list will be filled in the method. + * @return A {@link CompletableFuture future} which completes when the {@link ModMailThread thread} has been closed. */ CompletableFuture closeModMailThread(ModMailThread modMailThread, String note, boolean notifyUser, List undoActions, Boolean log); @@ -90,6 +97,8 @@ public interface ModMailThreadService { * logging the mod mail thread * @param notifyUser Whether or not the user should be notified * @param logThread Whether or not the thread should be logged to the appropriate post target + * @param undoActions A list of {@link dev.sheldan.abstracto.core.models.UndoAction actions} to be undone in case the operation fails. This list will be filled in the method. + * @return A {@link CompletableFuture future} which completes when the {@link ModMailThread thread} has been closed */ CompletableFuture closeModMailThread(ModMailThread modMailThread, String note, boolean notifyUser, boolean logThread, List undoActions); diff --git a/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/management/ModMailMessageManagementService.java b/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/management/ModMailMessageManagementService.java index 1b67d8634..9389d1acb 100644 --- a/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/management/ModMailMessageManagementService.java +++ b/abstracto-application/abstracto-modules/modmail/modmail-int/src/main/java/dev/sheldan/abstracto/modmail/service/management/ModMailMessageManagementService.java @@ -21,7 +21,7 @@ public interface ModMailMessageManagementService { * @param author The {@link AUserInAServer} who authored the {@link Message} originally * @param anonymous Whether or not the message was sent anonymous (only possible by staff members) * @param dmChannel Whether or not the message originated from the user, and therefore in an direct message channel - * @return + * @return The created {@link ModMailMessage message} instance */ ModMailMessage addMessageToThread(ModMailThread modMailThread, Message createdMessageInDM, Message createdMessageInChannel, Message userPostedMessage, AUserInAServer author, Boolean anonymous, Boolean dmChannel); diff --git a/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsModel.java b/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsModel.java index 198fbaef6..c87e9782b 100644 --- a/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsModel.java +++ b/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsModel.java @@ -34,6 +34,7 @@ public class EmoteStatsModel { /** * Whether or not this model contains *any* stats to render. + * @return Whether or not there are any stats to display */ public boolean areStatsAvailable() { return !animatedEmotes.isEmpty() || !staticEmotes.isEmpty(); diff --git a/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsResult.java b/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsResult.java index 45f0c45bd..78e4cdd9a 100644 --- a/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsResult.java +++ b/abstracto-application/abstracto-modules/statistic/statistic-int/src/main/java/dev/sheldan/abstracto/statistic/emote/model/EmoteStatsResult.java @@ -6,17 +6,17 @@ package dev.sheldan.abstracto.statistic.emote.model; */ public interface EmoteStatsResult { /** - * ID of the emote + * @return The ID of the emote */ Long getEmoteId(); /** - * ID of the server + * @return ID of the server */ Long getServerId(); /** - * Amount the emote with the ID has been used in the server with the ID + * @return Amount the emote with the ID has been used in the server with the ID */ Long getAmount(); } diff --git a/abstracto-application/bundle/pom.xml b/abstracto-application/bundle/pom.xml index abf51f887..ac4197364 100644 --- a/abstracto-application/bundle/pom.xml +++ b/abstracto-application/bundle/pom.xml @@ -86,18 +86,6 @@ ${project.version} - - dev.sheldan.abstracto.modules - statistic-impl - ${project.version} - - - - dev.sheldan.abstracto.modules - remind-impl - ${project.version} - - dev.sheldan.abstracto.modules repost-detection-impl diff --git a/abstracto-application/core/core-impl/src/main/java/dev/sheldan/abstracto/core/templating/config/FreemarkerConfiguration.java b/abstracto-application/core/core-impl/src/main/java/dev/sheldan/abstracto/core/templating/config/FreemarkerConfiguration.java index 8fb6984ec..67a5600a1 100644 --- a/abstracto-application/core/core-impl/src/main/java/dev/sheldan/abstracto/core/templating/config/FreemarkerConfiguration.java +++ b/abstracto-application/core/core-impl/src/main/java/dev/sheldan/abstracto/core/templating/config/FreemarkerConfiguration.java @@ -39,6 +39,8 @@ public class FreemarkerConfiguration { * The correct compatibility version and the provided formatter methods to be used in the templates. * The encoding of the templates is set to UTF-8. * @return A configured {@link Configuration} bean according to the configuration + * @throws IOException when the configuration fails to be created + * @throws TemplateException when the configuration fails to be created */ @Bean public Configuration freeMarkerConfiguration() throws IOException, TemplateException { diff --git a/abstracto-application/core/core-int/src/main/java/dev/sheldan/abstracto/core/templating/service/management/EffectiveTemplateManagementService.java b/abstracto-application/core/core-int/src/main/java/dev/sheldan/abstracto/core/templating/service/management/EffectiveTemplateManagementService.java index 13a6da288..9ec70e311 100644 --- a/abstracto-application/core/core-int/src/main/java/dev/sheldan/abstracto/core/templating/service/management/EffectiveTemplateManagementService.java +++ b/abstracto-application/core/core-int/src/main/java/dev/sheldan/abstracto/core/templating/service/management/EffectiveTemplateManagementService.java @@ -10,11 +10,18 @@ import java.util.Optional; */ public interface EffectiveTemplateManagementService { /** - * Retrieves the template identified by the key. + * Retrieves the template identified by the key for the server * @param key They template key to search for - * @return An {@link Optional} containing the {@link Template} if it exists, and null otherwise + * @param server The ID of the server to retrieve the template for + * @return An {@link Optional} containing the {@link Template} if it exists, and empty otherwise */ Optional getTemplateByKeyAndServer(String key, Long server); + + /** + * Retrieves the template identified by the key. + * @param key They template key to search for + * @return An {@link Optional} containing the {@link Template} if it exists, and empty otherwise + */ Optional getTemplateByKey(String key); } diff --git a/abstracto-application/documentation/pom.xml b/abstracto-application/documentation/pom.xml index 39c904125..82e17f247 100644 --- a/abstracto-application/documentation/pom.xml +++ b/abstracto-application/documentation/pom.xml @@ -9,7 +9,6 @@ 4.0.0 - dev.sheldan.abstracto.templating documentation pom diff --git a/abstracto-application/pom.xml b/abstracto-application/pom.xml index c60cd9f99..467ce14c7 100644 --- a/abstracto-application/pom.xml +++ b/abstracto-application/pom.xml @@ -36,6 +36,7 @@ https://maven.pkg.github.com/Sheldan/abstracto + scm:git:git@github.com:Sheldan/abstracto.git @@ -75,7 +76,11 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + + + + org.apache.maven.plugins + maven-release-plugin @@ -103,6 +108,30 @@ + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + diff --git a/abstracto-application/scheduling/scheduling-impl/src/main/java/dev/sheldan/abstracto/scheduling/service/SchedulerStartupService.java b/abstracto-application/scheduling/scheduling-impl/src/main/java/dev/sheldan/abstracto/scheduling/service/SchedulerStartupService.java index 97dda795f..b6614c8d7 100644 --- a/abstracto-application/scheduling/scheduling-impl/src/main/java/dev/sheldan/abstracto/scheduling/service/SchedulerStartupService.java +++ b/abstracto-application/scheduling/scheduling-impl/src/main/java/dev/sheldan/abstracto/scheduling/service/SchedulerStartupService.java @@ -22,6 +22,7 @@ public class SchedulerStartupService { /** * Loads the job definitions from the database and schedules them, if the job does not exist yet. + * @param ctxStartEvt The event info from spring */ @EventListener @Transactional(isolation = Isolation.SERIALIZABLE)