DataObject
Direct Subclass:
Main extension class for observers and reporters, with common properties and methods. Children management is common for observers and reporters.
Member Summary
Public Members | ||
public get |
childrens: Object<ChildId, DataObjectChild> All created children's since the subscription, doesn't contain all children's since reporter creation. |
|
public get |
Data structure to be synchronized. |
|
public get |
All Metadata about the Data Object |
|
public get |
schema: SchemaURL Object schema URL (this field is not yet stable, and is subsject to change) |
|
public get |
status: Status Status of the reporter or observer connection (this field is not yet stable, and is subsject to change) |
|
public get |
url: ObjectURL Object URL of reporter or observer |
Method Summary
Public Methods | ||
public |
addChild(children: String, initialData: JSON, identity: MessageBodyIdentity, input: SyncChildMetadata): Promise<DataObjectChild> Create and add a DataObjectChild to a children collection. |
|
public |
onAddChild(callback: function(event: MsgEvent)) Setup the callback to process create and delete of childrens. |
|
public |
resumeChildrens(childrens: *) |
Public Members
public get childrens: Object<ChildId, DataObjectChild> source
All created children's since the subscription, doesn't contain all children's since reporter creation.
public get schema: SchemaURL source
Object schema URL (this field is not yet stable, and is subsject to change)
public get status: Status source
Status of the reporter or observer connection (this field is not yet stable, and is subsject to change)
Public Methods
public addChild(children: String, initialData: JSON, identity: MessageBodyIdentity, input: SyncChildMetadata): Promise<DataObjectChild> source
Create and add a DataObjectChild to a children collection.
Params:
Name | Type | Attribute | Description |
children | String | Children name where the child is added. |
|
initialData | JSON | Initial data of the child |
|
identity | MessageBodyIdentity | (optional) identity data to be added to identity the user reporter. To be used for legacy identities. |
|
input | SyncChildMetadata | (optional) All additional metadata about the DataObjectChild. |
public onAddChild(callback: function(event: MsgEvent)) source
Setup the callback to process create and delete of childrens.
Params:
Name | Type | Attribute | Description |
callback | function(event: MsgEvent) |
public resumeChildrens(childrens: *) source
Params:
Name | Type | Attribute | Description |
childrens | * |