93803: Refactor existing data services

This commit is contained in:
Yura Bondarenko
2022-08-24 14:53:46 +02:00
parent 8f4b3b58fb
commit 42a2c3c7e2
123 changed files with 2487 additions and 2200 deletions

View File

@@ -1,38 +1,27 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { dataService } from '../cache/builders/build-decorators';
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
import { ObjectCacheService } from '../cache/object-cache.service';
import { HALEndpointService } from '../shared/hal-endpoint.service';
import { DataService } from './data.service';
import { RequestService } from './request.service';
import { DefaultChangeAnalyzer } from './default-change-analyzer.service';
import { CoreState } from '../core-state.model';
import { AccessStatusObject } from 'src/app/shared/object-list/access-status-badge/access-status.model';
import { ACCESS_STATUS } from 'src/app/shared/object-list/access-status-badge/access-status.resource-type';
import { Observable } from 'rxjs';
import { RemoteData } from './remote-data';
import { Item } from '../shared/item.model';
import { BaseDataService } from './base/base-data.service';
@Injectable()
@dataService(ACCESS_STATUS)
export class AccessStatusDataService extends DataService<AccessStatusObject> {
protected linkPath = 'accessStatus';
export class AccessStatusDataService extends BaseDataService<AccessStatusObject> {
constructor(
protected comparator: DefaultChangeAnalyzer<AccessStatusObject>,
protected halService: HALEndpointService,
protected http: HttpClient,
protected notificationsService: NotificationsService,
protected objectCache: ObjectCacheService,
protected rdbService: RemoteDataBuildService,
protected requestService: RequestService,
protected store: Store<CoreState>,
protected rdbService: RemoteDataBuildService,
protected objectCache: ObjectCacheService,
protected halService: HALEndpointService,
) {
super();
super('accessStatus', requestService, rdbService, objectCache, halService);
}
/**