From e72c5126f242c7fa4e752d72de5d1b6cba803c8e Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 9 Jan 2024 19:34:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E7=AC=AC=E4=B8=89=E6=96=B9=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=94=A8=E6=88=B7=E6=A0=A1=E9=AA=8C=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/plugin/platform/spi/AbstractPlatform.java | 4 ++++ .../java/io/metersphere/plugin/platform/spi/Platform.java | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/AbstractPlatform.java b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/AbstractPlatform.java index 74f9fe70f6..0c3c532efe 100644 --- a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/AbstractPlatform.java +++ b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/AbstractPlatform.java @@ -17,6 +17,10 @@ public abstract class AbstractPlatform implements Platform { this.request = request; } + public T getIntegrationConfig(Class clazz) { + return getIntegrationConfig(request.getIntegrationConfig(), clazz); + } + public T getIntegrationConfig(String integrationConfig, Class clazz) { if (StringUtils.isBlank(integrationConfig)) { throw new MSPluginException("服务集成配置为空"); diff --git a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java index 8660f7ccdc..b34b9b0c5d 100644 --- a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java +++ b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java @@ -25,6 +25,12 @@ public interface Platform extends ExtensionPoint { */ void validateIntegrationConfig(); + /** + * 校验用户配置 + * 个人中心-第三方平台点击时调用 + */ + void validateUserConfig(String userConfig); + /** * 校验项目配置 * 项目设置成点击校验项目 key 时调用