mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppDefinitionRepresentation } from '@alfresco/js-api';
|
||||
import { RuntimeAppDefinitionsApi, AppDefinitionRepresentation } from '@alfresco/js-api';
|
||||
import { Observable, from, throwError } from 'rxjs';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { LogService } from './log.service';
|
||||
@@ -27,8 +27,11 @@ import { map, catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class AppsProcessService {
|
||||
|
||||
appsApi: RuntimeAppDefinitionsApi;
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.appsApi = new RuntimeAppDefinitionsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,7 +39,7 @@ export class AppsProcessService {
|
||||
* @returns The list of deployed apps
|
||||
*/
|
||||
getDeployedApplications(): Observable<AppDefinitionRepresentation[]> {
|
||||
return from(this.apiService.getInstance().activiti.appsApi.getAppDefinitions())
|
||||
return from(this.appsApi.getAppDefinitions())
|
||||
.pipe(
|
||||
map((response: any) => <AppDefinitionRepresentation[]> response.data),
|
||||
catchError((err) => this.handleError(err))
|
||||
@@ -49,7 +52,7 @@ export class AppsProcessService {
|
||||
* @returns The list of deployed apps
|
||||
*/
|
||||
getDeployedApplicationsByName(name: string): Observable<AppDefinitionRepresentation> {
|
||||
return from(this.apiService.getInstance().activiti.appsApi.getAppDefinitions())
|
||||
return from(this.appsApi.getAppDefinitions())
|
||||
.pipe(
|
||||
map((response: any) => <AppDefinitionRepresentation> response.data.find((app) => app.name === name)),
|
||||
catchError((err) => this.handleError(err))
|
||||
@@ -62,7 +65,7 @@ export class AppsProcessService {
|
||||
* @returns Details of the app
|
||||
*/
|
||||
getApplicationDetailsById(appId: number): Observable<AppDefinitionRepresentation> {
|
||||
return from(this.apiService.getInstance().activiti.appsApi.getAppDefinitions())
|
||||
return from(this.appsApi.getAppDefinitions())
|
||||
.pipe(
|
||||
map((response: any) => response.data.find((app) => app.id === appId)),
|
||||
catchError((err) => this.handleError(err))
|
||||
|
Reference in New Issue
Block a user