HubItemEntity
Base class for all Hub Entities backed by items
Implements
- IWithStoreBehavior
- IWithSharingBehavior
- IWithThumbnailBehavior
- IWithFeaturedImageBehavior
- IWithPermissionBehavior
- IWithDiscussionsBehavior
- IWithFollowersBehavior
- IWithAssociationBehavior
Constructors
Constructor Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
entity Required | IHubItemEntity | ||
context Required | IArcGISContext |
Properties
Property | Type | Notes |
---|---|---|
Protected | IArcGISContext | |
Protected | IHubItemEntity | |
Protected | false | |
Protected | null |
Accessors
Methods
Method | Returns | Notes |
---|---|---|
|
void |
Add an association to this entity |
|
void |
Add a policy to the entity |
|
Promise<void> |
Hook that subclasses should call to invoke shared post-save behavior |
|
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 |
|
void |
Clear the thumbnail from the item, if one exists. Persisted on next |
|
Promise<void> | |
|
Promise<IGroup> |
Returns the followers group |
|
IEntityPermissionPolicy[] |
Get all policies related to a specific permission |
|
string |
Return the full url to the thumbnail, optionally with a width parameter |
|
IAssociationInfo[] |
Return a list of IAssociationInfo objects representing the associations this entity has, to the specified type |
|
void |
Remove an association from this entity |
|
void |
Remove a policy from the entity |
|
Promise<void> | |
|
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 |
|
Promise<void> |
Sets the access level of the followers group |
|
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. |
|
IHubItemEntity |
Return the backing entity as an object literal |
|
Promise<void> |
Unshare the Entity with the specified group id |
|
void | |
|
void |
Updates the isDiscussable property |
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
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
clearThumbnail
Clear the thumbnail from the item, if one exists. Persisted on next .save()
call
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
listAssociations
Return a list of IAssociationInfo objects representing the associations this entity has, to the specified type
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
type Required | AssociationType |
Returns
removeAssociation
Remove an association from this entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
info Required | IAssociationInfo |
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
setFollowersGroupAccess
Sets the access level of the followers group
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
access Required | SettableAccessLevel |
Returns
setThumbnail
Store thumbnail information to be sent with the next .save()
call
Parameters
Returns
update
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
changes Required | Partial<IHubItemEntity> |
Returns
updateIsDiscussable
Updates the isDiscussable property
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
isDiscussable Required | boolean |
whether to enable or disable discussions |
Returns
Class defined in common/src/core/HubItemEntity.ts:50
Add an association to this entity