IWithStoreBehavior

Interface

Ensure consitent interfaces for the Hub classes

Properties

Property Type Notes
canDelete boolean

Can the current user delete the Entity? Derived from item.itemControl = "admin"

canEdit boolean

Can the current user edit the Entity? Derived from the item.itemControl = "admin" || "update"

Methods

Method Returns Notes
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

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