Options
All
  • Public
  • Public/Protected
  • All
Menu

A ResourceStore of which all operations are atomic.

Hierarchy

Implemented by

Index

Properties

addResource

addResource: (container: ResourceIdentifier, representation: Representation, conditions?: Conditions) => Promise<ResourceIdentifier>

Creates a new resource in the container.

Type declaration

deleteResource

deleteResource: (identifier: ResourceIdentifier, conditions?: Conditions) => Promise<ResourceIdentifier[]>

Deletes a resource.

Type declaration

getRepresentation

getRepresentation: (identifier: ResourceIdentifier, preferences: RepresentationPreferences, conditions?: Conditions) => Promise<Representation>

Retrieves a representation of a resource.

Type declaration

modifyResource

modifyResource: (identifier: ResourceIdentifier, patch: Patch, conditions?: Conditions) => Promise<ResourceIdentifier[]>

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

Type declaration

    • 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.

resourceExists

resourceExists: (identifier: ResourceIdentifier, conditions?: Conditions) => Promise<boolean>

Check if a resource exists.

Type declaration

    • Check if a resource exists.

      Parameters

      Returns Promise<boolean>

      A promise resolving if the resource already exists

setRepresentation

setRepresentation: (identifier: ResourceIdentifier, representation: Representation, conditions?: Conditions) => Promise<ResourceIdentifier[]>

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

Type declaration