HubChannel
Implements
Constructors
Constructor Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| entity Required | IHubChannel | ||
| context Required | IArcGISContext |
Properties
| Property | Type | Notes |
|---|---|---|
| Protected | IArcGISContext | |
| Protected | IHubChannel | |
| Protected | false |
Accessors
| Accessor | Type | Notes |
|---|---|---|
| boolean |
Can the current user delete the channel? |
|
| boolean |
Can the current user edit the channel? |
|
| string |
The orgId of the channel |
Methods
| Method | Returns | Notes |
|---|---|---|
|
|
Promise<HubChannel> |
Create a new HubChannel, returning a HubChannel instance. Note: This does not persist the Channel into the backing store |
|
|
Promise<HubChannel> |
Fetch a Channel from the backing store and return a HubChannel instance. |
|
|
HubChannel |
Create an instance from an IHubChannel object |
|
|
IHubCardViewModel |
TODO |
|
|
Promise<void> |
Delete the HubChannel from the store set a flag to indicate that it is destroyed |
|
|
Promise<IHubChannel> |
Load the channel from the editor object |
|
|
Promise<IEditorConfig> |
Get a specifc editor config for the HubChannel entity. |
|
|
Promise<void> |
Save the HubChannel to the backing store. |
|
|
Promise<IHubChannelEditor> |
Return the channel as an editor object |
|
|
IHubChannel |
Return the backing entity as an object literal |
|
|
void |
Apply a new state to the instance |
create
StaticParameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| partialChannel Required | Partial<IHubChannel> |
A partial IHubChannel object |
|
| context Required | IArcGISContext |
ArcGIS Context |
|
| save Optional | boolean | false |
Returns
a HubChannel instance
fetch
StaticFetch a Channel from the backing store and return a HubChannel instance.
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| identifier Required | string |
Identifier of the channel to load |
|
| context Required | IArcGISContext |
An IArcGISContext object |
Returns
a HubChannel instance
fromJson
StaticCreate an instance from an IHubChannel object
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| json Required | Partial<IHubChannel> |
JSON object to create a HubChannel from |
|
| context Required | IArcGISContext |
ArcGIS context |
Returns
a HubChannel instance
convertToCardModel
TODO
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| _opts Optional | IConvertToCardModelOpts |
Returns
delete
Delete the HubChannel from the store set a flag to indicate that it is destroyed
Returns
a promise
fromEditor
Load the channel from the editor object
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| editor Required | IHubChannelEditor |
An IHubChannelEditor object |
Returns
a promise that resolves an IHubChannel
getEditorConfig
Get a specifc editor config for the HubChannel entity.
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| i18nScope Required | string |
A string representing the i18n scope for translated strings |
|
| type Required | ChannelEditorType |
One of the supported ChannelEditorType strings |
Returns
a promise that resolves a IEditorConfig object
toEditor
Return the channel as an editor object
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| _editorContext Required | IEntityEditorContext | ||
| _include Optional | string[] |
Returns
a promise that resolves an IHubChannelEditor object
update
Apply a new state to the instance
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| changes Required | Partial<IHubChannel> |
A partial IHubChannel object |
Returns
Class defined in packages/common/src/channels/HubChannel.ts:20
Create a new HubChannel, returning a HubChannel instance. Note: This does not persist the Channel into the backing store