Datapoint
Datapoints contain any type of data produced by an action.
Constructor Summary
| Public Constructor | ||
| public |
constructor(type: string, format: string) Datapoints contain any type of data produced by an action. |
|
Member Summary
| Public Members | ||
| public |
body: * Declare empty JSON as body to store values |
|
| public get |
content: * The content of the Datapoint. |
|
| public get |
data: * The data stored in a Datapoint. |
|
| public get |
format: * The data type for the Datapoint's value. |
|
| public get |
parent: * The parent of this Datapoint. |
|
| public get |
permissions: * Permissions associated with this Datapoint. |
|
| public get |
type: * The type of Datapoint. |
|
Method Summary
| Public Methods | ||
| public |
addPermission(type: string, perm: *): Datapoint Add a new permission. |
|
| public |
Check for missing fields and generate a JSON object of the datapoint. |
|
| public |
setContent(content: *): Datapoint Set the content of a datapoint. |
|
| public |
setCustomPermissions(perms: *, override: boolean): Datapoint Set custom permissions. |
|
| public |
Set the format of the Datapoint. |
|
| public |
Set the parent field. |
|
| public |
setPermissions(perms: object, override: boolean): Datapoint Assign permissions using standard format: GET, PUT, and DELETE. |
|
| public |
Set the type of the Datapoint. |
|
| public |
Convert the datapoint to a string. |
|
Public Constructors
Public Members
Public Methods
public addPermission(type: string, perm: *): Datapoint source
Add a new permission.
Params:
| Name | Type | Attribute | Description |
| type | string | 'GET', 'PUT', or 'DELETE' |
|
| perm | * | Who shoudld receive the permission? |
public generate(): object source
Check for missing fields and generate a JSON object of the datapoint.
public setContent(content: *): Datapoint source
Set the content of a datapoint.
Params:
| Name | Type | Attribute | Description |
| content | * | The value of the Datapoint. If object, must have 'value' field. |
public setCustomPermissions(perms: *, override: boolean): Datapoint source
Set custom permissions.
Params:
| Name | Type | Attribute | Description |
| perms | * | Custom permissions object. |
|
| override | boolean | Set as true to override existing permissions. |
public setFormat(format: string): Datapoint source
Set the format of the Datapoint.
Params:
| Name | Type | Attribute | Description |
| format | string | What type of value does this Datapoint hold? |
public setParent(parent: *): Datapoint source
Set the parent field.
Params:
| Name | Type | Attribute | Description |
| parent | * | The parent of this process. |
public setPermissions(perms: object, override: boolean): Datapoint source
Assign permissions using standard format: GET, PUT, and DELETE.
