AAE-38626 Made cloud services extentable (#11450)

This commit is contained in:
Andreas Philippi
2025-12-15 11:54:19 +00:00
committed by GitHub
parent 14dbc4fe49
commit f6c7d90578
3 changed files with 15 additions and 17 deletions
@@ -50,8 +50,8 @@ export class ProcessFilterCloudService {
private filterKeyToBeRefreshedSource = new Subject<string>();
filterKeyToBeRefreshed$: Observable<string> = this.filterKeyToBeRefreshedSource.asObservable();
private readonly preferenceService = inject<PreferenceCloudServiceInterface>(PROCESS_FILTERS_SERVICE_TOKEN);
private readonly identityUserService = inject(IdentityUserService);
protected readonly preferenceService = inject<PreferenceCloudServiceInterface>(PROCESS_FILTERS_SERVICE_TOKEN);
protected readonly identityUserService = inject(IdentityUserService);
private readonly notificationCloudService = inject(NotificationCloudService);
constructor() {
@@ -342,7 +342,7 @@ export class ProcessFilterCloudService {
* @param appName Name of the target app
* @returns String of process instance filters preference key
*/
private prepareKey(appName: string): string {
protected prepareKey(appName: string): string {
const user = this.identityUserService.getCurrentUserInfo();
return `process-filters-${appName}-${user.username}`;
}
@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Injectable, Inject } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { Observable, of, BehaviorSubject } from 'rxjs';
import { ServiceTaskFilterCloudModel } from '../models/filter-cloud.model';
import { switchMap, map } from 'rxjs/operators';
@@ -27,14 +27,11 @@ import { IdentityUserService } from '../../../people/services/identity-user.serv
providedIn: 'root'
})
export class ServiceTaskFilterCloudService {
private filtersSubject = new BehaviorSubject<ServiceTaskFilterCloudModel[]>([]);
filters$ = this.filtersSubject.asObservable();
private readonly filtersSubject = new BehaviorSubject<ServiceTaskFilterCloudModel[]>([]);
readonly filters$ = this.filtersSubject.asObservable();
constructor(
private identityUserService: IdentityUserService,
@Inject(TASK_FILTERS_SERVICE_TOKEN)
public preferenceService: PreferenceCloudServiceInterface
) {}
protected readonly preferenceService = inject<PreferenceCloudServiceInterface>(TASK_FILTERS_SERVICE_TOKEN);
protected readonly identityUserService = inject(IdentityUserService);
/**
* Creates and returns the default task filters for an app.
@@ -242,7 +239,7 @@ export class ServiceTaskFilterCloudService {
* @param appName Name of the target app
* @returns String of task filters preference key
*/
private prepareKey(appName: string): string {
protected prepareKey(appName: string): string {
return `service-task-filters-${appName}-${this.identityUserService.getCurrentUserInfo().username}`;
}
@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Injectable, Inject } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { Observable, of, BehaviorSubject, throwError, Subject } from 'rxjs';
import { TaskFilterCloudModel } from '../models/filter-cloud.model';
import { switchMap, map } from 'rxjs/operators';
@@ -48,15 +48,16 @@ const TASK_EVENT_SUBSCRIPTION_QUERY = `
providedIn: 'root'
})
export class TaskFilterCloudService extends BaseCloudService {
public preferenceService = inject<PreferenceCloudServiceInterface>(TASK_FILTERS_SERVICE_TOKEN);
protected identityUserService = inject(IdentityUserService);
private filtersSubject = new BehaviorSubject<TaskFilterCloudModel[]>([]);
filters$ = this.filtersSubject.asObservable();
private filterKeyToBeRefreshedSource = new Subject<string>();
filterKeyToBeRefreshed$ = this.filterKeyToBeRefreshedSource.asObservable();
constructor(
private identityUserService: IdentityUserService,
@Inject(TASK_FILTERS_SERVICE_TOKEN)
public preferenceService: PreferenceCloudServiceInterface,
private notificationCloudService: NotificationCloudService,
adfHttpClient: AdfHttpClient
) {
@@ -307,7 +308,7 @@ export class TaskFilterCloudService extends BaseCloudService {
* @param appName Name of the target app
* @returns String of task filters preference key
*/
private prepareKey(appName: string): string {
protected prepareKey(appName: string): string {
return `task-filters-${appName}-${this.identityUserService.getCurrentUserInfo().username}`;
}