在v5中引入,需要配置“ 常规设置”中的“API域白名单”设置以允许JSON API请求。如果请求来自非白名单域,则响应将是HTTP 400错误请求。
用法
- 用于为系统的AJAX调用提供额外的HTML页面或Web服务。
- 一个可用的Web Service插件需要扩展 org.joget.plugin.base.ExtDefaultPlugin抽象类并实现 org.joget.plugin.base.PluginWebSupport接口。
- Web Service Plugin可以是其他实现org.joget.plugin.base.PluginWebSupport 接口的插件类型的插件 。
接口
org.joget.plugin.base.PluginWebSupport
- 在wflow-plugin-base模块下
- Web Service 插件的接口
方法细节
接口方法
网络服务
public void webService(javax.servlet.HttpServletRequest request,javax.servlet.HttpServletResponse response)throws javax.servlet.ServletException,java.io.IOException
类似于Servlet的工作。
URL模式
{Context Path}/web/json/plugin/{Plugin Class Name}/service
- 例:
http:
//localhost:8080/jw/web/json/plugin/org.joget.sample.lib.SimpleFormElement/service?say_something=Hello World
{Context Path}/web/json/app/{App Id}/{App Version}/plugin/{Plugin Class Name}/service
- 例:
http:
//localhost:8080/jw/web/json/app/crm/1/plugin/org.joget.sample.lib.SimpleFormElement/service?say_something=Hello World
- 这个模式允许你使用下面的代码在你的实现中检索应用程序的定义:
AppDefinition appDef = AppUtil.getCurrentAppDefinition();
插件属性选项
- 不支持。
Tutorials
- 如何开发插件
- 如何开发一个JDBC选项绑定器
- 如何开发一个JDBC 表单加载绑定器
- 如何开发一个JDBC 表单存储绑定器
- 文件上传表单元素与Amazon S3集成
- 如何开发一个Slack Webhook 工具
- 如何开发一个Slack通知插件
- 如何开发一个Amazon S3 数据列表绑定器插件
相关的社区插件
- 部门权限
org.joget.apps.userview.lib.DepartmentPermission(wflow-core) - 电子邮件工具
org.joget.apps.app.lib.EmailTool(wflow-core) - 组权限
org.joget.apps.userview.lib.GroupPermission(wflow-core) - 收件箱
org.joget.apps.userview.lib.InboxMenu(wflow-core) - 组织权限
org.joget.apps.userview.lib.OrganizationPermission(wflow-core) - 运行进程
org.joget.apps.userview.lib.RunProcess(wflow-core) - 子表单
表单org.joget.apps.form.lib.SubForm(wflow-core) - 用户通知
org.joget.apps.app.lib.UserNotificationAuditTrail(wflow-core) - 用户权限
org.joget.apps.userview.lib.UserPermission(wflow-core)