HubDiscussion
Hub Discussion Class
Implements
- IWithStoreBehavior
- IWithSharingBehavior
- IWithThumbnailBehavior
- IWithFeaturedImageBehavior
- IWithPermissionBehavior
- IWithCapabilityBehavior
- IWithStoreBehavior
- IWithSharingBehavior
Extends
Constructors
Constructor Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
entity Required | IHubDiscussion | ||
context Required | IArcGISContext |
Properties
Property | Type | Notes |
---|---|---|
Protected Inherited | IArcGISContext | |
Protected Inherited | IHubDiscussion | |
Protected Inherited | false | |
Protected Inherited | null |
Accessors
Methods
Method | Returns | Notes |
---|---|---|
|
Promise<HubDiscussion> |
Create a new HubDiscussion, returning a HubDiscussion instance. Note: This does not persist the Discussion into the backing store |
|
Promise<HubDiscussion> |
Fetch a Discussion from the backing store and return a HubDiscussion instance. |
|
HubDiscussion |
Create an instance from an IHubDiscussion object |
|
Promise<void> |
Delete the HubDiscussion from the store set a flag to indicate that it is destroyed |
|
Promise<void> | |
|
void |
Apply a new state to the instance |
|
void |
Add a policy to the entity |
|
Promise<void> |
Hook that subclasses should call to invoke shared post-save behavior |
|
ICapabilityAccessResponse |
Check if the current user can access a specific capability |
|
IPermissionAccessResponse |
Check if current user has a specific permission, accounting for both system and entity level policies |
|
Promise<void> |
Remove the featured image from the item |
|
IEntityPermissionPolicy[] |
Get all policies related to a specific permission |
|
string |
Return the full url to the thumbnail, optionally with a width parameter |
|
void |
Remove a policy from the entity |
|
Promise<void> |
Set the access level of the backing item |
|
Promise<void> |
Set a featured image on the Entity, if one already exists it is cleared out before the new one is set to keep the number of resources in control |
|
void |
Store thumbnail information to be sent with the next |
|
Promise<void> |
Share the Entity with the specified group id |
|
Promise<IGroup[]> |
Return a list of groups the Entity is shared to. |
|
IHubDiscussion |
Return the backing entity as an object literal |
|
Promise<void> |
Unshare the Entity with the specified group id |
create
StaticParameters
Parameter | Type | Default | Notes |
---|---|---|---|
partialDiscussion Required | Partial<IHubDiscussion> |
a partial IHubDiscussion |
|
context Required | IArcGISContext |
ArcGIS context |
|
save Optional | boolean | false |
Returns
promise that resolves a HubDiscussion
fetch
StaticFetch a Discussion from the backing store and return a HubDiscussion instance.
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
identifier Required | string |
slug or item id |
|
context Required | IArcGISContext |
ArcGIS context |
Returns
promise that resolves a HubDiscussion
fromJson
StaticCreate an instance from an IHubDiscussion object
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
json Required | Partial<IHubDiscussion> |
JSON object to create a HubDiscussion from |
|
context Required | IArcGISContext |
ArcGIS context |
Returns
a HubDiscussion
delete
Delete the HubDiscussion from the store set a flag to indicate that it is destroyed
Returns
a promise
update
Apply a new state to the instance
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
changes Required | Partial<IHubDiscussion> |
A partial IHubDiscussion |
Returns
addPermissionPolicy
Add a policy to the entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
policy Required | IEntityPermissionPolicy |
Returns
afterSave
Hook that subclasses should call to invoke shared post-save behavior
Returns
checkCapability
Check if the current user can access a specific capability
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
capability Required | Capability |
Returns
checkPermission
Check if current user has a specific permission, accounting for both system and entity level policies
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission |
Returns
getPermissionPolicies
Get all policies related to a specific permission
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission |
Returns
getThumbnailUrl
Return the full url to the thumbnail, optionally with a width parameter
Parameters
Returns
removePermissionPolicy
Remove a policy from the entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission | ||
id Required | string |
Returns
setAccess
Set the access level of the backing item
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
access Required | SettableAccessLevel |
Returns
setFeaturedImage
Set a featured image on the Entity, if one already exists it is cleared out before the new one is set to keep the number of resources in control
Parameters
Returns
setThumbnail
Store thumbnail information to be sent with the next .save()
call
Parameters
Returns
Class defined in common/src/discussions/HubDiscussion.ts:12
Create a new HubDiscussion, returning a HubDiscussion instance. Note: This does not persist the Discussion into the backing store