【仅供内部供应商使用,不提供对外解答和培训】
【仅供内部供应商使用,不提供对外解答和培训】
根据插件需要支持的报表版本,参考下列写法编写或升级插件
插件要在9.0中运行,必须保证红色功能使用兼容或者9.0独占的写法
实现功能 | 9.0独占 | 兼容8.0、9.0 | 8.0独占 |
---|---|---|---|
资源加载 | PluginContexts.currentContext().getResource(name); | this.getClass().getResource(name); this.getClass().getClassLoader().getResource(name); IOUtils.getResource(name)等方法 | GeneralContext.class.getResource(name); GeneralContext.class.getClassLoader().getResource(name); |
访问没有依赖关系的插件 | 不支持 | 不支持 | if (Class.forName(pluginBClassName) != null){...} 建议不要用 |
资源和对象释放方案 | <lifecycle-monitor> | PluginContexts.currentContext().executeRecoverable(task); PluginContexts.currentContext().newTimer(); | 不释放 |
env-version写法 | <env-version>9.0<env-version> <env-version>9.0~<env-version> | <env-version>8.0<env-version> | <env-version>~8.0<env-version> |
功能记录点 | <function-recorder> + @FunctionRecorder + @ExecuteFunctionRecord注解 | 默认写法 | 无 |
自动打印日志 | 独占 @Log注解 | 不支持 | 不支持 |
访问license | PluginContexts.currentContext().isAvailable(); | PluginLicenseManager.getInstance().getPluginLicenseByID(pluginID).isAvailable(); | 无 |
加密 | 独占 | 不支持 | 不支持 |
自动添加currentAPILevel方法 | 独占 | 不支持 | 不支持 |
自定义标签 | 独占 | 不支持 | 不支持 |
main-package标签 | 支持 | 支持 | 可写,不解析 |
OEM开发 | 暂不支持 | 暂不支持 | 独占 |