@openui5/sap.ui.core 1.96.2 → 1.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.reuse/dep5 +1 -1
  3. package/THIRDPARTY.txt +2 -1
  4. package/package.json +1 -1
  5. package/src/jquery.sap.global.js +1 -1
  6. package/src/jquery.sap.properties.js +1 -1
  7. package/src/jquery.sap.resources.js +2 -2
  8. package/src/jquery.sap.script.js +1 -1
  9. package/src/jquery.sap.storage.js +3 -3
  10. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  11. package/src/sap/base/util/restricted/_castArray.js +1 -1
  12. package/src/sap/base/util/restricted/_compact.js +1 -1
  13. package/src/sap/base/util/restricted/_curry.js +1 -1
  14. package/src/sap/base/util/restricted/_debounce.js +1 -1
  15. package/src/sap/base/util/restricted/_difference.js +1 -1
  16. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  17. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  18. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  19. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  20. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  21. package/src/sap/base/util/restricted/_flatten.js +1 -1
  22. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  23. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  24. package/src/sap/base/util/restricted/_intersection.js +1 -1
  25. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  26. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  27. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  28. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  29. package/src/sap/base/util/restricted/_isNil.js +1 -1
  30. package/src/sap/base/util/restricted/_max.js +1 -1
  31. package/src/sap/base/util/restricted/_merge.js +1 -1
  32. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  33. package/src/sap/base/util/restricted/_min.js +1 -1
  34. package/src/sap/base/util/restricted/_omit.js +1 -1
  35. package/src/sap/base/util/restricted/_pick.js +1 -1
  36. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  37. package/src/sap/base/util/restricted/_throttle.js +1 -1
  38. package/src/sap/base/util/restricted/_toArray.js +1 -1
  39. package/src/sap/base/util/restricted/_union.js +1 -1
  40. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  41. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  42. package/src/sap/base/util/restricted/_uniq.js +1 -1
  43. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  44. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  45. package/src/sap/base/util/restricted/_without.js +1 -1
  46. package/src/sap/base/util/restricted/_xor.js +1 -1
  47. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  48. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  49. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  50. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  51. package/src/sap/ui/Device.js +4 -4
  52. package/src/sap/ui/Global.js +11 -16
  53. package/src/sap/ui/base/Event.js +1 -1
  54. package/src/sap/ui/base/EventProvider.js +1 -1
  55. package/src/sap/ui/base/Interface.js +1 -1
  56. package/src/sap/ui/base/ManagedObject.js +3 -3
  57. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  58. package/src/sap/ui/base/Metadata.js +1 -3
  59. package/src/sap/ui/base/Object.js +1 -1
  60. package/src/sap/ui/base/ObjectPool.js +1 -1
  61. package/src/sap/ui/core/.library +1 -27
  62. package/src/sap/ui/core/AppCacheBuster.js +4 -4
  63. package/src/sap/ui/core/BusyIndicator.js +1 -1
  64. package/src/sap/ui/core/Component.js +31 -9
  65. package/src/sap/ui/core/ComponentContainer.js +1 -1
  66. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  67. package/src/sap/ui/core/ComponentSupport.js +1 -1
  68. package/src/sap/ui/core/Control.js +2 -2
  69. package/src/sap/ui/core/Core.js +2 -2
  70. package/src/sap/ui/core/CustomData.js +1 -1
  71. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  72. package/src/sap/ui/core/Element.js +2 -6
  73. package/src/sap/ui/core/ElementMetadata.js +1 -1
  74. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  75. package/src/sap/ui/core/EventBus.js +1 -1
  76. package/src/sap/ui/core/Fragment.js +1 -1
  77. package/src/sap/ui/core/HTML.js +3 -3
  78. package/src/sap/ui/core/History.js +1 -1
  79. package/src/sap/ui/core/Icon.js +1 -1
  80. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  81. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  82. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  83. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  84. package/src/sap/ui/core/InvisibleText.js +1 -1
  85. package/src/sap/ui/core/Item.js +1 -1
  86. package/src/sap/ui/core/LabelEnablement.js +1 -1
  87. package/src/sap/ui/core/LayoutData.js +1 -1
  88. package/src/sap/ui/core/ListItem.js +1 -1
  89. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  90. package/src/sap/ui/core/Locale.js +1 -1
  91. package/src/sap/ui/core/LocaleData.js +3 -3
  92. package/src/sap/ui/core/Manifest.js +1 -1
  93. package/src/sap/ui/core/Message.js +1 -1
  94. package/src/sap/ui/core/RenderManager.js +3 -3
  95. package/src/sap/ui/core/Renderer.js +1 -1
  96. package/src/sap/ui/core/ResizeHandler.js +1 -1
  97. package/src/sap/ui/core/ScrollBar.js +4 -3
  98. package/src/sap/ui/core/SeparatorItem.js +1 -1
  99. package/src/sap/ui/core/ThemeCheck.js +2 -2
  100. package/src/sap/ui/core/Title.js +1 -1
  101. package/src/sap/ui/core/TooltipBase.js +1 -1
  102. package/src/sap/ui/core/UIArea.js +3 -3
  103. package/src/sap/ui/core/UIComponent.js +1 -1
  104. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  105. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  106. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  107. package/src/sap/ui/core/XMLComposite.js +1 -1
  108. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  109. package/src/sap/ui/core/XMLTemplateProcessor.js +19 -5
  110. package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
  111. package/src/sap/ui/core/date/UniversalDateUtils.js +33 -0
  112. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  113. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  114. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  115. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  116. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  117. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  118. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  119. package/src/sap/ui/core/library.js +5 -5
  120. package/src/sap/ui/core/message/ControlMessageProcessor.js +5 -5
  121. package/src/sap/ui/core/message/Message.js +1 -1
  122. package/src/sap/ui/core/message/MessageManager.js +1 -1
  123. package/src/sap/ui/core/message/MessageParser.js +1 -1
  124. package/src/sap/ui/core/message/MessageProcessor.js +22 -12
  125. package/src/sap/ui/core/messagebundle_fr.properties +7 -7
  126. package/src/sap/ui/core/messagebundle_ru.properties +21 -21
  127. package/src/sap/ui/core/mvc/Controller.js +4 -4
  128. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  129. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  130. package/src/sap/ui/core/mvc/JSView.js +1 -1
  131. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  132. package/src/sap/ui/core/mvc/View.js +1 -1
  133. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  134. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  135. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  136. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  137. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  138. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  139. package/src/sap/ui/core/rules/Misc.support.js +51 -1
  140. package/src/sap/ui/core/rules/Rendering.support.js +1 -4
  141. package/src/sap/ui/core/rules/View.support.js +14 -46
  142. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  143. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  144. package/src/sap/ui/core/service/Service.js +1 -1
  145. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  146. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  147. package/src/sap/ui/core/support/Plugin.js +2 -2
  148. package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -1
  149. package/src/sap/ui/core/support/Support.js +1 -1
  150. package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
  151. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  152. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  153. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  154. package/src/sap/ui/core/support/plugins/Performance.js +1 -2
  155. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  156. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  157. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  158. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  159. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
  160. package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
  161. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  162. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  163. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  164. package/src/sap/ui/core/tmpl/Template.js +1 -1
  165. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  166. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  167. package/src/sap/ui/core/util/Export.js +1 -1
  168. package/src/sap/ui/core/util/ExportCell.js +1 -1
  169. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  170. package/src/sap/ui/core/util/ExportRow.js +1 -1
  171. package/src/sap/ui/core/util/ExportType.js +1 -1
  172. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  173. package/src/sap/ui/core/util/File.js +1 -1
  174. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  175. package/src/sap/ui/core/util/MockServer.js +2 -2
  176. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  177. package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +4 -4
  178. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  179. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  180. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  181. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  182. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  183. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  184. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  185. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  186. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  187. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  188. package/src/sap/ui/debug/ControlTree.js +1 -1
  189. package/src/sap/ui/debug/DebugEnv.js +1 -1
  190. package/src/sap/ui/debug/PropertyList.js +1 -1
  191. package/src/sap/ui/model/ChangeReason.js +1 -1
  192. package/src/sap/ui/model/ClientListBinding.js +7 -0
  193. package/src/sap/ui/model/ClientModel.js +6 -5
  194. package/src/sap/ui/model/ClientTreeBindingAdapter.js +1 -1
  195. package/src/sap/ui/model/CompositeDataState.js +1 -1
  196. package/src/sap/ui/model/CompositeType.js +1 -1
  197. package/src/sap/ui/model/DataState.js +1 -1
  198. package/src/sap/ui/model/ListBinding.js +24 -5
  199. package/src/sap/ui/model/MetaModel.js +1 -1
  200. package/src/sap/ui/model/Model.js +5 -10
  201. package/src/sap/ui/model/SelectionModel.js +1 -1
  202. package/src/sap/ui/model/SimpleType.js +1 -1
  203. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  204. package/src/sap/ui/model/TreeBindingAdapter.js +0 -2
  205. package/src/sap/ui/model/TreeBindingUtils.js +2 -0
  206. package/src/sap/ui/model/Type.js +1 -1
  207. package/src/sap/ui/model/analytics/AnalyticalBinding.js +12 -6
  208. package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +16 -18
  209. package/src/sap/ui/model/json/JSONModel.js +7 -7
  210. package/src/sap/ui/model/json/JSONPropertyBinding.js +1 -1
  211. package/src/sap/ui/model/message/MessageModel.js +3 -3
  212. package/src/sap/ui/model/message/MessagePropertyBinding.js +1 -1
  213. package/src/sap/ui/model/odata/AnnotationHelper.js +2 -2
  214. package/src/sap/ui/model/odata/AnnotationParser.js +4 -2
  215. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  216. package/src/sap/ui/model/odata/ODataListBinding.js +61 -38
  217. package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
  218. package/src/sap/ui/model/odata/ODataMetaModel.js +3 -3
  219. package/src/sap/ui/model/odata/ODataMetadata.js +136 -85
  220. package/src/sap/ui/model/odata/ODataModel.js +442 -215
  221. package/src/sap/ui/model/odata/ODataPropertyBinding.js +7 -5
  222. package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +27 -17
  223. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +440 -260
  224. package/src/sap/ui/model/odata/ODataUtils.js +24 -9
  225. package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +2 -1
  226. package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +10 -8
  227. package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +6 -4
  228. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  229. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  230. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  231. package/src/sap/ui/model/odata/type/Date.js +1 -1
  232. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  233. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  234. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  235. package/src/sap/ui/model/odata/type/Decimal.js +5 -1
  236. package/src/sap/ui/model/odata/type/Double.js +1 -1
  237. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  238. package/src/sap/ui/model/odata/type/Int.js +1 -1
  239. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  240. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  241. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  242. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  243. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  244. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  245. package/src/sap/ui/model/odata/type/Single.js +1 -1
  246. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  247. package/src/sap/ui/model/odata/type/String.js +1 -1
  248. package/src/sap/ui/model/odata/type/Time.js +1 -1
  249. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  250. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  251. package/src/sap/ui/model/odata/type/UnitMixin.js +0 -1
  252. package/src/sap/ui/model/odata/v2/Context.js +42 -11
  253. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  254. package/src/sap/ui/model/odata/v2/ODataListBinding.js +205 -88
  255. package/src/sap/ui/model/odata/v2/ODataModel.js +154 -89
  256. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +162 -89
  257. package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +52 -2
  258. package/src/sap/ui/model/odata/v4/Context.js +48 -7
  259. package/src/sap/ui/model/odata/v4/ODataBinding.js +55 -24
  260. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +67 -19
  261. package/src/sap/ui/model/odata/v4/ODataListBinding.js +211 -78
  262. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
  263. package/src/sap/ui/model/odata/v4/ODataModel.js +2 -1
  264. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +36 -23
  265. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
  266. package/src/sap/ui/model/odata/v4/lib/_Cache.js +106 -11
  267. package/src/sap/ui/model/odata/v4/lib/_Helper.js +33 -3
  268. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +11 -2
  269. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  270. package/src/sap/ui/model/type/Boolean.js +1 -1
  271. package/src/sap/ui/model/type/Currency.js +1 -1
  272. package/src/sap/ui/model/type/Date.js +1 -1
  273. package/src/sap/ui/model/type/DateInterval.js +1 -1
  274. package/src/sap/ui/model/type/DateTime.js +1 -1
  275. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  276. package/src/sap/ui/model/type/FileSize.js +1 -1
  277. package/src/sap/ui/model/type/Float.js +1 -1
  278. package/src/sap/ui/model/type/Integer.js +1 -1
  279. package/src/sap/ui/model/type/String.js +1 -1
  280. package/src/sap/ui/model/type/Time.js +1 -1
  281. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  282. package/src/sap/ui/model/type/Unit.js +1 -1
  283. package/src/sap/ui/model/xml/XMLModel.js +5 -5
  284. package/src/sap/ui/model/xml/XMLPropertyBinding.js +1 -1
  285. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  286. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  287. package/src/sap/ui/test/actions/Action.js +9 -2
  288. package/src/sap/ui/test/actions/Press.js +28 -1
  289. package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
  290. package/src/sap/ui/util/Mobile.js +28 -39
  291. package/src/sap/ui/util/Storage.js +1 -1
  292. package/src/ui5loader.js +6 -6
  293. package/ui5.yaml +244 -1
  294. package/src/sap/ui/core/CustomizingConfiguration.js +0 -47
  295. package/src/sap/ui/thirdparty/baseuri.js +0 -1
  296. package/src/sap/ui/thirdparty/es6-object-assign.js +0 -1
  297. package/src/sap/ui/thirdparty/es6-promise.js +0 -1
  298. package/src/sap/ui/thirdparty/es6-shim-nopromise.js +0 -1
  299. package/src/sap/ui/thirdparty/es6-string-methods.js +0 -1
  300. package/src/sap/ui/thirdparty/flexie.js +0 -1
  301. package/src/sap/ui/thirdparty/unorm.js +0 -1
  302. package/src/sap/ui/thirdparty/unormdata.js +0 -1
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * Implementation to access OData metadata
45
45
  *
