SAP OData offline store在Android平台的技术实现

简介: SAP OData offline store在Android平台的技术实现

I am studying Kapsel OData offline plugin recently. In SAP help the source code of OData.js is provided:image.pngThe 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.image.png(2) Open this index.html, there is a script file “createStores.js”:image.pngThis file has constructed an object sap.smp.registratiimage.pngThere 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.image.pngIn implementation of _setupStore, the sap.OData.createOfflineStore(properties) and sap.OData.applyHttpClient() mentioned in sap help could be found.image.png(3) back to index.html, there is a file contentplace.js:

image.pngIn this file, offline store will be opened in line 14, and application specific initialization is called in callback function defined in line 5.image.png(4) finally, the createContentPlaceFunction is called in index.html in line 196:

image.png(5) Now check how OfflineStore open is implemented in Android platform via Java:

image.pngimage.pngAnd open operation is started here:image.pngCheck in ODataOfflineStore class, a new thread is created to perform open action:image.pngIn run method, the call is delegated back to ODataOfflineStore.openStoreSync:image.pngThe core open operation is done in this.store.open:image.pngIf open is done successfully, the listener registered in ODataOfflineStore instance will be notified with ODataOfflineStoreOpen state:image.pnghe core implementation of open method in Store class is implemented natively and could not be visible in Java stack:image.png



相关文章
|
2月前
|
XML 数据处理 数据格式
什么是 SAP UI5 XML Templating 技术
什么是 SAP UI5 XML Templating 技术
43 0
|
2月前
|
缓存 UED
关于 SAP OData Annotation Provider Class 以及 metadata 模型注册的事务码
关于 SAP OData Annotation Provider Class 以及 metadata 模型注册的事务码
26 0
|
3月前
|
XML API 数据格式
SAP 标准 OData 服务 CATALOGSERVICE;v=2 的作用介绍
SAP 标准 OData 服务 CATALOGSERVICE;v=2 的作用介绍
24 0
|
3月前
|
BI
SAP ABAP 显式增强技术之 New BAdI 的技术原理介绍试读版
SAP ABAP 显式增强技术之 New BAdI 的技术原理介绍试读版
22 0
|
3月前
|
监控 前端开发 数据可视化
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
31 1
|
1月前
SAP ABAP ALV 的分组显示和 Subtotal 显示实现的技术步骤试读版
SAP ABAP ALV 的分组显示和 Subtotal 显示实现的技术步骤试读版
33 0
|
1月前
|
数据库 开发者 容器
SAP OData metadata.xml 里 EntityType,EntitySet 和 EntityContainer 三个概念之间的区别和联系
SAP OData metadata.xml 里 EntityType,EntitySet 和 EntityContainer 三个概念之间的区别和联系
24 0
|
2月前
|
存储 对象存储 开发者
SAP CRM attachment 存储模型的技术属性详解
SAP CRM attachment 存储模型的技术属性详解
19 1
SAP CRM attachment 存储模型的技术属性详解
|
2月前
|
机器学习/深度学习 人工智能 监控
SAP Sales Cloud,Service Cloud 和 SAP BTP 平台上的 AI 集成场景
SAP Sales Cloud,Service Cloud 和 SAP BTP 平台上的 AI 集成场景
67 0
|
3月前
|
前端开发 JavaScript NoSQL
【2023版】作为一名 ABAP 资深顾问,下一步可以选择哪一门 SAP 技术作为主攻方向?
【2023版】作为一名 ABAP 资深顾问,下一步可以选择哪一门 SAP 技术作为主攻方向?
24 0