refactor: 插件SDK调整

This commit is contained in:
fit2-zhao 2024-02-18 10:48:00 +08:00 committed by Craftsman
parent 81e6bb00d0
commit 86a0a5cd2f
2 changed files with 11 additions and 3 deletions

View File

@ -14,6 +14,10 @@ import java.util.List;
*/
public abstract class AbstractApiPlugin extends AbstractMsPlugin {
public boolean isXpack() {
return false;
}
/**
* 获取插件选项
*

View File

@ -2,6 +2,7 @@ package io.metersphere.plugin.api.spi;
/**
* 接口协议插件抽象类
*
* @Author: jianxing
* @CreateTime: 2023-11-06 11:10
*/
@ -12,14 +13,16 @@ public abstract class AbstractProtocolPlugin extends AbstractApiPlugin {
/**
* 返回协议名
* @return
*
* @return 协议名
*/
abstract public String getProtocol();
/**
* 返回接口协议主页面的脚本的ID默认为 api
* 可以重写此方法返回自定义的脚本ID
* @return
*
* @return 协议id
*/
public String getApiProtocolScriptId() {
return DEFAULT_API_PROTOCOL_SCRIPT_ID;
@ -28,7 +31,8 @@ public abstract class AbstractProtocolPlugin extends AbstractApiPlugin {
/**
* 返回协议环境配置页面的脚本的ID默认为 environment
* 可以重写此方法返回自定义的脚本ID
* @return
*
* @return 脚本id
*/
public String getEnvProtocolScriptId() {
return DEFAULT_ENVIRONMENT_PROTOCOL_SCRIPT_ID;