mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Merge pull request #1383 from Alfresco/dev-mvitale-1370
Remove use of deprecated Services
This commit is contained in:
@@ -20,8 +20,8 @@ import { Router } from '@angular/router';
|
||||
|
||||
import {
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
StorageService
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
@@ -38,9 +38,9 @@ export class AppComponent {
|
||||
ecmHost: string = 'http://' + window.location.hostname + ':8080';
|
||||
bpmHost: string = 'http://' + window.location.hostname + ':9999';
|
||||
|
||||
constructor(public auth: AlfrescoAuthenticationService,
|
||||
constructor(public authService: AuthService,
|
||||
public router: Router,
|
||||
public alfrescoSettingsService: AlfrescoSettingsService,
|
||||
public settingsService: SettingsService,
|
||||
private translate: AlfrescoTranslationService,
|
||||
private storage: StorageService) {
|
||||
this.setEcmHost();
|
||||
@@ -60,11 +60,11 @@ export class AppComponent {
|
||||
|
||||
isLoggedIn(): boolean {
|
||||
this.redirectToLoginPageIfNotLoggedIn();
|
||||
return this.auth.isLoggedIn();
|
||||
return this.authService.isLoggedIn();
|
||||
}
|
||||
|
||||
redirectToLoginPageIfNotLoggedIn(): void {
|
||||
if (!this.isLoginPage() && !this.auth.isLoggedIn()) {
|
||||
if (!this.isLoginPage() && !this.authService.isLoggedIn()) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export class AppComponent {
|
||||
|
||||
onLogout(event) {
|
||||
event.preventDefault();
|
||||
this.auth.logout()
|
||||
this.authService.logout()
|
||||
.subscribe(
|
||||
() => {
|
||||
this.navigateToLogin();
|
||||
@@ -118,25 +118,25 @@ export class AppComponent {
|
||||
|
||||
private setEcmHost() {
|
||||
if (this.storage.hasItem(`ecmHost`)) {
|
||||
this.alfrescoSettingsService.ecmHost = this.storage.getItem(`ecmHost`);
|
||||
this.settingsService.ecmHost = this.storage.getItem(`ecmHost`);
|
||||
this.ecmHost = this.storage.getItem(`ecmHost`);
|
||||
} else {
|
||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
||||
this.settingsService.ecmHost = this.ecmHost;
|
||||
}
|
||||
}
|
||||
|
||||
private setBpmHost() {
|
||||
if (this.storage.hasItem(`bpmHost`)) {
|
||||
this.alfrescoSettingsService.bpmHost = this.storage.getItem(`bpmHost`);
|
||||
this.settingsService.bpmHost = this.storage.getItem(`bpmHost`);
|
||||
this.bpmHost = this.storage.getItem(`bpmHost`);
|
||||
} else {
|
||||
this.alfrescoSettingsService.bpmHost = this.bpmHost;
|
||||
this.settingsService.bpmHost = this.bpmHost;
|
||||
}
|
||||
}
|
||||
|
||||
private setProvider() {
|
||||
if (this.storage.hasItem(`providers`)) {
|
||||
this.alfrescoSettingsService.setProviders(this.storage.getItem(`providers`));
|
||||
this.settingsService.setProviders(this.storage.getItem(`providers`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, OnInit, Optional, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||
import { AuthService } from 'ng2-alfresco-core';
|
||||
import {
|
||||
DocumentActionsService,
|
||||
DocumentList,
|
||||
@@ -49,7 +49,7 @@ export class FilesComponent implements OnInit {
|
||||
documentList: DocumentList;
|
||||
|
||||
constructor(private documentActions: DocumentActionsService,
|
||||
public auth: AlfrescoAuthenticationService,
|
||||
public authService: AuthService,
|
||||
private formService: FormService,
|
||||
private router: Router,
|
||||
@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(
|
||||
defs => this.setupBpmActions(defs || []),
|
||||
err => console.log(err)
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, EventEmitter, Output } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||
import { AuthService } from 'ng2-alfresco-core';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
|
||||
@Component({
|
||||
@@ -34,11 +34,11 @@ export class SearchBarComponent {
|
||||
expand = new EventEmitter();
|
||||
|
||||
constructor(public router: Router,
|
||||
public auth: AlfrescoAuthenticationService) {
|
||||
public authService: AuthService) {
|
||||
}
|
||||
|
||||
isLoggedIn(): boolean {
|
||||
return this.auth.isLoggedIn();
|
||||
return this.authService.isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { AlfrescoSettingsService, StorageService } from 'ng2-alfresco-core';
|
||||
import { SettingsService, StorageService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
selector: 'alfresco-setting-demo',
|
||||
@@ -28,23 +28,23 @@ export class SettingComponent {
|
||||
ecmHost: string;
|
||||
bpmHost: string;
|
||||
|
||||
constructor(public alfrescoSettingsService: AlfrescoSettingsService,
|
||||
constructor(public settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
this.ecmHost = this.alfrescoSettingsService.ecmHost;
|
||||
this.bpmHost = this.alfrescoSettingsService.bpmHost;
|
||||
this.ecmHost = this.settingsService.ecmHost;
|
||||
this.bpmHost = this.settingsService.bpmHost;
|
||||
}
|
||||
|
||||
public onChangeECMHost(event: KeyboardEvent): void {
|
||||
console.log((<HTMLInputElement>event.target).value);
|
||||
this.ecmHost = (<HTMLInputElement>event.target).value;
|
||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
||||
this.settingsService.ecmHost = this.ecmHost;
|
||||
this.storage.setItem(`ecmHost`, this.ecmHost);
|
||||
}
|
||||
|
||||
public onChangeBPMHost(event: KeyboardEvent): void {
|
||||
console.log((<HTMLInputElement>event.target).value);
|
||||
this.bpmHost = (<HTMLInputElement>event.target).value;
|
||||
this.alfrescoSettingsService.bpmHost = this.bpmHost;
|
||||
this.settingsService.bpmHost = this.bpmHost;
|
||||
this.storage.setItem(`bpmHost`, this.bpmHost);
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { NgModule, Component, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { AnalyticsModule } from 'ng2-activiti-analytics';
|
||||
|
||||
@Component({
|
||||
@@ -60,8 +60,8 @@ export class AnalyticsDemoComponent implements OnInit {
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
settingsService.bpmHost = this.host;
|
||||
settingsService.setProviders('BPM');
|
||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
||||
|
||||
@Component({
|
||||
@@ -50,8 +50,8 @@ export class DiagramDemoComponent {
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
settingsService.bpmHost = this.host;
|
||||
settingsService.setProviders('BPM');
|
||||
|
@@ -25,11 +25,11 @@ export class DiagramsService {
|
||||
|
||||
constructor(private authService: AuthService,
|
||||
private http: Http,
|
||||
private alfrescoSettingsService: SettingsService) {
|
||||
private settingsService: SettingsService) {
|
||||
}
|
||||
|
||||
getProcessDefinitionModel(processDefinitionId: string): Observable<any> {
|
||||
let url = `${this.alfrescoSettingsService.getBPMApiBaseUrl()}/app/rest/process-definitions/${processDefinitionId}/model-json`;
|
||||
let url = `${this.settingsService.getBPMApiBaseUrl()}/app/rest/process-definitions/${processDefinitionId}/model-json`;
|
||||
let options = this.getRequestOptions();
|
||||
return this.http
|
||||
.get(url, options)
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { NgModule, Component, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||
|
||||
@Component({
|
||||
@@ -49,8 +49,8 @@ export class FormDemoComponent implements OnInit {
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
settingsService.bpmHost = this.host;
|
||||
settingsService.setProviders('BPM');
|
||||
|
@@ -28,7 +28,7 @@ import {
|
||||
ActivitiStartProcessInstance,
|
||||
ProcessInstance
|
||||
} from 'ng2-activiti-processlist';
|
||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, StorageService } from 'ng2-alfresco-core';
|
||||
import { AuthService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
|
||||
const currentProcessIdNew = '__NEW__';
|
||||
@@ -160,8 +160,8 @@ class MyDemoApp implements OnInit {
|
||||
|
||||
dataProcesses: ObjectDataTableAdapter;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
settingsService.bpmHost = this.host;
|
||||
settingsService.setProviders('BPM');
|
||||
|
@@ -21,8 +21,8 @@ import { By } from '@angular/platform-browser';
|
||||
import {
|
||||
AlfrescoTranslationService,
|
||||
CoreModule,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService } from 'ng2-alfresco-core';
|
||||
|
||||
import { ActivitiProcessInstanceHeader } from './activiti-process-instance-header.component';
|
||||
@@ -48,8 +48,8 @@ describe('ActivitiProcessInstanceHeader', () => {
|
||||
ActivitiProcessComments
|
||||
],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService,
|
||||
ActivitiProcessService,
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||
|
@@ -26,7 +26,7 @@ import {
|
||||
ActivitiTaskList
|
||||
} from 'ng2-activiti-tasklist';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, StorageService } from 'ng2-alfresco-core';
|
||||
import { AuthService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
|
||||
@Component({
|
||||
@@ -144,8 +144,8 @@ class MyDemoApp implements OnInit {
|
||||
|
||||
dataTasks: ObjectDataTableAdapter;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
settingsService.bpmHost = this.host;
|
||||
settingsService.setProviders('BPM');
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { SettingsService } from './settings.service';
|
||||
|
||||
describe('AlfrescoSettingsService', () => {
|
||||
describe('SettingsService', () => {
|
||||
|
||||
let service: SettingsService;
|
||||
|
||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { DocumentListModule, DocumentList, DocumentActionsService } from 'ng2-alfresco-documentlist';
|
||||
import { CoreModule, StorageService, SettingsService, AuthService, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, StorageService, SettingsService, AuthService, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
selector: 'alfresco-app-demo',
|
||||
@@ -129,7 +129,7 @@ class DocumentListDemo implements OnInit {
|
||||
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private translateService: AlfrescoTranslateService,
|
||||
private translateService: AlfrescoTranslationService,
|
||||
private documentActions: DocumentActionsService,
|
||||
private storage: StorageService) {
|
||||
|
||||
|
@@ -20,8 +20,8 @@ import { NodePaging } from './../models/document-library.model';
|
||||
import { PageNode } from './document-library.model.mock';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoApiService
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -33,8 +33,8 @@ export class DocumentListServiceMock extends DocumentListService {
|
||||
getFolderRejectError: string = 'Error';
|
||||
|
||||
constructor(
|
||||
settings?: AlfrescoSettingsService,
|
||||
authService?: AlfrescoAuthenticationService,
|
||||
settings?: SettingsService,
|
||||
authService?: AuthService,
|
||||
contentService?: AlfrescoContentService,
|
||||
apiService?: AlfrescoApiService
|
||||
) {
|
||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { LoginModule } from 'ng2-alfresco-login';
|
||||
|
||||
@Component({
|
||||
@@ -73,8 +73,8 @@ export class AppComponent {
|
||||
|
||||
public disableCsrf: boolean = false;
|
||||
|
||||
constructor(public auth: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(public authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
|
@@ -18,8 +18,8 @@
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -43,10 +43,10 @@ describe('AlfrescoLogin', () => {
|
||||
],
|
||||
declarations: [AlfrescoLoginComponent],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService,
|
||||
{provide: AlfrescoAuthenticationService, useClass: AuthenticationMock},
|
||||
{provide: AuthService, useClass: AuthenticationMock},
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||
]
|
||||
}).compileComponents();
|
||||
|
@@ -19,8 +19,8 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import {
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService
|
||||
AuthService,
|
||||
SettingsService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { FormSubmitEvent } from '../models/form-submit-event.model';
|
||||
|
||||
@@ -79,8 +79,8 @@ export class AlfrescoLoginComponent implements OnInit {
|
||||
* @param translate
|
||||
*/
|
||||
constructor(private _fb: FormBuilder,
|
||||
public authService: AlfrescoAuthenticationService,
|
||||
public settingsService: AlfrescoSettingsService,
|
||||
public authService: AuthService,
|
||||
public settingsService: SettingsService,
|
||||
private translate: AlfrescoTranslationService) {
|
||||
|
||||
translate.addTranslationFolder('ng2-alfresco-login', 'node_modules/ng2-alfresco-login/src');
|
||||
|
@@ -23,8 +23,8 @@ import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { SearchModule } from 'ng2-alfresco-search';
|
||||
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoTranslationService
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
@@ -57,8 +57,8 @@ class SearchDemo implements OnInit {
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
translation: AlfrescoTranslationService) {
|
||||
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component, Input, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { TagModule } from 'ng2-alfresco-tag';
|
||||
|
||||
@Component({
|
||||
@@ -59,8 +59,8 @@ class TagDemo implements OnInit {
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
|
@@ -17,8 +17,8 @@
|
||||
|
||||
import { ReflectiveInjector } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
StorageService
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -32,9 +32,9 @@ describe('Tag service', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
injector = ReflectiveInjector.resolveAndCreate([
|
||||
AlfrescoSettingsService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
AuthService,
|
||||
TagService,
|
||||
StorageService
|
||||
]);
|
||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { UploadModule } from 'ng2-alfresco-upload';
|
||||
|
||||
@Component({
|
||||
@@ -113,8 +113,8 @@ export class MyDemoApp implements OnInit {
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
settingsService.setProviders('ECM');
|
||||
|
@@ -21,7 +21,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { LoginModule } from 'ng2-alfresco-login';
|
||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
|
||||
import { AuthService, SettingsService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
selector: 'alfresco-app-demo',
|
||||
@@ -92,8 +92,8 @@ class UserInfoDemo implements OnInit {
|
||||
|
||||
public disableCsrf: boolean = false;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService) {
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService) {
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
settingsService.bpmHost = this.bpmHost;
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { NgModule, Component } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { ViewerModule } from 'ng2-alfresco-viewer';
|
||||
|
||||
@Component({
|
||||
@@ -54,8 +54,8 @@ class MyDemoApp {
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
settingsService.setProviders('ECM');
|
||||
|
@@ -19,8 +19,8 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { ImgViewerComponent } from './imgViewer.component';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -39,8 +39,8 @@ describe('Test ng2-alfresco-viewer Img viewer component ', () => {
|
||||
],
|
||||
declarations: [ImgViewerComponent],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService
|
||||
]
|
||||
}).compileComponents();
|
||||
|
@@ -19,8 +19,8 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { MediaPlayerComponent } from './mediaPlayer.component';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -39,8 +39,8 @@ describe('Test ng2-alfresco-viewer Media player component ', () => {
|
||||
],
|
||||
declarations: [MediaPlayerComponent],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService
|
||||
]
|
||||
}).compileComponents();
|
||||
|
@@ -19,8 +19,8 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { NotSupportedFormat } from './notSupportedFormat.component';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -39,8 +39,8 @@ describe('Test ng2-alfresco-viewer Not Supported Format View component', () => {
|
||||
],
|
||||
declarations: [NotSupportedFormat],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService
|
||||
]
|
||||
}).compileComponents();
|
||||
|
@@ -21,8 +21,8 @@ import { PdfViewerComponent } from './pdfViewer.component';
|
||||
import { EventMock } from '../assets/event.mock';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -41,8 +41,8 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
||||
],
|
||||
declarations: [PdfViewerComponent],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService,
|
||||
RenderingQueueServices
|
||||
]
|
||||
|
@@ -25,8 +25,8 @@ import { ViewerComponent } from './viewer.component';
|
||||
import { EventMock } from '../assets/event.mock';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AuthService,
|
||||
SettingsService,
|
||||
AlfrescoApiService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
@@ -53,8 +53,8 @@ describe('Test ng2-alfresco-viewer ViewerComponent', () => {
|
||||
ImgViewerComponent
|
||||
],
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
SettingsService,
|
||||
AuthService,
|
||||
AlfrescoApiService,
|
||||
RenderingQueueServices
|
||||
]
|
||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { WebScriptModule } from 'ng2-alfresco-webscript';
|
||||
|
||||
@@ -62,8 +62,8 @@ class WebscriptDemo implements OnInit {
|
||||
scriptArgs: string = '';
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
private storage: StorageService) {
|
||||
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
|
Reference in New Issue
Block a user