Class Index | File Index

Classes


Namespace sap.ui2.srvc

The namespace for services related to page building and CHIP implementation.
Defined in: catalog.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
sap.ui2.srvc.absoluteUrl(sUrl, sBase)
Makes the given relative URL absolute.
<static>  
sap.ui2.srvc.call(fnSuccess, fnFailure, bAsync)
Calls the given success handler (a)synchronously.
<static>  
sap.ui2.srvc.createFactory(sBaseUri, fnDefaultFailure, bIsPersonalization)
Constructs a new factory for wrapper objects corresponding to catalogs, pages, CHIP instances, or CHIPs loaded from the page building service with the given base URI.
<static>  
sap.ui2.srvc.createODataWrapper(sBaseUrl, bSupportsChangeSets, fnDefaultFailure)
<static>  
sap.ui2.srvc.createPageBuildingService(sBaseUri, fnDefaultFailure, bIsPersonalization)
Constructs a facade to the page building service with the given base URI.
<static>  
sap.ui2.srvc.get(sUrl, bXml, fnSuccess, fnFailure, oXHR, bCache)
GETs the given URL (as XML if indicated) and hands it to the given success handler.
<static>  
sap.ui2.srvc.getFormFactor()
Gets the device's form factor.
<static>  
sap.ui2.srvc.getParameterMap(sSearchString)
Returns a map of all search parameters present in the given search string or this window's current URL.
<static>  
sap.ui2.srvc.isArray(o)
Tells whether the given value is an array.
<static>  
sap.ui2.srvc.parseXml(sXml)
Parses the given XML string and returns it as a document.
<static>  
sap.ui2.srvc.testPublishAt(o)
Serves as a marker for functions that are to be exposed in QUnit tests.
Namespace Detail
sap.ui2.srvc
Since:
1.2.0
Method Detail
<static> {string} sap.ui2.srvc.absoluteUrl(sUrl, sBase)
Makes the given relative URL absolute. URLs containing host and/or protocol and URLs with an absolute path remain unchanged. The URL is in no way normalized; the function simply cuts off the file name from the base and appends the relative URL.
Defined in: utils.js.
Parameters:
{string} sUrl
the (possibly server-relative) URL
{string} sBase Optional, Default: location.href
the base URL; it must at least be server-absolute
Since:
1.2.0
Returns:
{string} the absolute URL

<static> sap.ui2.srvc.call(fnSuccess, fnFailure, bAsync)
Calls the given success handler (a)synchronously. Errors thrown in the success handler are caught and the error message is reported to the error handler; if an error stack is available, it is logged.
Defined in: utils.js.
Parameters:
{function ()} fnSuccess
no-args success handler
{function (string)} fnFailure Optional
error handler, taking an error message; MUST NOT throw any error itself!
{boolean} bAsync Optional, Default: false
whether the call shall be asynchronously
Since:
1.2.0

<static> {sap.ui2.srvc.Factory} sap.ui2.srvc.createFactory(sBaseUri, fnDefaultFailure, bIsPersonalization)
Constructs a new factory for wrapper objects corresponding to catalogs, pages, CHIP instances, or CHIPs loaded from the page building service with the given base URI.
Defined in: factory.js.
Parameters:
{string} sBaseUri
base URI of the page building service
{function (string|[object])} fnDefaultFailure Optional
error handler taking an error message and, since version 1.28.6, an optional object containing the complete error information as delivered by the ODataService. See fnFailure parameter of sap.ui2.srvc.ODataWrapper#onError for more details.
{boolean} bIsPersonalization Optional, Default: false
defines the return value of sap.ui2.srvc.PageBuildingService#isPersonalization of the returned factory's page building service facade (since 1.16.1)
Since:
1.2.0
Returns:
{sap.ui2.srvc.Factory} returns the new factory for the given sBaseUri
See:
sap.ui2.srvc.Factory
sap.ui2.srvc.PageBuildingService
sap.ui2.srvc.createPageBuildingService()

