mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
refactor core
This commit is contained in:
parent
b8e7e79b26
commit
b04308deaa
@ -38,7 +38,10 @@ export class LibraryFavoriteDirective implements OnChanges {
|
||||
@Output() error = new EventEmitter<any>();
|
||||
|
||||
private targetLibrary = null;
|
||||
private favoritesApi: FavoritesApi;
|
||||
|
||||
get favoritesApi(): FavoritesApi {
|
||||
return new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
@HostListener('click')
|
||||
onClick() {
|
||||
@ -58,7 +61,6 @@ export class LibraryFavoriteDirective implements OnChanges {
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
this.favoritesApi = new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
ngOnChanges(changes) {
|
||||
|
@ -48,7 +48,9 @@ export class LibraryMembershipDirective implements OnChanges {
|
||||
|
||||
isJoinRequested: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
|
||||
private sitesApi: SitesApi;
|
||||
get sitesApi(): SitesApi {
|
||||
return new SitesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
/** Site for which to toggle the membership request. */
|
||||
@Input('adf-library-membership')
|
||||
@ -75,7 +77,6 @@ export class LibraryMembershipDirective implements OnChanges {
|
||||
private sitesService: SitesService,
|
||||
private versionCompatibilityService: VersionCompatibilityService
|
||||
) {
|
||||
this.sitesApi = new SitesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
|
@ -62,8 +62,13 @@ export class NodeDeleteDirective implements OnChanges {
|
||||
@Output()
|
||||
delete: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
private trashcanApi: TrashcanApi;
|
||||
private nodesApi: NodesApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
@HostListener('click')
|
||||
onClick() {
|
||||
@ -73,8 +78,6 @@ export class NodeDeleteDirective implements OnChanges {
|
||||
constructor(private alfrescoApiService: AlfrescoApiService,
|
||||
private translation: TranslationService,
|
||||
private elementRef: ElementRef) {
|
||||
this.trashcanApi = new TrashcanApi(this.alfrescoApiService.getInstance());
|
||||
this.nodesApi = new NodesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
|
@ -31,7 +31,9 @@ import { DownloadService } from '../services/download.service';
|
||||
})
|
||||
export class NodeDownloadDirective {
|
||||
|
||||
private contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/** Nodes to download. */
|
||||
@Input('adfNodeDownload')
|
||||
@ -50,7 +52,6 @@ export class NodeDownloadDirective {
|
||||
private apiService: AlfrescoApiService,
|
||||
private downloadService: DownloadService,
|
||||
private dialog: MatDialog) {
|
||||
this.contentApi = new ContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,9 @@ import { catchError, map } from 'rxjs/operators';
|
||||
export class NodeFavoriteDirective implements OnChanges {
|
||||
favorites: any[] = [];
|
||||
|
||||
private favoritesApi: FavoritesApi;
|
||||
get favoritesApi(): FavoritesApi {
|
||||
return new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
/** Array of nodes to toggle as favorites. */
|
||||
@Input('adf-node-favorite')
|
||||
@ -48,7 +50,6 @@ export class NodeFavoriteDirective implements OnChanges {
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
this.favoritesApi = new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
ngOnChanges(changes) {
|
||||
|
@ -35,7 +35,10 @@ export class RestoreMessageModel {
|
||||
})
|
||||
export class NodeRestoreDirective {
|
||||
private readonly restoreProcessStatus;
|
||||
private trashcanApi: TrashcanApi;
|
||||
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
/** Array of deleted nodes to restore. */
|
||||
@Input('adf-restore')
|
||||
@ -53,7 +56,6 @@ export class NodeRestoreDirective {
|
||||
constructor(private alfrescoApiService: AlfrescoApiService,
|
||||
private translation: TranslationService) {
|
||||
this.restoreProcessStatus = this.processStatus();
|
||||
this.trashcanApi = new TrashcanApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
private recover(selection: any) {
|
||||
|
@ -32,11 +32,12 @@ export class EcmModelService {
|
||||
public static MODEL_NAME: string = 'activitiFormsModel';
|
||||
public static TYPE_MODEL: string = 'cm:folder';
|
||||
|
||||
private customModelApi: CustomModelApi;
|
||||
get customModelApi(): CustomModelApi {
|
||||
return new CustomModelApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.customModelApi = new CustomModelApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
public createEcmTypeForActivitiForm(formName: string, form: FormModel): Observable<any> {
|
||||
|
@ -52,15 +52,41 @@ export class FormService {
|
||||
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
|
||||
static GENERIC_ERROR_MESSAGE: string = 'Server error';
|
||||
|
||||
taskApi: TasksApi;
|
||||
taskFormsApi: TaskFormsApi;
|
||||
modelsApi: ModelsApi;
|
||||
editorApi: FormModelsApi;
|
||||
processDefinitionsApi: ProcessDefinitionsApi;
|
||||
processInstancesApi: ProcessInstancesApi;
|
||||
processInstanceVariablesApi: ProcessInstanceVariablesApi;
|
||||
groupsApi: ActivitiGroupsApi;
|
||||
usersApi: UsersApi;
|
||||
get taskApi(): TasksApi {
|
||||
return new TasksApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get taskFormsApi(): TaskFormsApi {
|
||||
return new TaskFormsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get modelsApi(): ModelsApi {
|
||||
return new ModelsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get editorApi(): FormModelsApi {
|
||||
return new FormModelsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get processDefinitionsApi(): ProcessDefinitionsApi {
|
||||
return new ProcessDefinitionsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get processInstanceVariablesApi(): ProcessInstanceVariablesApi {
|
||||
return new ProcessInstanceVariablesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get processInstancesApi(): ProcessInstancesApi {
|
||||
return new ProcessInstancesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get groupsApi(): ActivitiGroupsApi {
|
||||
return new ActivitiGroupsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get usersApi(): UsersApi {
|
||||
return new UsersApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
formLoaded = new Subject<FormEvent>();
|
||||
formDataRefreshed = new Subject<FormEvent>();
|
||||
@ -83,16 +109,6 @@ export class FormService {
|
||||
constructor(private ecmModelService: EcmModelService,
|
||||
private apiService: AlfrescoApiService,
|
||||
protected logService: LogService) {
|
||||
|
||||
this.taskApi = new TasksApi(this.apiService.getInstance());
|
||||
this.modelsApi = new ModelsApi(this.apiService.getInstance());
|
||||
this.editorApi = new FormModelsApi(this.apiService.getInstance());
|
||||
this.processDefinitionsApi = new ProcessDefinitionsApi(this.apiService.getInstance());
|
||||
this.processInstanceVariablesApi = new ProcessInstanceVariablesApi(this.apiService.getInstance());
|
||||
this.processInstancesApi = new ProcessInstancesApi(this.apiService.getInstance());
|
||||
this.usersApi = new UsersApi(this.apiService.getInstance());
|
||||
this.groupsApi = new ActivitiGroupsApi(this.apiService.getInstance());
|
||||
this.taskFormsApi = new TaskFormsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,11 +30,12 @@ export class ProcessContentService {
|
||||
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
|
||||
static GENERIC_ERROR_MESSAGE: string = 'Server error';
|
||||
|
||||
private contentApi: ActivitiContentApi;
|
||||
get contentApi(): ActivitiContentApi {
|
||||
return new ActivitiContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.contentApi = new ActivitiContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,11 +27,12 @@ import { map, catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class AppsProcessService {
|
||||
|
||||
appsApi: RuntimeAppDefinitionsApi;
|
||||
get appsApi(): RuntimeAppDefinitionsApi {
|
||||
return new RuntimeAppDefinitionsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.appsApi = new RuntimeAppDefinitionsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,9 @@ export class AuthenticationService {
|
||||
*/
|
||||
onLogout: ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||
|
||||
private profileApi: UserProfileApi;
|
||||
get profileApi(): UserProfileApi {
|
||||
return new UserProfileApi(this.alfrescoApi.getInstance());
|
||||
}
|
||||
|
||||
constructor(
|
||||
private appConfig: AppConfigService,
|
||||
@ -58,7 +60,6 @@ export class AuthenticationService {
|
||||
private logService: LogService) {
|
||||
this.alfrescoApi.alfrescoApiInitialized.subscribe(() => {
|
||||
this.alfrescoApi.getInstance().reply('logged-in', () => {
|
||||
this.profileApi = new UserProfileApi(alfrescoApi.getInstance());
|
||||
this.onLogin.next();
|
||||
});
|
||||
});
|
||||
|
@ -33,11 +33,12 @@ import { UserProfileApi, UserRepresentation } from '@alfresco/js-api';
|
||||
})
|
||||
export class BpmUserService {
|
||||
|
||||
private profileApi: UserProfileApi;
|
||||
get profileApi(): UserProfileApi {
|
||||
return new UserProfileApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.profileApi = new UserProfileApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,11 +28,12 @@ import { CommentEntry, CommentsApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class CommentContentService {
|
||||
|
||||
private commentsApi: CommentsApi;
|
||||
get commentsApi(): CommentsApi {
|
||||
return new CommentsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.commentsApi = new CommentsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -42,7 +43,7 @@ export class CommentContentService {
|
||||
* @returns Details of the comment added
|
||||
*/
|
||||
addNodeComment(nodeId: string, message: string): Observable<CommentModel> {
|
||||
return from(this.commentsApi.createComment(nodeId, {content: message}))
|
||||
return from(this.commentsApi.createComment(nodeId, { content: message }))
|
||||
.pipe(
|
||||
map((response: CommentEntry) => {
|
||||
return new CommentModel({
|
||||
|
@ -29,11 +29,12 @@ import { ActivitiCommentsApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class CommentProcessService {
|
||||
|
||||
private commentsApi: ActivitiCommentsApi;
|
||||
get commentsApi(): ActivitiCommentsApi {
|
||||
return new ActivitiCommentsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.commentsApi = new ActivitiCommentsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,8 +38,13 @@ export class ContentService {
|
||||
folderCreate: Subject<MinimalNode> = new Subject<MinimalNode>();
|
||||
folderEdit: Subject<MinimalNode> = new Subject<MinimalNode>();
|
||||
|
||||
private contentApi: ContentApi;
|
||||
private nodesApi: NodesApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(public authService: AuthenticationService,
|
||||
public apiService: AlfrescoApiService,
|
||||
@ -47,8 +52,6 @@ export class ContentService {
|
||||
private sanitizer: DomSanitizer,
|
||||
private downloadService: DownloadService,
|
||||
private thumbnailService: ThumbnailService) {
|
||||
this.contentApi = new ContentApi(apiService.getInstance());
|
||||
this.nodesApi = new NodesApi(apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,15 +28,18 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class DeletedNodesApiService {
|
||||
|
||||
nodesApi: NodesApi;
|
||||
trashcanApi: TrashcanApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(
|
||||
private apiService: AlfrescoApiService,
|
||||
private preferences: UserPreferencesService
|
||||
) {
|
||||
this.nodesApi = new NodesApi(this.apiService.getInstance());
|
||||
this.trashcanApi = new TrashcanApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,11 +27,12 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class DownloadZipService {
|
||||
|
||||
downloadsApi: DownloadsApi;
|
||||
get downloadsApi(): DownloadsApi {
|
||||
return new DownloadsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.downloadsApi = new DownloadsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,9 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class FavoritesApiService {
|
||||
|
||||
private favoritesApi: FavoritesApi;
|
||||
get favoritesApi(): FavoritesApi {
|
||||
return new FavoritesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
static remapEntry({ entry }: any): any {
|
||||
entry.properties = {
|
||||
@ -42,7 +44,6 @@ export class FavoritesApiService {
|
||||
private apiService: AlfrescoApiService,
|
||||
private preferences: UserPreferencesService
|
||||
) {
|
||||
this.favoritesApi = new FavoritesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
remapFavoritesData(data: FavoritePaging = {}): NodePaging {
|
||||
|
@ -28,13 +28,16 @@ import { NodeMetadata } from '../models/node-metadata.model';
|
||||
})
|
||||
export class NodesApiService {
|
||||
|
||||
private nodesApi: NodesApi;
|
||||
private trashcanApi: TrashcanApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private preferences: UserPreferencesService) {
|
||||
this.nodesApi = new NodesApi(this.apiService.getInstance());
|
||||
this.trashcanApi = new TrashcanApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
private getEntryFromEntity(entity: NodeEntry) {
|
||||
|
@ -50,10 +50,11 @@ export class PeopleContentService {
|
||||
private hasContentAdminRole: boolean = false;
|
||||
hasCheckedIsContentAdmin: boolean = false;
|
||||
|
||||
private peopleApi: PeopleApi;
|
||||
get peopleApi(): PeopleApi {
|
||||
return new PeopleApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
this.peopleApi = new PeopleApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -124,7 +125,7 @@ export class PeopleContentService {
|
||||
}
|
||||
|
||||
private buildOrderArray(sorting: PeopleContentSortingModel): string[] {
|
||||
return sorting?.orderBy && sorting?.direction ? [ `${sorting.orderBy} ${sorting.direction.toUpperCase()}` ] : [];
|
||||
return sorting?.orderBy && sorting?.direction ? [`${sorting.orderBy} ${sorting.direction.toUpperCase()}`] : [];
|
||||
}
|
||||
|
||||
private handleError(error: any) {
|
||||
|
@ -21,20 +21,27 @@ import { UserProcessModel } from '../models/user-process.model';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { LogService } from './log.service';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { TaskActionsApi, UsersApi, ResultListDataRepresentationLightUserRepresentation } from '@alfresco/js-api';
|
||||
import {
|
||||
TaskActionsApi,
|
||||
UsersApi,
|
||||
ResultListDataRepresentationLightUserRepresentation
|
||||
} from '@alfresco/js-api';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PeopleProcessService {
|
||||
|
||||
private taskActionsApi: TaskActionsApi;
|
||||
private userApi: UsersApi;
|
||||
get taskActionsApi(): TaskActionsApi {
|
||||
return new TaskActionsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get userApi(): UsersApi {
|
||||
return new UsersApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.taskActionsApi = new TaskActionsApi(this.apiService.getInstance());
|
||||
this.userApi = new UsersApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,12 +26,15 @@ import { concatMap, switchMap, takeWhile, map } from 'rxjs/operators';
|
||||
})
|
||||
export class RenditionsService {
|
||||
|
||||
private renditionsApi: RenditionsApi;
|
||||
private contentApi: ContentApi;
|
||||
get renditionsApi(): RenditionsApi {
|
||||
return new RenditionsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService) {
|
||||
this.renditionsApi = new RenditionsApi(this.apiService.getInstance());
|
||||
this.contentApi = new ContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,13 +27,17 @@ import { SearchConfigurationService } from './search-configuration.service';
|
||||
export class SearchService {
|
||||
|
||||
dataLoaded: Subject<ResultSetPaging> = new Subject();
|
||||
queriesApi: QueriesApi;
|
||||
searchApi: SearchApi;
|
||||
|
||||
get queriesApi(): QueriesApi {
|
||||
return new QueriesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get searchApi(): SearchApi {
|
||||
return new SearchApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private searchConfigurationService: SearchConfigurationService) {
|
||||
this.queriesApi = new QueriesApi(this.apiService.getInstance());
|
||||
this.searchApi = new SearchApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,11 +28,13 @@ import { catchError } from 'rxjs/operators';
|
||||
export class SharedLinksApiService {
|
||||
|
||||
error = new Subject<{ statusCode: number, message: string }>();
|
||||
private sharedLinksApi: SharedlinksApi;
|
||||
|
||||
get sharedLinksApi(): SharedlinksApi {
|
||||
return new SharedlinksApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private preferences: UserPreferencesService) {
|
||||
this.sharedLinksApi = new SharedlinksApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,10 +40,11 @@ import { LogService } from './log.service';
|
||||
})
|
||||
export class SitesService {
|
||||
|
||||
private sitesApi: SitesApi;
|
||||
get sitesApi(): SitesApi {
|
||||
return new SitesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
this.sitesApi = new SitesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,10 +164,11 @@ export class ThumbnailService {
|
||||
'task': './assets/images/task.svg'
|
||||
};
|
||||
|
||||
private contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(protected apiService: AlfrescoApiService, matIconRegistry: MatIconRegistry, sanitizer: DomSanitizer) {
|
||||
this.contentApi = new ContentApi(apiService.getInstance());
|
||||
Object.keys(this.mimeTypeIcons).forEach((key) => {
|
||||
const url = sanitizer.bypassSecurityTrustResourceUrl(this.mimeTypeIcons[key]);
|
||||
|
||||
|
@ -63,9 +63,17 @@ export class UploadService {
|
||||
fileUploadDeleted: Subject<FileUploadDeleteEvent> = new Subject<FileUploadDeleteEvent>();
|
||||
fileDeleted: Subject<string> = new Subject<string>();
|
||||
|
||||
private uploadApi: UploadApi;
|
||||
private nodesApi: NodesApi;
|
||||
private versionsApi: VersionsApi;
|
||||
get uploadApi(): UploadApi {
|
||||
return new UploadApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
get versionsApi(): VersionsApi {
|
||||
return new VersionsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
constructor(
|
||||
protected apiService: AlfrescoApiService,
|
||||
@ -76,10 +84,6 @@ export class UploadService {
|
||||
.subscribe(({ status }) => {
|
||||
this.isThumbnailGenerationEnabled = status.isThumbnailGenerationEnabled;
|
||||
});
|
||||
|
||||
this.uploadApi = new UploadApi(apiService.getInstance());
|
||||
this.nodesApi = new NodesApi(apiService.getInstance());
|
||||
this.versionsApi = new VersionsApi(apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user