//
// SPDX-License-Identifier: AGPL-3.0
-import { getDataExplorer } from "./data-explorer-reducer";
-import { MiddlewareAPI } from "../../../node_modules/redux";
+import { Dispatch, MiddlewareAPI } from "redux";
import { DataColumns } from "../../components/data-table/data-table";
+import { RootState } from "../store";
export abstract class DataExplorerMiddlewareService {
+ protected readonly id: string;
- abstract get Id(): string;
- abstract get Columns(): DataColumns<any>;
- abstract requestItems (api: MiddlewareAPI): void;
-
- protected api: MiddlewareAPI;
- set Api(value: MiddlewareAPI) {
- this.api = value;
+ protected constructor(id: string) {
+ this.id = id;
}
- get DataExplorer () {
- return getDataExplorer(this.api.getState(), this.Id);
+
+ public getId() {
+ return this.id;
}
-}
\ No newline at end of file
+
+ abstract getColumns(): DataColumns<any>;
+ abstract requestItems(api: MiddlewareAPI<Dispatch, RootState>): void;
+}