From 6a4552ab3c6598aaf480678808bb0ca9af0384f4 Mon Sep 17 00:00:00 2001 From: Leonid Andreev Date: Wed, 20 Mar 2024 15:19:05 -0400 Subject: [PATCH] Added the "Command" to the names of the new commands - for consistency with all the other commands. #9356 --- src/main/java/edu/harvard/iq/dataverse/DatasetPage.java | 4 ++-- src/main/java/edu/harvard/iq/dataverse/DataversePage.java | 4 ++-- ...nPage.java => CheckRateLimitForCollectionPageCommand.java} | 4 ++-- ...asetPage.java => CheckRateLimitForDatasetPageCommand.java} | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename src/main/java/edu/harvard/iq/dataverse/engine/command/impl/{CheckRateLimitForCollectionPage.java => CheckRateLimitForCollectionPageCommand.java} (73%) rename src/main/java/edu/harvard/iq/dataverse/engine/command/impl/{CheckRateLimitForDatasetPage.java => CheckRateLimitForDatasetPageCommand.java} (74%) diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index b3bcffb4faf..4fb007d2120 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -24,7 +24,7 @@ import edu.harvard.iq.dataverse.engine.command.Command; import edu.harvard.iq.dataverse.engine.command.CommandContext; import edu.harvard.iq.dataverse.engine.command.exception.CommandException; -import edu.harvard.iq.dataverse.engine.command.impl.CheckRateLimitForDatasetPage; +import edu.harvard.iq.dataverse.engine.command.impl.CheckRateLimitForDatasetPageCommand; import edu.harvard.iq.dataverse.engine.command.impl.CreatePrivateUrlCommand; import edu.harvard.iq.dataverse.engine.command.impl.CuratePublishedDatasetVersionCommand; import edu.harvard.iq.dataverse.engine.command.impl.DeaccessionDatasetVersionCommand; @@ -1937,7 +1937,7 @@ private void setIdByPersistentId() { private String init(boolean initFull) { // Check for rate limit exceeded. Must be done before anything else to prevent unnecessary processing. - if (!cacheFactory.checkRate(session.getUser(), new CheckRateLimitForDatasetPage(null,null))) { + if (!cacheFactory.checkRate(session.getUser(), new CheckRateLimitForDatasetPageCommand(null,null))) { return navigationWrapper.tooManyRequests(); } //System.out.println("_YE_OLDE_QUERY_COUNTER_"); // for debug purposes diff --git a/src/main/java/edu/harvard/iq/dataverse/DataversePage.java b/src/main/java/edu/harvard/iq/dataverse/DataversePage.java index cbfe8207be8..afdff38c588 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DataversePage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DataversePage.java @@ -9,7 +9,7 @@ import edu.harvard.iq.dataverse.dataverse.DataverseUtil; import edu.harvard.iq.dataverse.engine.command.Command; import edu.harvard.iq.dataverse.engine.command.exception.CommandException; -import edu.harvard.iq.dataverse.engine.command.impl.CheckRateLimitForCollectionPage; +import edu.harvard.iq.dataverse.engine.command.impl.CheckRateLimitForCollectionPageCommand; import edu.harvard.iq.dataverse.engine.command.impl.CreateDataverseCommand; import edu.harvard.iq.dataverse.engine.command.impl.CreateSavedSearchCommand; import edu.harvard.iq.dataverse.engine.command.impl.DeleteDataverseCommand; @@ -326,7 +326,7 @@ public void updateOwnerDataverse() { public String init() { //System.out.println("_YE_OLDE_QUERY_COUNTER_"); // for debug purposes // Check for rate limit exceeded. Must be done before anything else to prevent unnecessary processing. - if (!cacheFactory.checkRate(session.getUser(), new CheckRateLimitForCollectionPage(null,null))) { + if (!cacheFactory.checkRate(session.getUser(), new CheckRateLimitForCollectionPageCommand(null,null))) { return navigationWrapper.tooManyRequests(); } if (this.getAlias() != null || this.getId() != null || this.getOwnerId() == null) {// view mode for a dataverse diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForCollectionPage.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForCollectionPageCommand.java similarity index 73% rename from src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForCollectionPage.java rename to src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForCollectionPageCommand.java index 9dcf0428fff..b23e6034c9a 100644 --- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForCollectionPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForCollectionPageCommand.java @@ -6,8 +6,8 @@ import edu.harvard.iq.dataverse.engine.command.DataverseRequest; import edu.harvard.iq.dataverse.engine.command.exception.CommandException; -public class CheckRateLimitForCollectionPage extends AbstractVoidCommand { - public CheckRateLimitForCollectionPage(DataverseRequest aRequest, DvObject dvObject) { +public class CheckRateLimitForCollectionPageCommand extends AbstractVoidCommand { + public CheckRateLimitForCollectionPageCommand(DataverseRequest aRequest, DvObject dvObject) { super(aRequest, dvObject); } diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForDatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForDatasetPageCommand.java similarity index 74% rename from src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForDatasetPage.java rename to src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForDatasetPageCommand.java index 04a27d082f4..da8c1e4d8e3 100644 --- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForDatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CheckRateLimitForDatasetPageCommand.java @@ -6,9 +6,9 @@ import edu.harvard.iq.dataverse.engine.command.DataverseRequest; import edu.harvard.iq.dataverse.engine.command.exception.CommandException; -public class CheckRateLimitForDatasetPage extends AbstractVoidCommand { +public class CheckRateLimitForDatasetPageCommand extends AbstractVoidCommand { - public CheckRateLimitForDatasetPage(DataverseRequest aRequest, DvObject dvObject) { + public CheckRateLimitForDatasetPageCommand(DataverseRequest aRequest, DvObject dvObject) { super(aRequest, dvObject); }