fix the private access to the service variables (#8202)

* fix the private access to the service variables

* fix issues with unit tests
This commit is contained in:
Denys Vuika
2023-01-28 17:17:09 +00:00
committed by GitHub
parent b503773475
commit 2a45c1e7a3
37 changed files with 72 additions and 70 deletions

View File

@@ -26,7 +26,7 @@ import { map, catchError } from 'rxjs/operators';
})
export class AppsProcessService {
_appsApi: RuntimeAppDefinitionsApi;
private _appsApi: RuntimeAppDefinitionsApi;
get appsApi(): RuntimeAppDefinitionsApi {
this._appsApi = this._appsApi ?? new RuntimeAppDefinitionsApi(this.apiService.getInstance());
return this._appsApi;

View File

@@ -35,13 +35,13 @@ export class ActivitiContentService {
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
static GENERIC_ERROR_MESSAGE: string = 'Server error';
_integrationAlfrescoOnPremiseApi: IntegrationAlfrescoOnPremiseApi;
private _integrationAlfrescoOnPremiseApi: IntegrationAlfrescoOnPremiseApi;
get integrationAlfrescoOnPremiseApi(): IntegrationAlfrescoOnPremiseApi {
this._integrationAlfrescoOnPremiseApi = this._integrationAlfrescoOnPremiseApi ?? new IntegrationAlfrescoOnPremiseApi(this.apiService.getInstance());
return this._integrationAlfrescoOnPremiseApi;
}
_contentApi: ActivitiContentApi;
private _contentApi: ActivitiContentApi;
get contentApi(): ActivitiContentApi {
this._contentApi = this._contentApi ?? new ActivitiContentApi(this.apiService.getInstance());
return this._contentApi;

View File

@@ -30,7 +30,7 @@ export class EcmModelService {
public static MODEL_NAME: string = 'activitiFormsModel';
public static TYPE_MODEL: string = 'cm:folder';
_customModelApi: CustomModelApi;
private _customModelApi: CustomModelApi;
get customModelApi(): CustomModelApi {
this._customModelApi = this._customModelApi ?? new CustomModelApi(this.apiService.getInstance());
return this._customModelApi;

View File

@@ -29,7 +29,7 @@ export class EditorService {
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
static GENERIC_ERROR_MESSAGE: string = 'Server error';
_editorApi: FormModelsApi;
private _editorApi: FormModelsApi;
get editorApi(): FormModelsApi {
this._editorApi = this._editorApi ?? new FormModelsApi(this.apiService.getInstance());
return this._editorApi;

View File

@@ -29,7 +29,7 @@ export class ModelService {
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
static GENERIC_ERROR_MESSAGE: string = 'Server error';
_modelsApi: ModelsApi;
private _modelsApi: ModelsApi;
get modelsApi(): ModelsApi {
this._modelsApi = this._modelsApi ?? new ModelsApi(this.apiService.getInstance());
return this._modelsApi;

View File

@@ -29,7 +29,7 @@ export class ProcessContentService {
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
static GENERIC_ERROR_MESSAGE: string = 'Server error';
_contentApi: ActivitiContentApi;
private _contentApi: ActivitiContentApi;
get contentApi(): ActivitiContentApi {
this._contentApi = this._contentApi ?? new ActivitiContentApi(this.apiService.getInstance());
return this._contentApi;

View File

@@ -29,7 +29,7 @@ export class ProcessDefinitionService {
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
static GENERIC_ERROR_MESSAGE: string = 'Server error';
_processDefinitionsApi: ProcessDefinitionsApi;
private _processDefinitionsApi: ProcessDefinitionsApi;
get processDefinitionsApi(): ProcessDefinitionsApi {
this._processDefinitionsApi = this._processDefinitionsApi ?? new ProcessDefinitionsApi(this.apiService.getInstance());
return this._processDefinitionsApi;

View File

@@ -29,7 +29,7 @@ export class TaskFormService {
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
static GENERIC_ERROR_MESSAGE: string = 'Server error';
_taskFormsApi: TaskFormsApi;
private _taskFormsApi: TaskFormsApi;
get taskFormsApi(): TaskFormsApi {
this._taskFormsApi = this._taskFormsApi ?? new TaskFormsApi(this.apiService.getInstance());
return this._taskFormsApi;

View File

@@ -29,7 +29,7 @@ export class TaskService {
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
static GENERIC_ERROR_MESSAGE: string = 'Server error';
_taskApi: TasksApi;
private _taskApi: TasksApi;
get taskApi(): TasksApi {
this._taskApi = this._taskApi ?? new TasksApi(this.apiService.getInstance());
return this._taskApi;

View File

@@ -27,7 +27,7 @@ import { CommentProcessServiceInterface } from '../interfaces/comment-process.se
})
export class CommentProcessService implements CommentProcessServiceInterface {
_commentsApi: ActivitiCommentsApi;
private _commentsApi: ActivitiCommentsApi;
get commentsApi(): ActivitiCommentsApi {
this._commentsApi = this._commentsApi ?? new ActivitiCommentsApi(this.apiService.getInstance());
return this._commentsApi;

View File

@@ -25,7 +25,7 @@ import { throwError } from 'rxjs';
})
export class ProcessUploadService extends UploadService {
private _contentApi;
private _contentApi: ActivitiContentApi;
get contentApi(): ActivitiContentApi {
this._contentApi = this._contentApi ?? new ActivitiContentApi(this.apiService.getInstance());
return this._contentApi;

View File

@@ -25,7 +25,7 @@ import { ActivitiContentApi } from '@alfresco/js-api';
})
export class TaskUploadService extends UploadService {
private _contentApi;
private _contentApi: ActivitiContentApi;
get contentApi(): ActivitiContentApi {
this._contentApi = this._contentApi ?? new ActivitiContentApi(this.apiService.getInstance());
return this._contentApi;