I am reading Offline OData plugin introduction from SAP Help, There is one sentence “OData requests made against this plugin use the available open offline stores.“, and I am very curious about how this is done. As a result I had a look at my offline application project. I have found a plugin.xml file in folder kapsel-plugin-odata.
Inside this xml another two JavaScript files are mentioned. According to plugin.xml specification provided in Cordova website, the window.sap.OData and window.sap.OfflineStore are so called JavaScript interfaces which can marshal a request from the WebView ( container of Offline application) to device native API.
So open OData.js:
key implementation of OData.js and OfflineStore.js
(1) define a custom http request which will delegate the OData request to device native API. A new httpClient is defined. Inside its request method, the requested url is compared against each offline supported url configured in array openStores. If matched, a flag handle is set as true.
odata.request will call Cordova library’s exec method to access offline data store.
(2) configure this custom http client as default client. As a result every time a new OData request is in, by default this custom http client is called so offline data store is always tried to access first.
(3) In my application project all urls which are supported for Offline access scenario are defined in manifest.json:
In the runtime, this json object will be passed as input parameter for OData offline store implemented by function createOfflineStore.
By looking at implementation of OfflineStore(), we can know that this constructor does not perform Offline store initialization, but just parse every url specified by properties argument.
Instead, OfflineStore.open must be called and only after that, the offline store will then be available for mobile device to use.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
JAVA调用SAP ODATA服务.docx
解决方法:要先用GET方法从去调用ODATA中GET_ENTIY方法,例如:http://vhcals4h.com:44301/sap/opu/odata/sap/ztest_srv/HEADERSet('5000000001'),然后再将返回内容作为表身,传到ENTITYSET地址,如:...
SAP UI5作为前端开发框架,使用SAP Gataway开发后端OData Service
SAP ODATA ABAP开发教程
SAP Fiori OData Services. OData is used to define best practices that are required to build and consume RESTful APIs. It helps you to find out changes, defining functions for reusable procedures and ...
SapAPI 该程序正在读取SAP API。 此API从防火墙后面的SAP ECC系统公开ODATA。 需要一个天蓝色的AD帐户,一个SAP-id,包括访问SAP系统中技术角色的权限。 SAP API已在Azure API管理中注册。
SAP-odata文档
简单实现OData的一个demo,测试odata的api。$expand、 $filter、$inlinecount、$orderby 、$select、$skip、$top
SAP OData Framework 3.0 英文资料
SAP 后台ODATA开发步骤,供初学者参考!
SAP Gateway and OData, SAP低代码开发必备
Tutorial to Develop a SAPUI5 Application with oData Access.sap ui5使用odata进行数据的交互
OData:开放数据协议(Open Data Protocol,简称OData)是一种描述如何创建和访问Restful服务的OASIS标准。该标准由微软发起,前三个版本1.0、2.0、3.0都是微软开放标准,遵循微软开放规范承诺书(Microsoft Open ...
SAP OData Training Agenda • Session 1: Introduction to REST (20 mins) • Session 2: Introduction to OData Service (40 mins) • Hands on 1: Build your 1 st OData Service (60 mins) ▫ Transaction: SEGW...
33 Lesson: Explaining Open Data Protocol (OData) 43 Lesson: Performing OData Operations 49 Lesson: Performing OData Queries 57 Lesson: Consuming OData Services 69 Unit 3: SAP Gateway Service ...
通过希望向OData请求公开通用接口,我们希望使任何后端都能通过OData API公开自身,而只需付出最小的努力。状态该项目尚未完成,因此无法在当前状态下使用。 正在使其可用的进步正在进行,并最终与OData V4规范完全...
SAP ODATA Training Agenda • Session 1: Introduction to SAPUI5 / FIORI (40 mins) ▫ Basic MVC concept: Model, View, Controller ▫ UI5 Control libraries • Session 2: Introduction to SAP Web IDE (20 ...
OData 是一种网络数据交互技术,它规定了数据的结构模型和访问规则。因为它是基于 HTTP, XML, JSON 等多种网络标准技术的,所以它支持各种平台,各种设备,各种语言等,是一种通 用的交互技术, 也被称为 OData ...
JayStack OData V4服务器 适用于node.js的OData V4服务器 特征 OASIS标准OData版本4.0服务器 可用作独立服务器,Express路由器,node.js流或库 公开服务文档和服务元数据-$ metadata 使用装饰器或设置元 支持的数据...
描述简单的命令行界面可通过ODATA请求在SAP Solution Manager或CTS中处理与变更管理相关的基本操作。 该客户端旨在用于连续集成和连续交付方案中,并且仅支持这些方案中必需的操作。 有关更多详细信息,请参见用法...