<static> {sap.ui2.srvc.ODataWrapper} sap.ui2.srvc.createODataWrapper(sBaseUrl, bSupportsChangeSets, fnDefaultFailure)
Constructs and returns a sap.ui2.srvc.ODataWrapper which knows its sap.ui2.srvc.ODataService twin, see sap.ui2.srvc.ODataWrapper#getODataService.
Defined in: ODataWrapper.js.
Parameters:
{string} sBaseUrl
base URL of the OData service, e.g. "/OData/OData.svc"
{boolean} bSupportsChangeSets Optional, Default: false
Whether the OData service supports change sets with multiple operations bundled into a single logical unit of work. Otherwise each modifying operation is isolated in a change set of its own.
{function (string|[object])} fnDefaultFailure Optional
error handler taking an error message and, since version 1.28.6, an optional object containing the complete error information as delivered by the ODataService. See fnFailure parameter of sap.ui2.srvc.ODataWrapper#onError for more details.
Since:
1.19.1
Returns:
{sap.ui2.srvc.ODataWrapper} new instance of ODataWapper/ODataService

<static> {sap.ui2.srvc.PageBuildingService} sap.ui2.srvc.createPageBuildingService(sBaseUri, fnDefaultFailure, bIsPersonalization)
Constructs a facade to the page building service with the given base URI.
Defined in: PageBuildingService.js.
Parameters:
{string} sBaseUri
base URI of the page building service
{function (string)} fnDefaultFailure Optional
default error handler, taking an error message
{boolean} bIsPersonalization Optional, Default: false
defines the return value of sap.ui2.srvc.PageBuildingService#isPersonalization of the returned instance (since 1.16.1)
Since:
1.2.0
Returns:
{sap.ui2.srvc.PageBuildingService} a facade to the page building service
See:
sap.ui2.srvc.PageBuildingService

<static> sap.ui2.srvc.get(sUrl, bXml, fnSuccess, fnFailure, oXHR, bCache)
GETs the given URL (as XML if indicated) and hands it to the given success handler. As this is a root cause for asynchronous behaviour, special precautions are taken: errors thrown in the success handler are caught and reported to the error handler!
Defined in: utils.js.
Parameters:
{string} sUrl
URL for GET request
{boolean} bXml
whether the handler expects XML instead of plain text
{function (*)} fnSuccess
success handler, taking a DOM document or text string
{function (string|string)} fnFailure
error handler, taking an error message and (if http status is not OK) the GET response as text; MUST NOT throw any error itself!
{object} oXHR Optional
the XMLHttpRequest object which may be predefined (e.g. by setting request headers). If undefined, a new XMLHttpRequest object is created.
{boolean} bCache Optional
whether the response is cached for further calls (since 1.8.1). XML responses cannot be cached. An sap.ui2.srvc.Error is thrown if both bXml and bCache are set to true.
Since:
1.2.0

<static> {string} sap.ui2.srvc.getFormFactor()
Gets the device's form factor. Based on sap.ui.Device.system from SAPUI5.
Defined in: utils.js.
Since:
1.19.1
Returns:
{string} the device's form factor ("desktop", "tablet" or "phone")

<static> {object} sap.ui2.srvc.getParameterMap(sSearchString)
Returns a map of all search parameters present in the given search string or this window's current URL. To be precise, location.search is used as a default and any given search string must use the same syntax (start with a "?" and not include a "#").
Defined in: utils.js.
Parameters:
{string} sSearchString Optional, Default: location.search
search string starting with a "?" (unless empty) and not including a "#"
Since:
1.2.0
Returns:
{object} a map<string, string[]> from key to array of values
See:
javax.servlet.ServletRequest#getParameterMap()
Interface jQuery.sap.util.UriParameters

<static> {boolean} sap.ui2.srvc.isArray(o)
Tells whether the given value is an array.
Defined in: utils.js.
Parameters:
{object} o
any value
Since:
1.2.0
Returns:
{boolean} true if and only if the given value is an array

<static> {DOMDocument} sap.ui2.srvc.parseXml(sXml)
Parses the given XML string and returns it as a document.
Defined in: utils.js.
Parameters:
{string} sXml
the XML
Since:
1.2.0
Throws:
{Error}
in case of invalid XML string
Returns:
{DOMDocument} a DOM document, or null in case of missing or empty XML string

<static> sap.ui2.srvc.testPublishAt(o)
Serves as a marker for functions that are to be exposed in QUnit tests. Calls to this function are expected to be placed directly before the named function declaration (even after the JSDoc). The function itself does nothing.
Defined in: utils.js.
Parameters:
{object} o
the object to which this function will be attached in tests; must not be this (use that instead)
Since:
1.3.0

©Copyright (c) 2009-2014 SAP SE, All Rights Reserved
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Mar 14 2017 08:48:14 GMT-0000 (UTC)