@sapui5/sap.ushell_abap 1.94.1 → 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.
- package/package.json +1 -1
- package/src/main/js/sap/ui2/srvc/ODataWrapper.js +1 -1
- package/src/main/js/sap/ushell_abap/.library +4 -9
- package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +12 -5
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +11 -7
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +47 -32
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +46 -38
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +574 -454
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +25 -15
- package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +3 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +16 -7
- package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +8 -8
- package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +11 -4
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +9 -3
- package/src/main/js/sap/ushell_abap/bootstrap/evo/XhrLogonEventHandler.js +13 -11
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +8 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.constants.js +9 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.get.server.config.Urls.js +12 -5
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +21 -22
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +8 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.server.config.js +6 -3
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +10 -5
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.ui5.boot.handler.js +7 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhr.handler.js +10 -3
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +21 -16
- package/src/main/js/sap/ushell_abap/library.js +2 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/AllCatalogs.js +186 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +718 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +930 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +1027 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipDefinition.js +216 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +951 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Error.js +45 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +647 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataService.js +251 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +1262 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +920 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageBuildingService.js +1498 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageSet.js +466 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/RemoteCatalogService.js +52 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +767 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/chipdefinition.xsd +139 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +244 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/bag.js +150 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +165 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +330 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/fullscreen.js +70 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/navigation.js +50 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/preview.js +289 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/refresh.js +43 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/search.js +115 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/types.js +9 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/url.js +105 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/visible.js +128 -0
- package/ui5.yaml +31 -0
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/Component.js +0 -426
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/css/style.css +0 -1
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n.properties +0 -56
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ar.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_bg.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ca.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_cs.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_cy.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_da.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_de.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_el.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_GB.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_US_sappsd.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_US_saprigi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_US_saptrc.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_es.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_es_MX.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_et.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_fi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_fr.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_fr_CA.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_hi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_hr.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_hu.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_id.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_it.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_iw.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ja.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_kk.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ko.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_lt.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_lv.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ms.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_nl.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_no.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_pl.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_pt.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_pt_PT.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ro.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ru.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sh.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sk.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sl.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sv.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_th.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_tr.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_uk.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_vi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_zh_CN.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_zh_TW.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/manifest.json +0 -153
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/model/models.js +0 -14
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
// Copyright (c) 2009-2021 SAP SE. All rights reserved.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview A facade to any OData service, providing CSRF token handling and a default
|
|
5
|
+
* error handler.
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ushell_abap/pbServices/ui2/Utils",
|
|
9
|
+
"sap/ushell_abap/pbServices/ui2/Error"
|
|
10
|
+
], function (
|
|
11
|
+
Utils,
|
|
12
|
+
SrvcError
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
var mCsrfTokens = new Utils.Map();
|
|
17
|
+
|
|
18
|
+
// "public class" ************************************************************
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Constructs a facade to any OData service, providing token handling for SAP NetWeaver Gateway's
|
|
22
|
+
* token-based CSRF protection mechanism.
|
|
23
|
+
*
|
|
24
|
+
* @param {sap.ushell_abap.pbServices.ui2.ODataWrapper} oODataWrapper
|
|
25
|
+
* OData wrapper instance this service facade delegates to
|
|
26
|
+
* @param {function (string, object=)} [fnDefaultFailure]
|
|
27
|
+
* error handler taking an error message and, since version 1.28.6, an
|
|
28
|
+
* optional object containing the complete error information as delivered
|
|
29
|
+
* by the ODataService. See fnFailure parameter of {@link sap.ushell_abap.pbServices.ui2.ODataWrapper#onError}
|
|
30
|
+
* for more details.
|
|
31
|
+
*
|
|
32
|
+
* @class
|
|
33
|
+
* @borrows sap.ushell_abap.pbServices.ui2.ODataWrapper#submitBatchQueue as #submitBatchQueue
|
|
34
|
+
* @public
|
|
35
|
+
* @since 1.19.0
|
|
36
|
+
*/
|
|
37
|
+
var ODataService = function (oODataWrapper, fnDefaultFailure) {
|
|
38
|
+
var sBaseUrl;
|
|
39
|
+
|
|
40
|
+
// BEWARE: constructor code below!
|
|
41
|
+
|
|
42
|
+
// "private" methods -------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
// "public" methods --------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Returns the current value of the CSRF token. It is initially empty and determined
|
|
48
|
+
* automatically by <code>sap.ushell_abap.pbServices.ui2.ODataWrapper</code> on successful read requests.
|
|
49
|
+
*
|
|
50
|
+
* @returns {string}
|
|
51
|
+
* the current value of the CSRF token
|
|
52
|
+
* @public
|
|
53
|
+
* @since 1.7.0
|
|
54
|
+
* @see #refreshCsrfToken
|
|
55
|
+
* @see #setCsrfToken
|
|
56
|
+
*/
|
|
57
|
+
this.getCsrfToken = function () {
|
|
58
|
+
if (mCsrfTokens.get(sBaseUrl) && mCsrfTokens.get(sBaseUrl).token) {
|
|
59
|
+
return mCsrfTokens.get(sBaseUrl).token;
|
|
60
|
+
}
|
|
61
|
+
return "";
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Returns the default error handler for this facade.
|
|
66
|
+
*
|
|
67
|
+
* @returns {function (string, object=)}
|
|
68
|
+
* error handler taking an error message and, since version 1.28.6, an
|
|
69
|
+
* optional object containing the complete error information as delivered
|
|
70
|
+
* by the ODataService. See fnFailure parameter of {@link sap.ushell_abap.pbServices.ui2.ODataWrapper#onError}
|
|
71
|
+
* for more details.
|
|
72
|
+
* @since 1.2.0
|
|
73
|
+
*/
|
|
74
|
+
this.getDefaultErrorHandler = function () {
|
|
75
|
+
return fnDefaultFailure;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Opens a new queue where all requests are parked until a call to {@link #submitBatchQueue}.
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
* @since 1.19.0
|
|
83
|
+
*/
|
|
84
|
+
this.openBatchQueue = function () {
|
|
85
|
+
oODataWrapper.openBatchQueue();
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Refreshes the CSRF token of this OData service by reading the service document again, which
|
|
90
|
+
* is never cached. Called automatically by <code>sap.ushell_abap.pbServices.ui2.ODataWrapper</code> on a write
|
|
91
|
+
* operation if the CSRF token is missing or expired.
|
|
92
|
+
*
|
|
93
|
+
* @param {function ()} fnSuccess
|
|
94
|
+
* a callback function that is executed if the request succeeds
|
|
95
|
+
* @param {function (string, object=)} [fnFailure]
|
|
96
|
+
* error handler taking an error message and, since version 1.28.6, an
|
|
97
|
+
* optional object containing the complete error information as delivered
|
|
98
|
+
* by the ODataService. See fnFailure parameter of {@link sap.ushell_abap.pbServices.ui2.ODataWrapper#onError}
|
|
99
|
+
* for more details.
|
|
100
|
+
* @public
|
|
101
|
+
* @since 1.17.0
|
|
102
|
+
* @see #getCsrfToken
|
|
103
|
+
* @see #setCsrfToken
|
|
104
|
+
* @see sap.ushell_abap.pbServices.ui2.ODataWrapper#read
|
|
105
|
+
*/
|
|
106
|
+
this.refreshCsrfToken = function (fnSuccess, fnFailure) {
|
|
107
|
+
var oTokenData;
|
|
108
|
+
|
|
109
|
+
if (typeof fnSuccess !== "function") {
|
|
110
|
+
throw new SrvcError("Success callback is not a function",
|
|
111
|
+
"ODataService");
|
|
112
|
+
}
|
|
113
|
+
fnFailure = fnFailure || fnDefaultFailure;
|
|
114
|
+
|
|
115
|
+
oTokenData = mCsrfTokens.get(sBaseUrl);
|
|
116
|
+
|
|
117
|
+
if (!oTokenData.fetchingInProgress) {
|
|
118
|
+
// fetch token
|
|
119
|
+
oTokenData.token = undefined;
|
|
120
|
+
oTokenData.fetchingInProgress = true;
|
|
121
|
+
|
|
122
|
+
// GET service document which is never cached
|
|
123
|
+
oODataWrapper.read("", function () {
|
|
124
|
+
// wrapper.read does a setCsrfToken call
|
|
125
|
+
if (!mCsrfTokens.get(sBaseUrl) || !mCsrfTokens.get(sBaseUrl).token) {
|
|
126
|
+
fnFailure("No CSRF token delivered");
|
|
127
|
+
|
|
128
|
+
oTokenData.errorHandlers.forEach(function (fnHandler) {
|
|
129
|
+
fnHandler("No CSRF token delivered");
|
|
130
|
+
});
|
|
131
|
+
} else {
|
|
132
|
+
// drop excess parameters; Note: try/catch already done by read()!
|
|
133
|
+
fnSuccess();
|
|
134
|
+
oTokenData.successHandlers.forEach(function (fnHandler) {
|
|
135
|
+
fnHandler();
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
oTokenData.successHandlers = [];
|
|
139
|
+
oTokenData.errorHandlers = [];
|
|
140
|
+
// TODO clarify if should be done in setCsrfToken (called by wrapper.read) (interference
|
|
141
|
+
// with GET?)
|
|
142
|
+
oTokenData.fetchingInProgress = false;
|
|
143
|
+
}, function () {
|
|
144
|
+
oTokenData.fetchingInProgress = false;
|
|
145
|
+
fnFailure.apply(null, arguments);
|
|
146
|
+
});
|
|
147
|
+
} else {
|
|
148
|
+
// token fetching already in progress by other instance, only register handlers
|
|
149
|
+
oTokenData.successHandlers.push(fnSuccess);
|
|
150
|
+
oTokenData.errorHandlers.push(fnFailure);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Determines the new value of the CSRF token. Use this function to synchronize the CSRF token
|
|
156
|
+
* across multiple instances of this facade in case their first read requests run in parallel.
|
|
157
|
+
* Retrieve the token from a service in the success handler of its read request and distribute
|
|
158
|
+
* it to all other services; do so for each service. Note that the last success handler of all
|
|
159
|
+
* first read requests run in parallel determines the token to be used for modifications.
|
|
160
|
+
* <p>
|
|
161
|
+
* If debugging HTTP traffic, watch out for <code>x-csrf-token</code> headers and
|
|
162
|
+
* <code>sap-XSRF_*</code> cookies.
|
|
163
|
+
*
|
|
164
|
+
* @param {string} [sNewCsrfToken=""]
|
|
165
|
+
* the new value of the CSRF token, which may be <code>null</code> or <code>undefined</code>
|
|
166
|
+
* @public
|
|
167
|
+
* @since 1.7.0
|
|
168
|
+
* @see #getCsrfToken
|
|
169
|
+
* @see #refreshCsrfToken
|
|
170
|
+
*/
|
|
171
|
+
this.setCsrfToken = function (sNewCsrfToken) {
|
|
172
|
+
var oTokenData;
|
|
173
|
+
// sNewCsrfToken must be a string OR undefined
|
|
174
|
+
if (sNewCsrfToken && typeof sNewCsrfToken !== "string") {
|
|
175
|
+
throw new SrvcError("Invalid CSRF token: " + sNewCsrfToken,
|
|
176
|
+
"ODataService");
|
|
177
|
+
}
|
|
178
|
+
oTokenData = mCsrfTokens.get(sBaseUrl);
|
|
179
|
+
oTokenData.token = sNewCsrfToken;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Sets the default error handler for this facade.
|
|
184
|
+
*
|
|
185
|
+
* @param {function (string, object=)} fnNewDefaultFailure
|
|
186
|
+
* error handler taking an error message and, since version 1.28.6, an
|
|
187
|
+
* optional object containing the complete error information as delivered
|
|
188
|
+
* by the ODataService. See fnFailure parameter of {@link sap.ushell_abap.pbServices.ui2.ODataWrapper#onError}
|
|
189
|
+
* for more details.
|
|
190
|
+
* @public
|
|
191
|
+
* @since 1.2.0
|
|
192
|
+
*/
|
|
193
|
+
this.setDefaultErrorHandler = function (fnNewDefaultFailure) {
|
|
194
|
+
if (fnNewDefaultFailure && typeof fnNewDefaultFailure !== "function") {
|
|
195
|
+
throw new SrvcError("Error callback is not a function",
|
|
196
|
+
"ODataService");
|
|
197
|
+
}
|
|
198
|
+
fnDefaultFailure = fnNewDefaultFailure || function () { };
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// cf. "@borrows sap.ushell_abap.pbServices.ui2.ODataWrapper#submitBatchQueue as #submitBatchQueue"
|
|
202
|
+
this.submitBatchQueue = function () {
|
|
203
|
+
oODataWrapper.submitBatchQueue.apply(oODataWrapper, arguments);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Returns this facade's string representation.
|
|
208
|
+
*
|
|
209
|
+
* @param {boolean} [bVerbose=false]
|
|
210
|
+
* flag whether to show all properties
|
|
211
|
+
* @returns {string}
|
|
212
|
+
* this facade's string representation
|
|
213
|
+
* @since 1.2.0
|
|
214
|
+
*/
|
|
215
|
+
this.toString = function (bVerbose) {
|
|
216
|
+
var aResult = ["ODataService({"];
|
|
217
|
+
if (bVerbose) {
|
|
218
|
+
aResult.push('csrfToken:"', this.getCsrfToken(), '"');
|
|
219
|
+
aResult.push(",oODataWrapper:", oODataWrapper.toString(true));
|
|
220
|
+
}
|
|
221
|
+
aResult.push("})");
|
|
222
|
+
return aResult.join("");
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
// constructor code -------------------------------------------------------
|
|
226
|
+
if (!oODataWrapper) {
|
|
227
|
+
throw new SrvcError("Missing OData wrapper", "ODataService");
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
sBaseUrl = oODataWrapper.getBaseUrl();
|
|
231
|
+
if (!mCsrfTokens.get(sBaseUrl)) {
|
|
232
|
+
mCsrfTokens.put(sBaseUrl, {
|
|
233
|
+
//token: undefined,
|
|
234
|
+
fetchingInProgress: false,
|
|
235
|
+
successHandlers: [],
|
|
236
|
+
errorHandlers: []
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
this.setDefaultErrorHandler(fnDefaultFailure);
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* for test purposes only
|
|
245
|
+
*/
|
|
246
|
+
ODataService.resetSharedCsrfTokens = function () {
|
|
247
|
+
mCsrfTokens = new Utils.Map();
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
return ODataService;
|
|
251
|
+
}, true);
|