[ADF-5120] Fix initialization error of PS cloud Services (#5634)

This commit is contained in:
davidcanonieto 2020-04-23 17:59:44 +01:00 committed by GitHub
parent 1f5215cd38
commit 86d6ecb49e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 17 additions and 22 deletions

View File

@ -41,8 +41,7 @@ export class FormCloudService extends BaseCloudService {
apiService: AlfrescoApiService,
appConfigService: AppConfigService
) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**

View File

@ -29,8 +29,7 @@ export class FormDefinitionSelectorCloudService extends BaseCloudService {
constructor(apiService: AlfrescoApiService,
appConfigService: AppConfigService) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**

View File

@ -27,8 +27,7 @@ export class ProcessListCloudService extends BaseCloudService {
constructor(apiService: AlfrescoApiService,
appConfigService: AppConfigService,
private logService: LogService) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**

View File

@ -32,8 +32,7 @@ export class ProcessCloudService extends BaseCloudService {
constructor(apiService: AlfrescoApiService,
appConfigService: AppConfigService,
private logService: LogService) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**

View File

@ -32,8 +32,7 @@ export class StartProcessCloudService extends BaseCloudService {
constructor(apiService: AlfrescoApiService,
private logService: LogService,
appConfigService: AppConfigService) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { AlfrescoApiService } from '@alfresco/adf-core';
import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
import { from, Observable } from 'rxjs';
export interface CallApiParams {
@ -35,8 +35,6 @@ export interface CallApiParams {
export class BaseCloudService {
protected contextRoot: string;
protected defaultParams: CallApiParams = {
path: '',
httpMethod: '',
@ -45,7 +43,9 @@ export class BaseCloudService {
returnType: Object
};
constructor(protected apiService: AlfrescoApiService) {}
constructor(
protected apiService: AlfrescoApiService,
protected appConfigService: AppConfigService) {}
getBasePath(appName: string): string {
return appName
@ -113,4 +113,8 @@ export class BaseCloudService {
params.responseType
);
}
protected get contextRoot() {
return this.appConfigService.get('bpmHost', '');
}
}

View File

@ -28,8 +28,7 @@ export class UserPreferenceCloudService extends BaseCloudService implements Pref
apiService: AlfrescoApiService,
appConfigService: AppConfigService,
private logService: LogService) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**

View File

@ -29,8 +29,7 @@ export class StartTaskCloudService extends BaseCloudService {
constructor(
apiService: AlfrescoApiService,
appConfigService: AppConfigService) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost');
super(apiService, appConfigService);
}
/**

View File

@ -36,8 +36,7 @@ export class TaskCloudService extends BaseCloudService {
private logService: LogService,
private identityUserService: IdentityUserService
) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**

View File

@ -28,8 +28,7 @@ export class TaskListCloudService extends BaseCloudService {
constructor(apiService: AlfrescoApiService,
appConfigService: AppConfigService,
private logService: LogService) {
super(apiService);
this.contextRoot = appConfigService.get('bpmHost', '');
super(apiService, appConfigService);
}
/**