From e2e1af91a6fac68069fb94f651647d64f08fc914 Mon Sep 17 00:00:00 2001 From: bivashy Date: Wed, 25 Oct 2023 15:55:47 +0600 Subject: [PATCH] Rename MigrationSettings into ImportingSettings --- .../java/com/bivashy/auth/api/config/PluginConfig.java | 4 ++-- .../auth/api/config/migration/MigrationSettings.java | 7 ------- .../me/mastercapexd/auth/config/PluginConfigTemplate.java | 8 ++++---- .../BaseImportingSettings.java} | 8 ++++---- 4 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 api/src/main/java/com/bivashy/auth/api/config/migration/MigrationSettings.java rename core/src/main/java/me/mastercapexd/auth/config/{migration/BaseMigrationSettings.java => importing/BaseImportingSettings.java} (64%) diff --git a/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java b/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java index 8368a11f..8c108200 100644 --- a/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java +++ b/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java @@ -12,7 +12,7 @@ import com.bivashy.auth.api.config.link.TelegramSettings; import com.bivashy.auth.api.config.link.VKSettings; import com.bivashy.auth.api.config.message.server.ServerMessages; -import com.bivashy.auth.api.config.migration.MigrationSettings; +import com.bivashy.auth.api.config.importing.ImportingSettings; import com.bivashy.auth.api.config.server.ConfigurationServer; import com.bivashy.auth.api.crypto.CryptoProvider; import com.bivashy.auth.api.database.DatabaseConnectionProvider; @@ -80,7 +80,7 @@ public interface PluginConfig { GoogleAuthenticatorSettings getGoogleAuthenticatorSettings(); - MigrationSettings getMigrationSettings(); + ImportingSettings getImportingSettings(); TelegramSettings getTelegramSettings(); diff --git a/api/src/main/java/com/bivashy/auth/api/config/migration/MigrationSettings.java b/api/src/main/java/com/bivashy/auth/api/config/migration/MigrationSettings.java deleted file mode 100644 index e207c23a..00000000 --- a/api/src/main/java/com/bivashy/auth/api/config/migration/MigrationSettings.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.bivashy.auth.api.config.migration; - -public interface MigrationSettings { - - int getRetrievalSize(); - -} diff --git a/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java b/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java index 313fb5d2..e43a8772 100644 --- a/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java +++ b/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java @@ -17,7 +17,7 @@ import com.bivashy.auth.api.config.link.TelegramSettings; import com.bivashy.auth.api.config.link.VKSettings; import com.bivashy.auth.api.config.message.server.ServerMessages; -import com.bivashy.auth.api.config.migration.MigrationSettings; +import com.bivashy.auth.api.config.importing.ImportingSettings; import com.bivashy.auth.api.config.server.ConfigurationServer; import com.bivashy.auth.api.crypto.CryptoProvider; import com.bivashy.auth.api.database.DatabaseConnectionProvider; @@ -109,7 +109,7 @@ public abstract class PluginConfigTemplate implements PluginConfig { @ConfigField("authentication-steps") private List authenticationSteps = Arrays.asList("REGISTER", "LOGIN", "VK_LINK", "TELEGRAM_LINK", "GOOGLE_LINK", "ENTER_SERVER"); @ConfigField("import") - private MigrationSettings migrationSettings; + private ImportingSettings importingSettings; public PluginConfigTemplate(AuthPlugin plugin) { this.plugin = plugin; @@ -300,8 +300,8 @@ public IntStream getLimboPortRange() { } @Override - public MigrationSettings getMigrationSettings() { - return migrationSettings; + public ImportingSettings getImportingSettings() { + return importingSettings; } protected abstract ConfigurationSectionHolder createConfiguration(AuthPlugin plugin); diff --git a/core/src/main/java/me/mastercapexd/auth/config/migration/BaseMigrationSettings.java b/core/src/main/java/me/mastercapexd/auth/config/importing/BaseImportingSettings.java similarity index 64% rename from core/src/main/java/me/mastercapexd/auth/config/migration/BaseMigrationSettings.java rename to core/src/main/java/me/mastercapexd/auth/config/importing/BaseImportingSettings.java index 8fc0fe19..58f6e457 100644 --- a/core/src/main/java/me/mastercapexd/auth/config/migration/BaseMigrationSettings.java +++ b/core/src/main/java/me/mastercapexd/auth/config/importing/BaseImportingSettings.java @@ -1,16 +1,16 @@ -package me.mastercapexd.auth.config.migration; +package me.mastercapexd.auth.config.importing; import com.bivashy.auth.api.AuthPlugin; -import com.bivashy.auth.api.config.migration.MigrationSettings; +import com.bivashy.auth.api.config.importing.ImportingSettings; import com.bivashy.configuration.ConfigurationHolder; import com.bivashy.configuration.annotation.ConfigField; import com.bivashy.configuration.holder.ConfigurationSectionHolder; -public class BaseMigrationSettings implements ConfigurationHolder, MigrationSettings { +public class BaseImportingSettings implements ConfigurationHolder, ImportingSettings { @ConfigField("retrieval-size") private int retrievalSize; - public BaseMigrationSettings(ConfigurationSectionHolder sectionHolder) { + public BaseImportingSettings(ConfigurationSectionHolder sectionHolder) { AuthPlugin.instance().getConfigurationProcessor().resolve(sectionHolder, this); }