mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
#1370 Removed deprecated AlfrescoAuthenticationService
This commit is contained in:
parent
58af422d62
commit
896c57fa53
@ -20,7 +20,7 @@ import { Router } from '@angular/router';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
StorageService
|
StorageService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
@ -38,7 +38,7 @@ export class AppComponent {
|
|||||||
ecmHost: string = 'http://' + window.location.hostname + ':8080';
|
ecmHost: string = 'http://' + window.location.hostname + ':8080';
|
||||||
bpmHost: string = 'http://' + window.location.hostname + ':9999';
|
bpmHost: string = 'http://' + window.location.hostname + ':9999';
|
||||||
|
|
||||||
constructor(public auth: AlfrescoAuthenticationService,
|
constructor(public authService: AuthService,
|
||||||
public router: Router,
|
public router: Router,
|
||||||
public settingsService: SettingsService,
|
public settingsService: SettingsService,
|
||||||
private translate: AlfrescoTranslationService,
|
private translate: AlfrescoTranslationService,
|
||||||
@ -60,11 +60,11 @@ export class AppComponent {
|
|||||||
|
|
||||||
isLoggedIn(): boolean {
|
isLoggedIn(): boolean {
|
||||||
this.redirectToLoginPageIfNotLoggedIn();
|
this.redirectToLoginPageIfNotLoggedIn();
|
||||||
return this.auth.isLoggedIn();
|
return this.authService.isLoggedIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
redirectToLoginPageIfNotLoggedIn(): void {
|
redirectToLoginPageIfNotLoggedIn(): void {
|
||||||
if (!this.isLoginPage() && !this.auth.isLoggedIn()) {
|
if (!this.isLoginPage() && !this.authService.isLoggedIn()) {
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ export class AppComponent {
|
|||||||
|
|
||||||
onLogout(event) {
|
onLogout(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.auth.logout()
|
this.authService.logout()
|
||||||
.subscribe(
|
.subscribe(
|
||||||
() => {
|
() => {
|
||||||
this.navigateToLogin();
|
this.navigateToLogin();
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, OnInit, Optional, ViewChild } from '@angular/core';
|
import { Component, OnInit, Optional, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AuthService } from 'ng2-alfresco-core';
|
||||||
import {
|
import {
|
||||||
DocumentActionsService,
|
DocumentActionsService,
|
||||||
DocumentList,
|
DocumentList,
|
||||||
@ -49,7 +49,7 @@ export class FilesComponent implements OnInit {
|
|||||||
documentList: DocumentList;
|
documentList: DocumentList;
|
||||||
|
|
||||||
constructor(private documentActions: DocumentActionsService,
|
constructor(private documentActions: DocumentActionsService,
|
||||||
public auth: AlfrescoAuthenticationService,
|
public authService: AuthService,
|
||||||
private formService: FormService,
|
private formService: FormService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@Optional() private route: ActivatedRoute) {
|
@Optional() private route: ActivatedRoute) {
|
||||||
@ -106,7 +106,7 @@ export class FilesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.auth.isBpmLoggedIn()) {
|
if (this.authService.isBpmLoggedIn()) {
|
||||||
this.formService.getProcessDefinitions().subscribe(
|
this.formService.getProcessDefinitions().subscribe(
|
||||||
defs => this.setupBpmActions(defs || []),
|
defs => this.setupBpmActions(defs || []),
|
||||||
err => console.log(err)
|
err => console.log(err)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, EventEmitter, Output } from '@angular/core';
|
import { Component, EventEmitter, Output } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AuthService } from 'ng2-alfresco-core';
|
||||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -34,11 +34,11 @@ export class SearchBarComponent {
|
|||||||
expand = new EventEmitter();
|
expand = new EventEmitter();
|
||||||
|
|
||||||
constructor(public router: Router,
|
constructor(public router: Router,
|
||||||
public auth: AlfrescoAuthenticationService) {
|
public authService: AuthService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoggedIn(): boolean {
|
isLoggedIn(): boolean {
|
||||||
return this.auth.isLoggedIn();
|
return this.authService.isLoggedIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import { NgModule, Component, OnInit } from '@angular/core';
|
import { NgModule, Component, OnInit } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { AnalyticsModule } from 'ng2-activiti-analytics';
|
import { AnalyticsModule } from 'ng2-activiti-analytics';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -60,7 +60,7 @@ export class AnalyticsDemoComponent implements OnInit {
|
|||||||
|
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@ -19,7 +19,7 @@ import { NgModule, Component } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -50,7 +50,7 @@ export class DiagramDemoComponent {
|
|||||||
|
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import { NgModule, Component, OnInit } from '@angular/core';
|
import { NgModule, Component, OnInit } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -49,7 +49,7 @@ export class FormDemoComponent implements OnInit {
|
|||||||
|
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@ -28,7 +28,7 @@ import {
|
|||||||
ActivitiStartProcessInstance,
|
ActivitiStartProcessInstance,
|
||||||
ProcessInstance
|
ProcessInstance
|
||||||
} from 'ng2-activiti-processlist';
|
} from 'ng2-activiti-processlist';
|
||||||
import { AlfrescoAuthenticationService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
import { AuthService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
const currentProcessIdNew = '__NEW__';
|
const currentProcessIdNew = '__NEW__';
|
||||||
@ -160,7 +160,7 @@ class MyDemoApp implements OnInit {
|
|||||||
|
|
||||||
dataProcesses: ObjectDataTableAdapter;
|
dataProcesses: ObjectDataTableAdapter;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@ -21,7 +21,7 @@ import { By } from '@angular/platform-browser';
|
|||||||
import {
|
import {
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
CoreModule,
|
CoreModule,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService } from 'ng2-alfresco-core';
|
AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ describe('ActivitiProcessInstanceHeader', () => {
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
ActivitiProcessService,
|
ActivitiProcessService,
|
||||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||||
|
@ -26,7 +26,7 @@ import {
|
|||||||
ActivitiTaskList
|
ActivitiTaskList
|
||||||
} from 'ng2-activiti-tasklist';
|
} from 'ng2-activiti-tasklist';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { AlfrescoAuthenticationService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
import { AuthService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -144,7 +144,7 @@ class MyDemoApp implements OnInit {
|
|||||||
|
|
||||||
dataTasks: ObjectDataTableAdapter;
|
dataTasks: ObjectDataTableAdapter;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@ -21,7 +21,7 @@ import { PageNode } from './document-library.model.mock';
|
|||||||
import { DocumentListService } from './../services/document-list.service';
|
import { DocumentListService } from './../services/document-list.service';
|
||||||
import {
|
import {
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoApiService
|
AlfrescoApiService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
@ -34,7 +34,7 @@ export class DocumentListServiceMock extends DocumentListService {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
settings?: SettingsService,
|
settings?: SettingsService,
|
||||||
authService?: AlfrescoAuthenticationService,
|
authService?: AuthService,
|
||||||
contentService?: AlfrescoContentService,
|
contentService?: AlfrescoContentService,
|
||||||
apiService?: AlfrescoApiService
|
apiService?: AlfrescoApiService
|
||||||
) {
|
) {
|
||||||
|
@ -19,7 +19,7 @@ import { NgModule, Component } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { LoginModule } from 'ng2-alfresco-login';
|
import { LoginModule } from 'ng2-alfresco-login';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -73,7 +73,7 @@ export class AppComponent {
|
|||||||
|
|
||||||
public disableCsrf: boolean = false;
|
public disableCsrf: boolean = false;
|
||||||
|
|
||||||
constructor(public auth: AlfrescoAuthenticationService,
|
constructor(public authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
CoreModule
|
CoreModule
|
||||||
@ -44,9 +44,9 @@ describe('AlfrescoLogin', () => {
|
|||||||
declarations: [AlfrescoLoginComponent],
|
declarations: [AlfrescoLoginComponent],
|
||||||
providers: [
|
providers: [
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
{provide: AlfrescoAuthenticationService, useClass: AuthenticationMock},
|
{provide: AuthService, useClass: AuthenticationMock},
|
||||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
@ -19,7 +19,7 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
|
|||||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||||
import {
|
import {
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService
|
SettingsService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
import { FormSubmitEvent } from '../models/form-submit-event.model';
|
import { FormSubmitEvent } from '../models/form-submit-event.model';
|
||||||
@ -79,7 +79,7 @@ export class AlfrescoLoginComponent implements OnInit {
|
|||||||
* @param translate
|
* @param translate
|
||||||
*/
|
*/
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
public authService: AlfrescoAuthenticationService,
|
public authService: AuthService,
|
||||||
public settingsService: SettingsService,
|
public settingsService: SettingsService,
|
||||||
private translate: AlfrescoTranslationService) {
|
private translate: AlfrescoTranslationService) {
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import { SearchModule } from 'ng2-alfresco-search';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoTranslationService
|
AlfrescoTranslationService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class SearchDemo implements OnInit {
|
|||||||
|
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
translation: AlfrescoTranslationService) {
|
translation: AlfrescoTranslationService) {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import { NgModule, Component, Input, OnInit } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { TagModule } from 'ng2-alfresco-tag';
|
import { TagModule } from 'ng2-alfresco-tag';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -59,7 +59,7 @@ class TagDemo implements OnInit {
|
|||||||
|
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
StorageService
|
StorageService
|
||||||
@ -34,7 +34,7 @@ describe('Tag service', () => {
|
|||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
TagService,
|
TagService,
|
||||||
StorageService
|
StorageService
|
||||||
]);
|
]);
|
||||||
|
@ -19,7 +19,7 @@ import { NgModule, Component, OnInit } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { UploadModule } from 'ng2-alfresco-upload';
|
import { UploadModule } from 'ng2-alfresco-upload';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -113,7 +113,7 @@ export class MyDemoApp implements OnInit {
|
|||||||
|
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
settingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
|
@ -21,7 +21,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|||||||
import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
|
import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { LoginModule } from 'ng2-alfresco-login';
|
import { LoginModule } from 'ng2-alfresco-login';
|
||||||
import { AlfrescoAuthenticationService, SettingsService } from 'ng2-alfresco-core';
|
import { AuthService, SettingsService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'alfresco-app-demo',
|
selector: 'alfresco-app-demo',
|
||||||
@ -92,7 +92,7 @@ class UserInfoDemo implements OnInit {
|
|||||||
|
|
||||||
public disableCsrf: boolean = false;
|
public disableCsrf: boolean = false;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService) {
|
private settingsService: SettingsService) {
|
||||||
settingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
settingsService.bpmHost = this.bpmHost;
|
settingsService.bpmHost = this.bpmHost;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import { NgModule, Component } from '@angular/core';
|
import { NgModule, Component } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { ViewerModule } from 'ng2-alfresco-viewer';
|
import { ViewerModule } from 'ng2-alfresco-viewer';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -54,7 +54,7 @@ class MyDemoApp {
|
|||||||
|
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
settingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
|
@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { ImgViewerComponent } from './imgViewer.component';
|
import { ImgViewerComponent } from './imgViewer.component';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
CoreModule
|
CoreModule
|
||||||
@ -40,7 +40,7 @@ describe('Test ng2-alfresco-viewer Img viewer component ', () => {
|
|||||||
declarations: [ImgViewerComponent],
|
declarations: [ImgViewerComponent],
|
||||||
providers: [
|
providers: [
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoApiService
|
AlfrescoApiService
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { MediaPlayerComponent } from './mediaPlayer.component';
|
import { MediaPlayerComponent } from './mediaPlayer.component';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
CoreModule
|
CoreModule
|
||||||
@ -40,7 +40,7 @@ describe('Test ng2-alfresco-viewer Media player component ', () => {
|
|||||||
declarations: [MediaPlayerComponent],
|
declarations: [MediaPlayerComponent],
|
||||||
providers: [
|
providers: [
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoApiService
|
AlfrescoApiService
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { NotSupportedFormat } from './notSupportedFormat.component';
|
import { NotSupportedFormat } from './notSupportedFormat.component';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
CoreModule
|
CoreModule
|
||||||
@ -40,7 +40,7 @@ describe('Test ng2-alfresco-viewer Not Supported Format View component', () => {
|
|||||||
declarations: [NotSupportedFormat],
|
declarations: [NotSupportedFormat],
|
||||||
providers: [
|
providers: [
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoApiService
|
AlfrescoApiService
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
@ -21,7 +21,7 @@ import { PdfViewerComponent } from './pdfViewer.component';
|
|||||||
import { EventMock } from '../assets/event.mock';
|
import { EventMock } from '../assets/event.mock';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
CoreModule
|
CoreModule
|
||||||
@ -42,7 +42,7 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
|||||||
declarations: [PdfViewerComponent],
|
declarations: [PdfViewerComponent],
|
||||||
providers: [
|
providers: [
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
RenderingQueueServices
|
RenderingQueueServices
|
||||||
]
|
]
|
||||||
|
@ -25,7 +25,7 @@ import { ViewerComponent } from './viewer.component';
|
|||||||
import { EventMock } from '../assets/event.mock';
|
import { EventMock } from '../assets/event.mock';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
CoreModule
|
CoreModule
|
||||||
@ -54,7 +54,7 @@ describe('Test ng2-alfresco-viewer ViewerComponent', () => {
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
SettingsService,
|
SettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AuthService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
RenderingQueueServices
|
RenderingQueueServices
|
||||||
]
|
]
|
||||||
|
@ -19,7 +19,7 @@ import { NgModule, Component, OnInit } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
import { WebScriptModule } from 'ng2-alfresco-webscript';
|
import { WebScriptModule } from 'ng2-alfresco-webscript';
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ class WebscriptDemo implements OnInit {
|
|||||||
scriptArgs: string = '';
|
scriptArgs: string = '';
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AuthService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user