Class: OperationsDeserializer

OperationsDeserializer

The operation deserializer is able to deserialize any operations that makes a graph patch, and the metadata operation used in graphdef results and notifications.


new OperationsDeserializer( [sourceId])

Parameters:
Name Type Argument Default Description
sourceId string <optional>
olympe.dc.SourceType.SERVER

Members


<protected> sourceId :string

Type:
  • string

Methods


<static> deserializeProperties(props)

Deserializes properties

Parameters:
Name Type Description
props Object

Properties map whose values will be modified

Returns:

Updated properties map (note: it is the same object as the one passed as argument)

Type
Map.<string, ?*>

deserialize(operations)

Deserializes an array of patch operations into an GraphPatch.

This method is called when the array of operation is a subcomponent of a larger JSON structure, that is being parsed beforehand. In that case, the parsing is already done which makes calling deserializeJson() above irrelevant.

Parameters:
Name Type Description
operations Array.<!Object>

Patch operations as received by the server

Deprecated:
  • use deserializePatch instead
Returns:

The created patch

Type
olympe.dc.db.GraphPatch

deserializeNotification(graphdefId, operations)

Deserializes the specified array of operations into a graph notification. It includes the metadata operations to create and update graphdef blocks.

Parameters:
Name Type Description
graphdefId string
operations Array.<!Object>
Returns:
Type
olympe.dc.query.GraphNotification

deserializePatch(operations)

Deserializes an array of patch operations into an GraphPatch.

Parameters:
Name Type Description
operations Array.<!Object>
Returns:
Type
olympe.dc.db.GraphPatch

deserializeResult(graphdefId, destination, operations)

Deserializes the specified array of operations into a graph result. It includes the metadata operations to create and fill graphdef blocks.

Parameters:
Name Type Description
graphdefId string
destination olympe.dc.SourceType
operations Array.<!Object>
Returns:
Type
olympe.dc.query.GraphResult