A ResourceStore of which all operations are atomic.

Hierarchy

Implemented by

Properties

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

Type declaration

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

Type declaration

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

Type declaration

hasResource: ((identifier: ResourceIdentifier) => Promise<boolean>)

Type declaration

    • (identifier: ResourceIdentifier): Promise<boolean>
    • Check if a resource exists in this ResourceSet.

      Returns

      A promise resolving if the resource already exists.

      Parameters

      Returns Promise<boolean>

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

Type declaration

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

      Returns

      Identifiers of resources that were possibly modified.

      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[]>

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

Type declaration