CommunitySolidServer/src/storage/BaseResourceStore.ts
2023-11-02 09:49:17 +01:00

54 lines
1.8 KiB
TypeScript

import type { Patch } from '../http/representation/Patch';
import type { Representation } from '../http/representation/Representation';
import type { RepresentationPreferences } from '../http/representation/RepresentationPreferences';
import type { ResourceIdentifier } from '../http/representation/ResourceIdentifier';
import { NotImplementedHttpError } from '../util/errors/NotImplementedHttpError';
import type { Conditions } from './conditions/Conditions';
import type { ChangeMap, ResourceStore } from './ResourceStore';
/**
* Base implementation of ResourceStore for implementers of custom stores.
*/
/* eslint-disable unused-imports/no-unused-vars */
export class BaseResourceStore implements ResourceStore {
public async hasResource(identifier: ResourceIdentifier): Promise<boolean> {
throw new NotImplementedHttpError();
}
public async getRepresentation(
identifier: ResourceIdentifier,
preferences: RepresentationPreferences,
conditions?: Conditions,
): Promise<Representation> {
throw new NotImplementedHttpError();
}
public async setRepresentation(
identifier: ResourceIdentifier,
representation: Representation,
conditions?: Conditions,
): Promise<ChangeMap> {
throw new NotImplementedHttpError();
}
public async addResource(
container: ResourceIdentifier,
representation: Representation,
conditions?: Conditions,
): Promise<ChangeMap> {
throw new NotImplementedHttpError();
}
public async deleteResource(identifier: ResourceIdentifier, conditions?: Conditions): Promise<ChangeMap> {
throw new NotImplementedHttpError();
}
public async modifyResource(
identifier: ResourceIdentifier,
patch: Patch,
conditions?: Conditions,
): Promise<ChangeMap> {
throw new NotImplementedHttpError();
}
}