The alfrescoSetting property is present twice

This commit is contained in:
mauriziovitale84 2016-08-11 17:19:02 +01:00
parent b6626e1c20
commit b15ea3c6d4
4 changed files with 19 additions and 21 deletions

View File

@ -25,13 +25,13 @@ export class AlfrescoAuthenticationBPM extends AlfrescoAuthenticationBase implem
TYPE: string = 'BPM';
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
private http: Http) {
super(alfrescoSettingsService, http);
constructor(alfrescoSetting: AlfrescoSettingsService,
http: Http) {
super(alfrescoSetting, http);
}
getHost(): string {
return this.alfrescoSettingsService.bpmHost;
return this.alfrescoSetting.bpmHost;
}
/**
@ -75,7 +75,7 @@ export class AlfrescoAuthenticationBPM extends AlfrescoAuthenticationBase implem
}
private apiActivitiLogin(username: string, password: string) {
let url = this.alfrescoSettingsService.getBPMApiBaseUrl() + '/app/authentication';
let url = this.alfrescoSetting.getBPMApiBaseUrl() + '/app/authentication';
let headers = new Headers({
'Content-Type': 'application/x-www-form-urlencoded'
});
@ -91,7 +91,7 @@ export class AlfrescoAuthenticationBPM extends AlfrescoAuthenticationBase implem
}
private apiActivitiLogout() {
let url = this.alfrescoSettingsService.getBPMApiBaseUrl() + '/app/logout';
let url = this.alfrescoSetting.getBPMApiBaseUrl() + '/app/logout';
return this.http.get(url).toPromise();
}

View File

@ -25,15 +25,13 @@ export class AlfrescoAuthenticationBase {
alfrescoApi: any;
private alfrescoSetting: AlfrescoSettingsService;
/**
* Constructor
* @param alfrescoSettingsService
*/
constructor(alfrescoSettingsService: AlfrescoSettingsService,
http: Http) {
this.alfrescoSetting = alfrescoSettingsService;
constructor(public alfrescoSetting: AlfrescoSettingsService,
public http: Http) {
}
/**

View File

@ -31,12 +31,12 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem
/**
* Constructor
* @param alfrescoSettingsService
* @param alfrescoSetting
* @param http
*/
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
private http: Http) {
super(alfrescoSettingsService, http);
constructor(alfrescoSetting: AlfrescoSettingsService,
http: Http) {
super(alfrescoSetting, http);
if (!this.isLoggedIn) {
this.alfrescoApi = new AlfrescoApi({
@ -51,7 +51,7 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem
}
getHost(): string {
return this.alfrescoSettingsService.ecmHost;
return this.alfrescoSetting.ecmHost;
}
/**

View File

@ -35,13 +35,13 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
/**
* Constructor
* @param alfrescoSettingsService
* @param alfrescoSetting
* @param http
*/
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
private http: Http) {
super(alfrescoSettingsService, http);
this.createProviderInstance(this.alfrescoSettingsService.getProviders());
constructor(alfrescoSetting: AlfrescoSettingsService,
http: Http) {
super(alfrescoSetting, http);
this.createProviderInstance(alfrescoSetting.getProviders());
}
/**
@ -175,7 +175,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
if (this.providersInstance.length === 0) {
providers.forEach((provider) => {
let authInstance: AbstractAuthentication = AuthenticationFactory.createAuth(
this.alfrescoSettingsService, this.http, provider);
this.alfrescoSetting, this.http, provider);
if (authInstance) {
this.providersInstance.push(authInstance);
}