class sap.ui.model.analytics.BatchResponseCollector

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Extends:
Module: sap/ui/model/analytics/BatchResponseCollector
Application Component: CA-UI5-COR

Simple Response Collection Component, collects the responses for each sub-request inside a bigger batch request.

Also handles clean-up after all responses (either success or error) have been collected. Instantiated in AnalyticalBinding.prototype._executeBatchRequest()


Constructor

Constructor for a batch response collecting component.

new sap.ui.model.analytics.BatchResponseCollector(mParams?)
Param Type Default Value Description
mParams? object

optional Setup-Parameter, @see BatchResponseCollector#setup


Methods Overview

Method Description
collect

Collects responses of type BatchResponseCollector.TYPE_SUCCESS and BatchResponseCollector.TYPE_ERROR.

Keeps track of all collected responses and fires the necessary events after all responses for the requests, given in the constructor, have returned.

error

Convenience function to collect an error response.

Internally BatchResponseCollector#collect is called, the second parameter is set to BatchResponseCollector.TYPE_ERROR

setup

Setup-Function to initialize/reset the BatchResponseCollector.

success

Convenience function to collect a success response.

Internally BatchResponseCollector#collect is called with second parameter BatchResponseCollector.TYPE_SUCCESS

collect

Collects responses of type BatchResponseCollector.TYPE_SUCCESS and BatchResponseCollector.TYPE_ERROR.

Keeps track of all collected responses and fires the necessary events after all responses for the requests, given in the constructor, have returned.

Param Type DefaultValue Description
oResponse object

the response which should be collected

sResponseType string

the type of the response, either BatchResponseCollector.TYPE_SUCCESS or BatchResponseCollector.TYPE_ERROR

error

Convenience function to collect an error response.

Internally BatchResponseCollector#collect is called, the second parameter is set to BatchResponseCollector.TYPE_ERROR

Param Type DefaultValue Description
oResponse object

the erroneous response object

setup

Setup-Function to initialize/reset the BatchResponseCollector.

Param Type DefaultValue Description
mParams object

optional Setup-Parameter

executedRequests array

an Array with detail information for all executed batch sub-requests

binding object

a reference to the AnalyticalBinding which started the batch request

lastAnalyticalInfoVersion int

the analyticalInfo version at the time of the creation of this BatchResponseCollector instance, this may change during the process of a pending request. Typically changed via a call to AnalyticalBinding#updateAnalyticalInfo.

success

Convenience function to collect a success response.

Internally BatchResponseCollector#collect is called with second parameter BatchResponseCollector.TYPE_SUCCESS

Param Type DefaultValue Description
oResponse object

the successful response, which should be collected