46
46
  * @author SAP SE
47
- * @version 1.96.2
47
+ * @version 1.97.0
48
48
  *
49
49
  * @public
50
50
  * @alias sap.ui.model.odata.ODataMetadata
@@ -528,11 +528,14 @@ sap.ui.define([
528
528
  };
529
529
 
530
530
  /**
531
- * Extract the entity type name of a given path. Also navigation properties in the path will be followed to get the right entity type for that property.
531
+ * Extract the entity type name of a given path. Also navigation properties in the path will be
532
+ * followed to get the right entity type for that property.
532
533
  * eg.
533
534
  * /Categories(1)/Products(1)/Category --> will get the Categories entity type
534
535
  * /Products --> will get the Products entity type
535
- * @return {object} the entity type or null if not found
536
+ *
537
+ * @param {string} sPath The entity types path
538
+ * @return {object} The entity type or null if not found
536
539
  */
537
540
  ODataMetadata.prototype._getEntityTypeByPath = function(sPath) {
538
541
  if (!sPath) {
@@ -656,6 +659,8 @@ sap.ui.define([
656
659
  oEntityType.namespace = oSchema.namespace;
657
660
  return false;
658
661
  }
662
+
663
+ return true;
659
664
  });
660
665
  }
661
666
  });
@@ -678,9 +683,14 @@ sap.ui.define([
678
683
  };
679
684
 
680
685
  /**
681
- * Extracts an Annotation from given path parts
682
- * @param {array} aMetaParts
683
- * @returns {any}
686
+ * Extracts an Annotation from given path parts.
687
+ *
688
+ * @param {string} sPath
689
+ * The metadata path to the annotation
690
+ * @returns {object|undefined}
691
+ * The annotation for the given metadata path; returns <code>undefined</code> if no annotation
692
+ * can be found for that path
693
+ *
684
694
  * @private
685
695
  */
686
696
  ODataMetadata.prototype._getAnnotation = function(sPath) {
@@ -697,7 +707,7 @@ sap.ui.define([
697
707
  assert(oEntityType, aMetaParts[0] + " is not a valid EntityType");
698
708
 
699
709
  if (!oEntityType) {
700
- return;
710
+ return undefined;
701
711
  }
702
712
 
703
713
  //extract property
@@ -706,7 +716,7 @@ sap.ui.define([
706
716
 
707
717
  assert(oProperty, sPropertyPath + " is not a valid property path");
708
718
  if (!oProperty) {
709
- return;
719
+ return undefined;
710
720
  }
711
721
 
712
722
  sMetaPath = sPropertyPath.substr(sPropertyPath.indexOf(oProperty.name));
@@ -718,7 +728,7 @@ sap.ui.define([
718
728
  assert(oEntityType, aParts[0] + " is not a valid path");
719
729
 
720
730
  if (!oEntityType) {
721
- return;
731
+ return undefined;
722
732
  }
723
733
 
724
734
  //extract property
@@ -731,7 +741,7 @@ sap.ui.define([
731
741
 
732
742
  assert(oProperty, sPropertyPath + " is not a valid property path");
733
743
  if (!oProperty) {
734
- return;
744
+ return undefined;
735
745
  }
736
746
 
737
747
  sMetaPath = aMetaParts.join('/');
@@ -745,15 +755,19 @@ sap.ui.define([
745
755
  };
746
756
 
747
757
  /**
748
- * Extract the Annotation Object from a given oProperty and a metadata path
758
+ * Gets the annotation specified by the given metadata path in the given metadata object for the
759
+ * given type.
749
760
  *
750
- * @return {object} the annotation object/value
761
+ * @param {object} oEntityType The entity type of the property
762
+ * @param {object} oObject The metadata object
763
+ * @param {string} sMetaDataPath The metadata path
764
+ * @return {object|undefined} The annotation object/value
751
765
  */
752
766
  ODataMetadata.prototype._getAnnotationObject = function(oEntityType, oObject, sMetaDataPath) {
753
- var aAnnotationParts, aParts, oAnnotation, oNode, sAnnotation;
767
+ var oAnnotation, sAnnotation, aAnnotationParts, oExtension, i, oNode, aParts;
754
768
 
755
769
  if (!oObject) {
756
- return;
770
+ return undefined;
757
771
  }
758
772
 
759
773
  oNode = oObject;
@@ -762,48 +776,45 @@ sap.ui.define([
762
776
  //V4 annotation
763
777
  if (aParts[0].indexOf('.') > -1) {
764
778
  return this._getV4AnnotationObject(oEntityType, oObject, aParts);
765
- } else {
766
- if (aParts.length > 1) {
767
- //TODO:namespace handling
768
- oNode = oNode[aParts[0]];
769
- if (!oNode && oObject.extensions) {
770
- for (var i = 0; i < oObject.extensions.length; i++) {
771
- var oExtension = oObject.extensions[i];
772
- if (oExtension.name == aParts[0]) {
773
- oNode = oExtension;
774
- break;
775
- }
779
+ } else if (aParts.length > 1) {
780
+ // Additional namespace handling cannot be done to keep compatibility
781
+ oNode = oNode[aParts[0]];
782
+ if (!oNode && oObject.extensions) {
783
+ for (i = 0; i < oObject.extensions.length; i++) {
784
+ oExtension = oObject.extensions[i];
785
+ if (oExtension.name == aParts[0]) {
786
+ oNode = oExtension;
787
+ break;
776
788
  }
777
789
  }
778
- sMetaDataPath = aParts.splice(0,1);
779
- oAnnotation = this._getAnnotationObject(oEntityType, oNode, aParts.join('/'));
780
- } else {
781
- //handle attributes
782
- if (aParts[0].indexOf('@') > -1) {
783
- sAnnotation = aParts[0].substr(1);
784
- aAnnotationParts = sAnnotation.split(':');
785
- oAnnotation = oNode[aAnnotationParts[0]];
786
- if (!oAnnotation && oNode.extensions) {
787
- for (var i = 0; i < oNode.extensions.length; i++) {
788
- var oExtension = oNode.extensions[i];
789
- if (oExtension.name === aAnnotationParts[1] && oExtension.namespace === this.mNamespaces[aAnnotationParts[0]]) {
790
- oAnnotation = oExtension.value;
791
- break;
792
- }
793
- }
790
+ }
791
+ sMetaDataPath = aParts.splice(0,1);
792
+ oAnnotation = this._getAnnotationObject(oEntityType, oNode, aParts.join('/'));
793
+ } else if (aParts[0].indexOf('@') > -1) { //handle attributes
794
+ sAnnotation = aParts[0].substr(1);
795
+ aAnnotationParts = sAnnotation.split(':');
796
+ oAnnotation = oNode[aAnnotationParts[0]];
797
+ if (!oAnnotation && oNode.extensions) {
798
+ for (i = 0; i < oNode.extensions.length; i++) {
799
+ oExtension = oNode.extensions[i];
800
+ if (oExtension.name === aAnnotationParts[1]
801
+ && oExtension.namespace === this.mNamespaces[aAnnotationParts[0]]) {
802
+ oAnnotation = oExtension.value;
803
+ break;
794
804
  }
795
- } else { // handle nodes
796
- aAnnotationParts = aParts[0].split(':');
797
- oAnnotation = oNode[aAnnotationParts[0]];
798
- oAnnotation = oNode[aParts[0]];
799
- if (!oAnnotation && oNode.extensions) {
800
- for (var i = 0; i < oNode.extensions.length; i++) {
801
- var oExtension = oNode.extensions[i];
802
- if (oExtension.name === aAnnotationParts[1] && oExtension.namespace === this.mNamespaces[aAnnotationParts[0]]) {
803
- oAnnotation = oExtension;
804
- break;
805
- }
806
- }
805
+ }
806
+ }
807
+ } else { // handle nodes
808
+ aAnnotationParts = aParts[0].split(':');
809
+ oAnnotation = oNode[aAnnotationParts[0]];
810
+ oAnnotation = oNode[aParts[0]];
811
+ if (!oAnnotation && oNode.extensions) {
812
+ for (i = 0; i < oNode.extensions.length; i++) {
813
+ oExtension = oNode.extensions[i];
814
+ if (oExtension.name === aAnnotationParts[1]
815
+ && oExtension.namespace === this.mNamespaces[aAnnotationParts[0]]) {
816
+ oAnnotation = oExtension;
817
+ break;
807
818
  }
808
819
  }
809
820
  }
@@ -811,7 +822,15 @@ sap.ui.define([
811
822
  return oAnnotation;
812
823
  };
813
824
 
814
- /*
825
+ /**
826
+ * Gets the annotation specified by the given metadata path in the given metadata object for the
827
+ * given type.
828
+ *
829
+ * @param {object} oEntityType The entity type of the property
830
+ * @param {object} oObject The metadata object
831
+ * @param {string[]} aParts The metadata path; must contain exactly one element
832
+ * @return {object|undefined} The annotation object/value
833
+ *
815
834
  * @private
816
835
  */
817
836
  ODataMetadata.prototype._getV4AnnotationObject = function(oEntityType, oObject, aParts) {
@@ -819,7 +838,7 @@ sap.ui.define([
819
838
 
820
839
  if (aParts.length > 1) {
821
840
  assert(aParts.length == 1, "'" + aParts.join('/') + "' is not a valid annotation path");
822
- return;
841
+ return undefined;
823
842
  }
824
843
 
825
844
  var sTargetName = oEntityType.namespace ? oEntityType.namespace + "." : "";
@@ -833,6 +852,7 @@ sap.ui.define([
833
852
  aAnnotations.push(oObject.annotation);
834
853
  return false;
835
854
  }
855
+ return true;
836
856
  });
837
857
  }
838
858
  });
@@ -849,7 +869,13 @@ sap.ui.define([
849
869
  };
850
870
 
851
871
  /**
852
- * splits a name e.g. Namespace.Name into [Name, Namespace]
872
+ * Splits a full qualified name into its namespace and its name, for example splits
873
+ * "my.namespace.Foo" into {name : "Foo", namespace : "my.namespace"}.
874
+ *
875
+ * @param {string} sFullName
876
+ * The full name
877
+ * @returns {object}
878
+ * An object containing the properties <code>name</code> and <code>namespace</code>
853
879
  */
854
880
  ODataMetadata.prototype._splitName = function(sFullName) {
855
881
  var oInfo = {};
@@ -863,13 +889,16 @@ sap.ui.define([
863
889
 
864
890
 
865
891
  /**
866
- * search metadata for specified collection name (= entity set name)
867
- */
868
- ODataMetadata.prototype._getEntityTypeName = function(sCollection) {
892
+ * Gets the entity type name for the given entity set name.
893
+ *
894
+ * @param {string} sEntitySetName The collection name
895
+ * @returns {string} The name of the collection's entity type
896
+ */
897
+ ODataMetadata.prototype._getEntityTypeName = function(sEntitySetName) {
869
898
  var sEntityTypeName, oEntitySet;
870
899
 
871
- if (sCollection) {
872
- oEntitySet = this._findEntitySetByName(sCollection);
900
+ if (sEntitySetName) {
901
+ oEntitySet = this._findEntitySetByName(sEntitySetName);
873
902
  if (oEntitySet){
874
903
  sEntityTypeName = oEntitySet.entityType;
875
904
  }
@@ -878,7 +907,12 @@ sap.ui.define([
878
907
  };
879
908
 
880
909
  /**
881
- * get the object of a specified type name and namespace
910
+ * Gets the object of a specified type name and namespace.
911
+ *
912
+ * @param {string} sObjectType The object's type
913
+ * @param {string} sObjectName The object's name
914
+ * @param {string} sNamespace The object's namespace
915
+ * @returns {object} The found object
882
916
  */
883
917
  ODataMetadata.prototype._getObjectMetadata = function(sObjectType, sObjectName, sNamespace) {
884
918
  var oObject;
@@ -893,9 +927,11 @@ sap.ui.define([
893
927
  oObject.namespace = oSchema.namespace;
894
928
  return false;
895
929
  }
930
+ return true;
896
931
  });
897
932
  return !oObject;
898
933
  }
934
+ return true;
899
935
  });
900
936
  }
901
937
  return oObject;
@@ -918,6 +954,7 @@ sap.ui.define([
918
954
  bUseBatch = (typeof oExtension.value === 'string') ? (oExtension.value.toLowerCase() === 'true') : !!oExtension.value;
919
955
  return false;
920
956
  }
957
+ return true;
921
958
  });
922
959
  }
923
960
  });
@@ -942,6 +979,7 @@ sap.ui.define([
942
979
  return false;
943
980
  }
944
981
  }
982
+ return true;
945
983
  });
946
984
  }
947
985
  // break if single entry is wanted and there is exactly one
@@ -979,6 +1017,8 @@ sap.ui.define([
979
1017
  *
980
1018
  * @param {string} sFunctionName The name of the function import to look up
981
1019
  * @param {string} sMethod The HTTP Method for which this function is requested
1020
+ *
1021
+ * @returns {object|null} The function import metadata
982
1022
  */
983
1023
  ODataMetadata.prototype._getFunctionImportMetadata = function(sFunctionName, sMethod) {
984
1024
  if (sFunctionName.indexOf("/") > -1) {
@@ -991,7 +1031,7 @@ sap.ui.define([
991
1031
 
992
1032
 
993
1033
  /**
994
- * Returns the target EntityType for NavgigationProperty-name of another given Entytype object. The target is
1034
+ * Returns the target EntityType for the NavigationProperty of a given EntityType object. The target is
995
1035
  * defined as the toRole of the navigationproperty; this method looks up the corresponding matching End in the
996
1036
  * corresponding Association and returns the matching entityType
997
1037
  * @see sap.ui.model.odata.ODataMetadata#_getEntityTypeByNavPropertyObject
@@ -1018,7 +1058,7 @@ sap.ui.define([
1018
1058
 
1019
1059
 
1020
1060
  /**
1021
- * Returns the target EntityType for a given NavgigationProperty object. The target is defined as the toRole of
1061
+ * Returns the target EntityType for a given NavigationProperty object. The target is defined as the toRole of
1022
1062
  * the navigationproperty; this method looks up the corresponding matching End in the corresponding Association
1023
1063
  * and returns the matching entityType
1024
1064
  *
@@ -1049,7 +1089,10 @@ sap.ui.define([
1049
1089
  };
1050
1090
 
1051
1091
  /**
1052
- * get all navigation property names in an array by the specified entity type
1092
+ * Get all navigation property names in an array by the specified entity type.
1093
+ *
1094
+ * @param {object} oEntityType The entity type
1095
+ * @returns {string[]} An array containing the navigation property names
1053
1096
  */
1054
1097
  ODataMetadata.prototype._getNavigationPropertyNames = function(oEntityType) {
1055
1098
  var aNavProps = [];
@@ -1062,10 +1105,14 @@ sap.ui.define([
1062
1105
  };
1063
1106
 
1064
1107
  /**
1065
- * Get dependent nav property name, entityset and key properties for given entity and property name.
1066
- * If the property name is contained as key property in a referential constraint of one of
1108
+ * Get dependent nav property name, entityset and key properties for given entity and property
1109
+ * name. If the property name is contained as key property in a referential constraint of one of
1067
1110
  * the navigation properties, return the name of the navigation property, as well as the
1068
1111
  * referenced entityset and the array of key properties.
1112
+ *
1113
+ * @param {object} oEntityType The entity type
1114
+ * @param {string} sPropertyName The property name
1115
+ * @returns {object} An object containing information about the navigation property
1069
1116
  */
1070
1117
  ODataMetadata.prototype._getNavPropertyRefInfo = function(oEntityType, sPropertyName) {
1071
1118
  var oNavPropInfo, oAssociation, oAssociationInfo, oAssociationSet, oPrincipal, oDependent,
@@ -1113,13 +1160,18 @@ sap.ui.define([
1113
1160
  };
1114
1161
 
1115
1162
  /**
1116
- * extract the property metadata of a specified property of an entity type out of the metadata document
1117
- */
1163
+ * Extract the property metadata of a specified property of an entity type out of the metadata
1164
+ * document.
1165
+ *
1166
+ * @param {object} oEntityType The entity type
1167
+ * @param {string} sProperty The property in the entity type
1168
+ * @returns {object} The property's metadata
1169
+ */
1118
1170
  ODataMetadata.prototype._getPropertyMetadata = function(oEntityType, sProperty) {
1119
1171
  var oPropertyMetadata, that = this;
1120
1172
 
1121
1173
  if (!oEntityType) {
1122
- return;
1174
+ return undefined;
1123
1175
  }
1124
1176
 
1125
1177
  // remove starting/trailing /
@@ -1131,6 +1183,7 @@ sap.ui.define([
1131
1183
  oPropertyMetadata = oProperty;
1132
1184
  return false;
1133
1185
  }
1186
+ return true;
1134
1187
  });
1135
1188
 
1136
1189
  if (aParts.length > 1) {
@@ -1209,9 +1262,11 @@ sap.ui.define([
1209
1262
  };
1210
1263
 
1211
1264
  /**
1212
- * creation of a request object for changes
1265
+ * Creates a request object for changes.
1266
+ *
1267
+ * @param {string} sUrl The request URL
1268
+ * @return {object} The request object
1213
1269
  *
1214
- * @return {object} request object
1215
1270
  * @private
1216
1271
  */
1217
1272
  ODataMetadata.prototype._createRequest = function(sUrl) {
@@ -1254,16 +1309,14 @@ sap.ui.define([
1254
1309
 
1255
1310
  oEntityType = this._getEntityTypeByPath(sEntityPath);
1256
1311
 
1257
- if (oEntityType) {
1258
- return this._entitySetMap[oEntityType.entityType];
1259
- }
1312
+ return oEntityType && this._entitySetMap[oEntityType.entityType];
1260
1313
  };
1261
1314
 
1262
1315
  /**
1263
- * Add metadata url: The response will be merged with the existing metadata object
1316
+ * Add metadata url: The response will be merged with the existing metadata object.
1264
1317
  *
1265
- * @param {string | string[]} vUrl Either one URL as string or an array of Uri strings
1266
- * @returns Promise The Promise for metadata loading
1318
+ * @param {string|string[]} vUrl Either one URL as string or an array of URI strings
1319
+ * @returns {Promise} The Promise for metadata loading
1267
1320
  * @private
1268
1321
  */
1269
1322
  ODataMetadata.prototype._addUrl = function(vUrl) {
@@ -1355,7 +1408,7 @@ sap.ui.define([
1355
1408
  * Returns the first EntitySet from all EntityContainers that matches the namespace and name of the given EntityType
1356
1409
  *
1357
1410
  * @param {map} mEntityType - The EntityType object
1358
- * @return {map|null} Retuns the EntitySet object or null if not found
1411
+ * @return {map|null} Returns the EntitySet object or null if not found
1359
1412
  */
1360
1413
  ODataMetadata.prototype._getEntitySetByType = function(mEntityType) {
1361
1414
  var sEntityType = mEntityType.namespace + "." + mEntityType.name;
@@ -1421,7 +1474,7 @@ sap.ui.define([
1421
1474
  * Returns the first AssociationSet from all EntityContainers that matches the association name
1422
1475
  *
1423
1476
  * @param {string} sAssociation The full qualified association name
1424
- * @return {map|null} Retuns the AssocationSet object or null if not found
1477
+ * @return {map|null} Returns the AssociationSet object or null if not found
1425
1478
  */
1426
1479
  ODataMetadata.prototype._getAssociationSetByAssociation = function(sAssociation) {
1427
1480
  var aSchema = this.oMetadata.dataServices.schema;
@@ -1598,11 +1651,9 @@ sap.ui.define([
1598
1651
  } else { // EntitySet or FunctionImport
1599
1652
  oEntityType = this._getEntityTypeByPath(sPath);
1600
1653
  }
1601
- if (oEntityType) {
1602
- return oEntityType.key.propertyRef.map(function (oKey) {
1603
- return oKey.name;
1604
- });
1605
- }
1654
+ return oEntityType && oEntityType.key.propertyRef.map(function (oKey) {
1655
+ return oKey.name;
1656
+ });
1606
1657
  };
1607
1658
 
1608
1659
  /**