Skip to content

Class: LeafBatchedRequester

A singleton to handle batched requests for leafs

Hierarchy

LeafBatchedRequester

Constructors

constructor

new LeafBatchedRequester(resource, context): LeafBatchedRequester

Parameters

Name Type Description
resource SolidLeaf -
context ConnectedContext\<SolidConnectedPlugin[]> SolidLdoDatasetContext of the parent dataset

Returns

LeafBatchedRequester

Overrides

BatchedRequester.constructor

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:35

Properties

context

Protected context: ConnectedContext\<SolidConnectedPlugin[]>

ConnectedContext for the parent Dataset

Inherited from

BatchedRequester.context

Defined in

packages/connected-solid/src/requester/BatchedRequester.ts:49


requestBatcher

Protected Readonly requestBatcher: RequestBatcher

A request batcher to maintain state for ongoing requests

Inherited from

BatchedRequester.requestBatcher

Defined in

packages/connected-solid/src/requester/BatchedRequester.ts:38


resource

Readonly resource: SolidLeaf

The URI of the leaf

Overrides

BatchedRequester.resource

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:29

Methods

createDataResource

createDataResource(overwrite): Promise\<LeafCreateAndOverwriteResult>

Creates the leaf as a data resource

Parameters

Name Type Description
overwrite true If true, this will orverwrite the resource if it already exists

Returns

Promise\<LeafCreateAndOverwriteResult>

Overrides

BatchedRequester.createDataResource

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:72

createDataResource(overwrite?): Promise\<LeafCreateIfAbsentResult>

Parameters

Name Type
overwrite? false

Returns

Promise\<LeafCreateIfAbsentResult>

Overrides

BatchedRequester.createDataResource

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:73

createDataResource(overwrite?): Promise\<BinaryReadSuccess | ServerHttpError\<SolidLeaf> | UnexpectedHttpError\<SolidLeaf> | UnauthenticatedHttpError\<SolidLeaf> | UnauthorizedHttpError\<SolidLeaf> | UnexpectedResourceError\<SolidLeaf> | CreateSuccess\<SolidLeaf> | DataReadSuccess | NoncompliantPodError\<SolidLeaf>>

Parameters

Name Type
overwrite? boolean

Returns

Promise\<BinaryReadSuccess | ServerHttpError\<SolidLeaf> | UnexpectedHttpError\<SolidLeaf> | UnauthenticatedHttpError\<SolidLeaf> | UnauthorizedHttpError\<SolidLeaf> | UnexpectedResourceError\<SolidLeaf> | CreateSuccess\<SolidLeaf> | DataReadSuccess | NoncompliantPodError\<SolidLeaf>>

Overrides

BatchedRequester.createDataResource

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:74


delete

delete(): Promise\<DeleteResult\<SolidLeaf>>

Delete this resource

Returns

Promise\<DeleteResult\<SolidLeaf>>

A DeleteResult

Inherited from

BatchedRequester.delete

Defined in

packages/connected-solid/src/requester/BatchedRequester.ts:118


isCreating

isCreating(): boolean

Checks if the resource is currently executing a create request

Returns

boolean

true if the resource is currently executing a create request

Inherited from

BatchedRequester.isCreating

Defined in

packages/connected-solid/src/requester/BatchedRequester.ts:70


isDeletinng

isDeletinng(): boolean

Checks if the resource is currently executing a delete request

Returns

boolean

true if the resource is currently executing a delete request

Inherited from

BatchedRequester.isDeletinng

Defined in

packages/connected-solid/src/requester/BatchedRequester.ts:86


isLoading

isLoading(): boolean

Checks if the resource is currently making any request

Returns

boolean

true if the resource is making any requests

Inherited from

BatchedRequester.isLoading

Defined in

packages/connected-solid/src/requester/BatchedRequester.ts:62


isReading

isReading(): boolean

Checks if the resource is currently executing a read request

Returns

boolean

true if the resource is currently executing a read request

Inherited from

BatchedRequester.isReading

Defined in

packages/connected-solid/src/requester/BatchedRequester.ts:78


isUpdating

isUpdating(): boolean

Checks if the resource is currently executing an update request

Returns

boolean

true if the resource is currently executing an update request

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:47


isUploading

isUploading(): boolean

Checks if the resource is currently executing an upload request

Returns

boolean

true if the resource is currently executing an upload request

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:55


read

read(): Promise\<ReadLeafResult>

Reads the leaf

Returns

Promise\<ReadLeafResult>

A ReadLeafResult

Overrides

BatchedRequester.read

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:63


updateDataResource

updateDataResource(changes): Promise\<UpdateResult\<SolidLeaf>>

Update the data on this resource

Parameters

Name Type Description
changes DatasetChanges\<Quad> DatasetChanges that should be applied to the Pod

Returns

Promise\<UpdateResult\<SolidLeaf>>

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:89


upload

upload(blob, mimeType, overwrite): Promise\<LeafCreateAndOverwriteResult>

Upload a binary at this resource's URI

Parameters

Name Type Description
blob Blob A binary blob
mimeType string the mime type of the blob
overwrite true -

Returns

Promise\<LeafCreateAndOverwriteResult>

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:122

upload(blob, mimeType, overwrite?): Promise\<LeafCreateIfAbsentResult>

Parameters

Name Type
blob Blob
mimeType string
overwrite? false

Returns

Promise\<LeafCreateIfAbsentResult>

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:127

upload(blob, mimeType, overwrite?): Promise\<BinaryReadSuccess | ServerHttpError\<SolidLeaf> | UnexpectedHttpError\<SolidLeaf> | UnauthenticatedHttpError\<SolidLeaf> | UnauthorizedHttpError\<SolidLeaf> | UnexpectedResourceError\<SolidLeaf> | CreateSuccess\<SolidLeaf> | DataReadSuccess | NoncompliantPodError\<SolidLeaf>>

Parameters

Name Type
blob Blob
mimeType string
overwrite? boolean

Returns

Promise\<BinaryReadSuccess | ServerHttpError\<SolidLeaf> | UnexpectedHttpError\<SolidLeaf> | UnauthenticatedHttpError\<SolidLeaf> | UnauthorizedHttpError\<SolidLeaf> | UnexpectedResourceError\<SolidLeaf> | CreateSuccess\<SolidLeaf> | DataReadSuccess | NoncompliantPodError\<SolidLeaf>>

Defined in

packages/connected-solid/src/requester/LeafBatchedRequester.ts:132