Abstract Class sap.ui.model.odata.ODataMessageParserModule: sap/ui/model/odata/ODataMessageParser


OData implementation of the sap.ui.core.message.MessageParser class. Parses message responses from the back-end.

Constructor Summary
new sap.ui.model.odata.ODataMessageParser()OData implementation of the sap.ui.core.message.MessageParser class.
Method Summary
sap.ui.model.odata.ODataMessageParser.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.odata.ODataMessageParser with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.model.odata.ODataMessageParser.getMetadata()Returns a metadata object for class sap.ui.model.odata.ODataMessageParser.
getHeaderField()Returns the name of the header field that is used to parse the server messages
parse(oResponse, oRequest, mGetEntities, mChangeEntities)Parses the given response for messages, calculates the delta and fires the messageChange-event on the MessageProcessor if messages are found.
setHeaderField(sFieldName)Sets the header field name that should be used for parsing the JSON messages
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.model.odata.ODataMessageParser()
OData implementation of the sap.ui.core.message.MessageParser class. Parses message responses from the back-end.
Method Detail
sap.ui.model.odata.ODataMessageParser.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.odata.ODataMessageParser with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.message.MessageParser.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.model.odata.ODataMessageParser.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.model.odata.ODataMessageParser.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getHeaderField(): string
Returns the name of the header field that is used to parse the server messages
Returns:
{string} The name of the header field
parse(oResponse, oRequest, mGetEntities, mChangeEntities): void
Parses the given response for messages, calculates the delta and fires the messageChange-event on the MessageProcessor if messages are found.
Parameters:
{object}oResponse The response from the server containing body and headers
{object}oRequest The original request that lead to this response
{map}mGetEntities A map containing the entities requested from the back-end as keys
{map}mChangeEntities A map containing the entities changed on the back-end as keys
setHeaderField(sFieldName): sap.ui.model.odata.ODataMessageParser
Sets the header field name that should be used for parsing the JSON messages
Parameters:
{string}sFieldName The name of the header field that should be used as source of the message object
Returns:
{sap.ui.model.odata.ODataMessageParser} Instance reference for method chaining