diff --git a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts index e3a0cca119..3ff86e8196 100644 --- a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts @@ -28,9 +28,11 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem TYPE: string = 'ECM'; alfrescoApi: any; + /** * Constructor * @param alfrescoSettingsService + * @param http */ constructor(private alfrescoSettingsService: AlfrescoSettingsService, private http: Http) { diff --git a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.ts b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.ts index 2879eaca92..520542949c 100644 --- a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.ts @@ -36,6 +36,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase { /** * Constructor * @param alfrescoSettingsService + * @param http */ constructor(private alfrescoSettingsService: AlfrescoSettingsService, private http: Http) { @@ -47,6 +48,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase { * Method to delegate to POST login * @param username * @param password + * @param providers * @returns {Observable|Observable} */ login(username: string, password: string, providers: string []): Observable { @@ -63,6 +65,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase { * * @param username * @param password + * @param providers * @returns {Observable|Observable} */ private performeLogin(username: string, password: string, providers: string []): Observable { @@ -104,7 +107,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase { /** * Return the ticket stored in the localStorage of the specific provider type - * @param ticket + * @param type */ public getTicket(type: string = 'ECM'): string { let auth: AbstractAuthentication = this.findProviderInstance(type); @@ -122,18 +125,16 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase { if (this.providersInstance.length === 0) { return Observable.throw('No providers defined'); } else { - return this.performeLogout(); + return this.performLogout(); } } /** * Perform a logout on behalf of the user for the different provider instance * - * @param username - * @param password * @returns {Observable|Observable} */ - private performeLogout(): Observable { + private performLogout(): Observable { let observableBatch = []; this.providersInstance.forEach((authInstance) => { observableBatch.push(authInstance.logout()); diff --git a/ng2-components/ng2-alfresco-core/src/services/AlfrescoContentService.service.ts b/ng2-components/ng2-alfresco-core/src/services/AlfrescoContentService.service.ts index e233aadf4a..98327e6d66 100644 --- a/ng2-components/ng2-alfresco-core/src/services/AlfrescoContentService.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/AlfrescoContentService.service.ts @@ -31,7 +31,7 @@ export class AlfrescoContentService { * @returns {string} URL address. */ getDocumentThumbnailUrl(document: any): string { - return this.authService.alfrescoApi.content.getDocumentThumbnailUrl(document.entry.id); + return this.authService.getAlfrescoApi().content.getDocumentThumbnailUrl(document.entry.id); } /** @@ -40,6 +40,6 @@ export class AlfrescoContentService { * @returns {string} URL address. */ getContentUrl(document: any): string { - return this.authService.alfrescoApi.content.getContentUrl(document.entry.id); + return this.authService.getAlfrescoApi().content.getContentUrl(document.entry.id); } }