You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.7 KiB
60 lines
1.7 KiB
/* |
|
* Copyright (C), 2018-2022 |
|
* Project: starter |
|
* FileName: HttpLoader |
|
* Author: xxx |
|
* Date: 2022/4/5 22:53 |
|
*/ |
|
package com.fr.plugin.iscd.loader; |
|
|
|
import com.fr.plugin.context.PluginContexts; |
|
import com.fr.plugin.iscd.LocaleFinder; |
|
import com.fr.script.Calculator; |
|
import com.fr.stable.ParameterProvider; |
|
import com.fr.stable.fun.Authorize; |
|
import com.tptj.plugin.hg.impl.AbstractLoader; |
|
|
|
/** |
|
* <Function Description><br> |
|
* <HttpLoader> |
|
* |
|
* @author xxx |
|
* @since 1.0.0 |
|
*/ |
|
@Authorize(callSignKey = LocaleFinder.PLUGIN_ID) |
|
public class HttpLoader extends AbstractLoader { |
|
/** |
|
* 装载数据 |
|
* |
|
* @param cal 当前算子 |
|
* @param params 需要用到的参数 |
|
* @param others 其他你可能用到的但是又不希望通过参数控制的配置项 |
|
* @return 保存数据的对象 |
|
*/ |
|
@Override |
|
public Object load(Calculator cal, ParameterProvider[] params, String others) { |
|
if (!PluginContexts.currentContext().isAvailable()) { |
|
return null; |
|
} |
|
return null; |
|
} |
|
|
|
/** |
|
* 装载器的名字【显示在数据工厂配置界面的下拉列表里面的】,唯一,支持国际化的key |
|
* |
|
* @return |
|
*/ |
|
@Override |
|
public String getName() { |
|
return "HttpAPI"; |
|
} |
|
|
|
|
|
/** |
|
* @return 默认显示的配置【显示在数据工厂配置界面装载器配置文本域里面的,配置项自定义,其实就是放一些,不想写死在代码里,又不希望被参数篡改的部分】 |
|
*/ |
|
@Override |
|
public String getDefaultConfig() { |
|
return "{url:\"www.114.com\",type:\"GET\",charset:\"UTF-8\",header:{aa:${bb}}}"; |
|
} |
|
} |