在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
- 如何开发插件
- How to develop a JDBC Options Binder
- How to develop a JDBC Form Load Binder
- How to develop a JDBC Form Store Binder
- File Upload Form Element Integrated with Amazon S3
- How to develop a Slack Webhook Tool
- How to develop a Slack Notification plugin
- How to develop an Amazon S3 Datalist Binder
相关的社区插件
- 部门权限
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)