Options
All
  • Public
  • Public/Protected
  • All
Menu

A ResourceStore represents a collection of resources. It has been designed such that each of its methods can be implemented in an atomic way: for each CRUD operation, only one dedicated method needs to be called. A fifth method enables the optimization of partial updates with PATCH. It is up to the implementer of the interface to (not) make an implementation atomic.

ResourceStores are also responsible for taking auxiliary resources into account should those be relevant to the store.

Hierarchy

Implemented by

Index

Methods

  • Sets or updates the representation of a resource, creating a new resource and intermediary containers as needed.

    Parameters

    • identifier: ResourceIdentifier

      Identifier of resource to update.

    • patch: Patch

      Description of which parts to update.

    • Optional conditions: Conditions

      Optional conditions under which to proceed.

    Returns Promise<ResourceIdentifier[]>

    Identifiers of resources that were possibly modified.

  • Sets or replaces the representation of a resource, creating a new resource and intermediary containers as needed.

    Parameters

    Returns Promise<ResourceIdentifier[]>

    Identifiers of resources that were possibly modified.