[ADF-5426] Remove compatibility layer from Lib (#7110)

* remove compatibility step 1

* remove compatibility step 2

* remove compatibility step 3

* remove compatibility step 4

* remove compatibility step 5
This commit is contained in:
Eugenio Romano
2021-08-04 17:31:35 +02:00
committed by GitHub
parent 5d5b582e32
commit f30b20cc46
113 changed files with 1375 additions and 2348 deletions

View File

@@ -18,7 +18,7 @@
import { Injectable } from '@angular/core';
import { Observable, from, of } from 'rxjs';
import { NodePaging } from '@alfresco/js-api';
import { NodePaging, NodesApi, TrashcanApi } from '@alfresco/js-api';
import { AlfrescoApiService } from './alfresco-api.service';
import { UserPreferencesService } from './user-preferences.service';
import { catchError } from 'rxjs/operators';
@@ -27,13 +27,16 @@ import { catchError } from 'rxjs/operators';
providedIn: 'root'
})
export class DeletedNodesApiService {
nodesApi: NodesApi;
trashcanApi: TrashcanApi;
constructor(
private apiService: AlfrescoApiService,
private preferences: UserPreferencesService
) {}
private get nodesApi() {
return this.apiService.getInstance().core.nodesApi;
) {
this.nodesApi = new NodesApi(this.apiService.getInstance());
this.trashcanApi = new TrashcanApi(this.apiService.getInstance());
}
/**
@@ -48,7 +51,7 @@ export class DeletedNodesApiService {
skipCount: 0
};
const queryOptions = Object.assign(defaultOptions, options);
const promise = this.nodesApi.getDeletedNodes(queryOptions);
const promise = this.trashcanApi.listDeletedNodes(queryOptions);
return from(promise).pipe(
catchError((err) => of(err))