mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ADF-5120] Fix initialization error of PS cloud Services (#5634)
This commit is contained in:
parent
1f5215cd38
commit
86d6ecb49e
@ -41,8 +41,7 @@ export class FormCloudService extends BaseCloudService {
|
||||
apiService: AlfrescoApiService,
|
||||
appConfigService: AppConfigService
|
||||
) {
|
||||
super(apiService);
|
||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
||||
super(apiService, appConfigService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,8 +29,7 @@ export class FormDefinitionSelectorCloudService extends BaseCloudService {
|
||||
|
||||
constructor(apiService: AlfrescoApiService,
|
||||
appConfigService: AppConfigService) {
|
||||
super(apiService);
|
||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
||||
super(apiService, appConfigService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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', '');
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,8 +29,7 @@ export class StartTaskCloudService extends BaseCloudService {
|
||||
constructor(
|
||||
apiService: AlfrescoApiService,
|
||||
appConfigService: AppConfigService) {
|
||||
super(apiService);
|
||||
this.contextRoot = appConfigService.get('bpmHost');
|
||||
super(apiService, appConfigService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user