I am studying Kapsel OData offline plugin recently. In SAP help the source code of OData.js is provided:
The source code clearly conveys the idea documented in SAP help: “When an offline store is first opened, it synchronizes with the OData producer. OData requests made against this plugin use the available open offline stores.“.
And I am curious how this offline store is opened in the real application. So I use a CRM Fiori offline application to have a look.
(1) In offline project folder there is a config.xml, which defines the entry point for offline application access, the index.html file.
(2) Open this index.html, there is a script file “createStores.js”:
This file has constructed an object sap.smp.registration:
There is a public method setup exposed which accepts an array for offline store collection and call a private method _setupStore one by one. Once the asynchronous setup process is done successfully, callback success is called.
In implementation of _setupStore, the sap.OData.createOfflineStore(properties) and sap.OData.applyHttpClient() mentioned in sap help could be found.
(3) back to index.html, there is a file contentplace.js:
In this file, offline store will be opened in line 14, and application specific initialization is called in callback function defined in line 5.
(4) finally, the createContentPlaceFunction is called in index.html in line 196:
(5) Now check how OfflineStore open is implemented in Android platform via Java:
In line 215, offline store instance is created and a listener is registered, since open operation is done asynchronously:
And open operation is started here:
Check in ODataOfflineStore class, a new thread is created to perform open action:
In run method, the call is delegated back to ODataOfflineStore.openStoreSync:
The core open operation is done in this.store.open:
If open is done successfully, the listener registered in ODataOfflineStore instance will be notified with ODataOfflineStoreOpen state:
The core implementation of open method in Store class is implemented natively and could not be visible in Java stack:
要获取更多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开发步骤,供初学者参考!
SAP Gateway and OData, SAP低代码开发必备
SAP OData Framework 3.0 英文资料
Tutorial to Develop a SAPUI5 Application with oData Access.sap ui5使用odata进行数据的交互
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 ...
SAP-Fiori---快速指南
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...
NULL 博文链接:https://milker.iteye.com/blog/1557722
Gateway最Unit 1: SAP Gateway Overview 3 Lesson: Explaining SAP Gateway 11 Lesson: Describing SAP Gateway Deployment Options 27 Unit 2: OData Overview 29 Lesson: Explaining Representational State ...
OData:开放数据协议(Open Data Protocol,简称OData)是一种描述如何创建和访问Restful服务的OASIS标准。该标准由微软发起,前三个版本1.0、2.0、3.0都是微软开放标准,遵循微软开放规范承诺书(Microsoft Open ...
SAP Cloud for Customer OData API开发人员指南《 SAP Cloud for Customer OData API开发人员指南》以最方便开发人员的格式补充了《 的用法细节和SAP Cloud for Customer OData API示例。 此外,它还涵盖了SAP Cloud...
sap press doc 解压密码:abap_developer