mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Revert "[AAE-8713] feat: create api registry with factories support (… (#7647)
* Revert "[AAE-8713] feat: create api registry with factories support (#7634)"
This reverts commit 226a6548a1
.
This commit is contained in:
@@ -18,13 +18,11 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { from, Observable, throwError, Subject } from 'rxjs';
|
||||
import { catchError, map, switchMap, filter, take } from 'rxjs/operators';
|
||||
import { RepositoryInfo, SystemPropertiesRepresentation } from '@alfresco/js-api';
|
||||
import { AboutApi, DiscoveryApi, RepositoryInfo, SystemPropertiesApi, SystemPropertiesRepresentation } from '@alfresco/js-api';
|
||||
|
||||
import { BpmProductVersionModel } from '../models/product-version.model';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
import { ApiClientsService } from '../api';
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -38,8 +36,7 @@ export class DiscoveryApiService {
|
||||
|
||||
constructor(
|
||||
private apiService: AlfrescoApiService,
|
||||
private authenticationService: AuthenticationService,
|
||||
private apiClientsService: ApiClientsService) {
|
||||
private authenticationService: AuthenticationService) {
|
||||
|
||||
this.authenticationService.onLogin
|
||||
.pipe(
|
||||
@@ -50,14 +47,13 @@ export class DiscoveryApiService {
|
||||
.subscribe((info) => this.ecmProductInfo$.next(info));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets product information for Content Services.
|
||||
*
|
||||
* @returns ProductVersionModel containing product details
|
||||
*/
|
||||
getEcmProductInfo(): Observable<RepositoryInfo> {
|
||||
const discoveryApi = this.apiClientsService.get('DiscoveryClient.discovery');
|
||||
const discoveryApi = new DiscoveryApi(this.apiService.getInstance());
|
||||
|
||||
return from(discoveryApi.getRepositoryInformation())
|
||||
.pipe(
|
||||
@@ -72,7 +68,7 @@ export class DiscoveryApiService {
|
||||
* @returns ProductVersionModel containing product details
|
||||
*/
|
||||
getBpmProductInfo(): Observable<BpmProductVersionModel> {
|
||||
const aboutApi = this.apiClientsService.get('ActivitiClient.about');
|
||||
const aboutApi = new AboutApi(this.apiService.getInstance());
|
||||
|
||||
return from(aboutApi.getAppVersion())
|
||||
.pipe(
|
||||
@@ -82,7 +78,7 @@ export class DiscoveryApiService {
|
||||
}
|
||||
|
||||
getBPMSystemProperties(): Observable<SystemPropertiesRepresentation> {
|
||||
const systemPropertiesApi = this.apiClientsService.get('ActivitiClient.system-properties');
|
||||
const systemPropertiesApi = new SystemPropertiesApi(this.apiService.getInstance());
|
||||
|
||||
return from(systemPropertiesApi.getProperties())
|
||||
.pipe(
|
||||
|
Reference in New Issue
Block a user