IWithStoreBehavior

Interface

Ensure consitent interfaces for the Hub classes

Methods

Method Returns Notes
Promise<boolean>

Can the current user delete the Entity? User must own the entiry or be an org admin in the owner's org

Promise<boolean>

Can the current user edit the Entity? User must be owner, or member of a shared editing group, to which the item is shared

Promise<void>

Delete the class instance from it's backing store

Promise<void>

Save the class instance to it's backing store

Export the internal entity to a JSON object. This should be used to get the JSON representation of the entity before passing into a component

void

Push changes into the Class. This method should be used when applying updates from a component, into the class instance

canDelete

Interface Method

Can the current user delete the Entity? User must own the entiry or be an org admin in the owner's org

  • canDelete(useCache: boolean) : Promise<boolean>

Parameters

Parameter Type Default Notes
useCache Required boolean

Returns

Promise<boolean>

canEdit

Interface Method

Can the current user edit the Entity? User must be owner, or member of a shared editing group, to which the item is shared

  • canEdit(useCache: boolean) : Promise<boolean>

Parameters

Parameter Type Default Notes
useCache Required boolean

Returns

Promise<boolean>

delete

Interface Method

Delete the class instance from it's backing store

  • delete() : Promise<void>

Returns

Promise<void>

save

Interface Method

Save the class instance to it's backing store

  • save() : Promise<void>

Returns

Promise<void>

toJson

Interface Method

Export the internal entity to a JSON object. This should be used to get the JSON representation of the entity before passing into a component

  • toJson() :

Returns

update

Interface Method

Push changes into the Class. This method should be used when applying updates from a component, into the class instance

  • update(changes: Partial<>) : void

Parameters

Parameter Type Default Notes
changes Required Partial<>

Returns

void

Interface defined in common/src/core/behaviors/IWithStoreBehavior.ts:4