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,
|
apiService: AlfrescoApiService,
|
||||||
appConfigService: AppConfigService
|
appConfigService: AppConfigService
|
||||||
) {
|
) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,8 +29,7 @@ export class FormDefinitionSelectorCloudService extends BaseCloudService {
|
|||||||
|
|
||||||
constructor(apiService: AlfrescoApiService,
|
constructor(apiService: AlfrescoApiService,
|
||||||
appConfigService: AppConfigService) {
|
appConfigService: AppConfigService) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,8 +27,7 @@ export class ProcessListCloudService extends BaseCloudService {
|
|||||||
constructor(apiService: AlfrescoApiService,
|
constructor(apiService: AlfrescoApiService,
|
||||||
appConfigService: AppConfigService,
|
appConfigService: AppConfigService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,8 +32,7 @@ export class ProcessCloudService extends BaseCloudService {
|
|||||||
constructor(apiService: AlfrescoApiService,
|
constructor(apiService: AlfrescoApiService,
|
||||||
appConfigService: AppConfigService,
|
appConfigService: AppConfigService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,8 +32,7 @@ export class StartProcessCloudService extends BaseCloudService {
|
|||||||
constructor(apiService: AlfrescoApiService,
|
constructor(apiService: AlfrescoApiService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
appConfigService: AppConfigService) {
|
appConfigService: AppConfigService) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
|
||||||
import { from, Observable } from 'rxjs';
|
import { from, Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface CallApiParams {
|
export interface CallApiParams {
|
||||||
@ -35,8 +35,6 @@ export interface CallApiParams {
|
|||||||
|
|
||||||
export class BaseCloudService {
|
export class BaseCloudService {
|
||||||
|
|
||||||
protected contextRoot: string;
|
|
||||||
|
|
||||||
protected defaultParams: CallApiParams = {
|
protected defaultParams: CallApiParams = {
|
||||||
path: '',
|
path: '',
|
||||||
httpMethod: '',
|
httpMethod: '',
|
||||||
@ -45,7 +43,9 @@ export class BaseCloudService {
|
|||||||
returnType: Object
|
returnType: Object
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(protected apiService: AlfrescoApiService) {}
|
constructor(
|
||||||
|
protected apiService: AlfrescoApiService,
|
||||||
|
protected appConfigService: AppConfigService) {}
|
||||||
|
|
||||||
getBasePath(appName: string): string {
|
getBasePath(appName: string): string {
|
||||||
return appName
|
return appName
|
||||||
@ -113,4 +113,8 @@ export class BaseCloudService {
|
|||||||
params.responseType
|
params.responseType
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected get contextRoot() {
|
||||||
|
return this.appConfigService.get('bpmHost', '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,7 @@ export class UserPreferenceCloudService extends BaseCloudService implements Pref
|
|||||||
apiService: AlfrescoApiService,
|
apiService: AlfrescoApiService,
|
||||||
appConfigService: AppConfigService,
|
appConfigService: AppConfigService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,8 +29,7 @@ export class StartTaskCloudService extends BaseCloudService {
|
|||||||
constructor(
|
constructor(
|
||||||
apiService: AlfrescoApiService,
|
apiService: AlfrescoApiService,
|
||||||
appConfigService: AppConfigService) {
|
appConfigService: AppConfigService) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,8 +36,7 @@ export class TaskCloudService extends BaseCloudService {
|
|||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private identityUserService: IdentityUserService
|
private identityUserService: IdentityUserService
|
||||||
) {
|
) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,8 +28,7 @@ export class TaskListCloudService extends BaseCloudService {
|
|||||||
constructor(apiService: AlfrescoApiService,
|
constructor(apiService: AlfrescoApiService,
|
||||||
appConfigService: AppConfigService,
|
appConfigService: AppConfigService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
super(apiService);
|
super(apiService, appConfigService);
|
||||||
this.contextRoot = appConfigService.get('bpmHost', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user