mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
fix
This commit is contained in:
@@ -29,8 +29,10 @@ import { AspectEntry, AspectPaging, AspectsApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class AspectListService {
|
||||
|
||||
_aspectsApi: AspectsApi;
|
||||
get aspectsApi(): AspectsApi {
|
||||
return new AspectsApi(this.alfrescoApiService.getInstance());
|
||||
this._aspectsApi = this._aspectsApi ?? new AspectsApi(this.alfrescoApiService.getInstance());
|
||||
return this._aspectsApi;
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService,
|
||||
|
@@ -34,8 +34,10 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class AuditService {
|
||||
|
||||
_auditApi: AuditApi;
|
||||
get auditApi(): AuditApi {
|
||||
return new AuditApi(this.apiService.getInstance());
|
||||
this._auditApi = this._auditApi ?? new AuditApi(this.apiService.getInstance());
|
||||
return this._auditApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
@@ -66,7 +68,7 @@ export class AuditService {
|
||||
updateAuditApp(auditApplicationId: string, auditAppBodyUpdate: boolean, opts?: any): Observable<AuditApp | {}> {
|
||||
const defaultOptions = {};
|
||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
||||
return from(this.auditApi.updateAuditApp(auditApplicationId, new AuditBodyUpdate({ isEnabled: auditAppBodyUpdate}), queryOptions))
|
||||
return from(this.auditApi.updateAuditApp(auditApplicationId, new AuditBodyUpdate({ isEnabled: auditAppBodyUpdate }), queryOptions))
|
||||
.pipe(
|
||||
catchError((err: any) => this.handleError(err))
|
||||
);
|
||||
|
@@ -23,7 +23,7 @@ import { PropertyGroup } from '../interfaces/content-metadata.interfaces';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('PropertyDescriptorLoaderService', () => {
|
||||
fdescribe('PropertyDescriptorLoaderService', () => {
|
||||
|
||||
let service: PropertyDescriptorsService;
|
||||
let classesApi: ClassesApi;
|
||||
|
@@ -27,8 +27,10 @@ import { ClassesApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class PropertyDescriptorsService {
|
||||
|
||||
private _classesApi;
|
||||
get classesApi(): ClassesApi {
|
||||
return new ClassesApi(this.alfrescoApiService.getInstance());
|
||||
this._classesApi = this._classesApi ?? new ClassesApi(this.alfrescoApiService.getInstance());
|
||||
return this._classesApi;
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
|
@@ -44,8 +44,10 @@ export class NodeSharedDirective implements OnChanges, OnDestroy {
|
||||
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.alfrescoApiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.alfrescoApiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -25,8 +25,10 @@ import { map } from 'rxjs/operators';
|
||||
})
|
||||
export class ContentTypeService {
|
||||
|
||||
_typesApi: TypesApi;
|
||||
get typesApi(): TypesApi {
|
||||
return new TypesApi(this.alfrescoApiService.getInstance());
|
||||
this._typesApi = this._typesApi ?? new TypesApi(this.alfrescoApiService.getInstance());
|
||||
return this._typesApi;
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
|
@@ -72,8 +72,10 @@ export class LibraryDialogComponent implements OnInit, OnDestroy {
|
||||
];
|
||||
disableCreateButton = false;
|
||||
|
||||
_queriesApi: QueriesApi;
|
||||
get queriesApi(): QueriesApi {
|
||||
return new QueriesApi(this.alfrescoApiService.getInstance());
|
||||
this._queriesApi = this._queriesApi ?? new QueriesApi(this.alfrescoApiService.getInstance());
|
||||
return this._queriesApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -35,8 +35,10 @@ export class NodeLockDialogComponent implements OnInit {
|
||||
node: Node = null;
|
||||
nodeName: string;
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.alfrescoApi.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -343,8 +343,10 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
private loadingTimeout;
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.alfrescoApiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.alfrescoApiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(private documentListService: DocumentListService,
|
||||
|
@@ -30,7 +30,7 @@ import {
|
||||
FavoritesApi,
|
||||
SharedlinksApi,
|
||||
TrashcanApi,
|
||||
NodesApi
|
||||
NodesApi, TypesApi
|
||||
} from '@alfresco/js-api';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, from, of, throwError } from 'rxjs';
|
||||
@@ -41,32 +41,46 @@ export class CustomResourcesService {
|
||||
|
||||
private CREATE_PERMISSION = 'create';
|
||||
|
||||
_peopleApi: PeopleApi;
|
||||
get peopleApi(): PeopleApi {
|
||||
return new PeopleApi(this.apiService.getInstance());
|
||||
this._peopleApi = this._peopleApi ?? new PeopleApi(this.apiService.getInstance());
|
||||
return this._peopleApi;
|
||||
}
|
||||
|
||||
_sitesApi: SitesApi;
|
||||
get sitesApi(): SitesApi {
|
||||
return new SitesApi(this.apiService.getInstance());
|
||||
this._sitesApi = this._sitesApi ?? new SitesApi(this.apiService.getInstance());
|
||||
return this._sitesApi;
|
||||
}
|
||||
|
||||
_trashcanApi: TrashcanApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.apiService.getInstance());
|
||||
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.apiService.getInstance());
|
||||
return this._trashcanApi;
|
||||
}
|
||||
|
||||
_searchApi: SearchApi;
|
||||
get searchApi(): SearchApi {
|
||||
return new SearchApi(this.apiService.getInstance());
|
||||
this._searchApi = this._searchApi ?? new SearchApi(this.apiService.getInstance());
|
||||
return this._searchApi;
|
||||
}
|
||||
|
||||
_sharedLinksApi: SharedlinksApi;
|
||||
get sharedLinksApi(): SharedlinksApi {
|
||||
return new SharedlinksApi(this.apiService.getInstance());
|
||||
this._sharedLinksApi = this._sharedLinksApi ?? new SharedlinksApi(this.apiService.getInstance());
|
||||
return this._sharedLinksApi;
|
||||
}
|
||||
|
||||
_favoritesApi: FavoritesApi;
|
||||
get favoritesApi(): FavoritesApi {
|
||||
return new FavoritesApi(this.apiService.getInstance());
|
||||
this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.apiService.getInstance());
|
||||
return this._favoritesApi;
|
||||
}
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
|
@@ -34,8 +34,10 @@ export class DocumentListService implements DocumentListLoader {
|
||||
|
||||
static ROOT_ID = '-root-';
|
||||
|
||||
get nodes(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(private contentService: ContentService,
|
||||
|
@@ -24,8 +24,10 @@ import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
})
|
||||
export class GroupService {
|
||||
|
||||
_groupsApi: GroupsApi;
|
||||
get groupsApi(): GroupsApi {
|
||||
return new GroupsApi(this.alfrescoApiService.getInstance());
|
||||
this._groupsApi = this._groupsApi ?? new GroupsApi(this.alfrescoApiService.getInstance());
|
||||
return this._groupsApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -42,8 +42,10 @@ import { RoleModel } from '../models/role.model';
|
||||
})
|
||||
export class NodePermissionService {
|
||||
|
||||
_groupsApi: GroupsApi;
|
||||
get groupsApi(): GroupsApi {
|
||||
return new GroupsApi(this.apiService.getInstance());
|
||||
this._groupsApi = this._groupsApi ?? new GroupsApi(this.alfrescoApiService.getInstance());
|
||||
return this._groupsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -43,8 +43,10 @@ import { SearchForm } from '../models/search-form.interface';
|
||||
})
|
||||
export abstract class BaseQueryBuilderService {
|
||||
|
||||
_searchApi: SearchApi;
|
||||
get searchApi(): SearchApi {
|
||||
return new SearchApi(this.alfrescoApiService.getInstance());
|
||||
this._searchApi = this._searchApi ?? new SearchApi(this.alfrescoApiService.getInstance());
|
||||
return this._searchApi;
|
||||
}
|
||||
|
||||
/* Stream that emits the search configuration whenever the user change the search forms */
|
||||
|
@@ -26,8 +26,10 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class RatingService {
|
||||
|
||||
_ratingsApi: RatingsApi;
|
||||
get ratingsApi(): RatingsApi {
|
||||
return new RatingsApi(this.apiService.getInstance());
|
||||
this._ratingsApi = this._ratingsApi ?? new RatingsApi(this.apiService.getInstance());
|
||||
return this._ratingsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
|
@@ -27,8 +27,10 @@ import { TagBody, TagPaging, TagEntry, TagsApi } from '@alfresco/js-api';
|
||||
// tslint:disable-next-line: directive-class-suffix
|
||||
export class TagService {
|
||||
|
||||
_tagsApi: TagsApi;
|
||||
get tagsApi(): TagsApi {
|
||||
return new TagsApi(this.apiService.getInstance());
|
||||
this._tagsApi = this._tagsApi ?? new TagsApi(this.apiService.getInstance());
|
||||
return this._tagsApi;
|
||||
}
|
||||
|
||||
/** Emitted when tag information is updated. */
|
||||
|
@@ -32,16 +32,22 @@ import { ConfirmDialogComponent } from '../dialogs/confirm.dialog';
|
||||
})
|
||||
export class VersionListComponent implements OnChanges {
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.alfrescoApi.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
_versionsApi: VersionsApi;
|
||||
get versionsApi(): VersionsApi {
|
||||
return new VersionsApi(this.alfrescoApi.getInstance());
|
||||
this._versionsApi = this._versionsApi ?? new VersionsApi(this.apiService.getInstance());
|
||||
return this._versionsApi;
|
||||
}
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.alfrescoApi.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
versions: VersionEntry[] = [];
|
||||
|
@@ -45,8 +45,10 @@ import { WebscriptApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class WebscriptComponent implements OnChanges {
|
||||
|
||||
_webscriptApi: WebscriptApi;
|
||||
get webscriptApi(): WebscriptApi {
|
||||
return new WebscriptApi(this.apiService.getInstance());
|
||||
this._webscriptApi = this._webscriptApi ?? new WebscriptApi(this.apiService.getInstance());
|
||||
return this._webscriptApi;
|
||||
}
|
||||
|
||||
/** (required) Path to the webscript (as defined by webscript). */
|
||||
|
@@ -39,8 +39,10 @@ export class LibraryFavoriteDirective implements OnChanges {
|
||||
|
||||
private targetLibrary = null;
|
||||
|
||||
_favoritesApi: FavoritesApi;
|
||||
get favoritesApi(): FavoritesApi {
|
||||
return new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
return this._favoritesApi;
|
||||
}
|
||||
|
||||
@HostListener('click')
|
||||
|
@@ -48,8 +48,10 @@ export class LibraryMembershipDirective implements OnChanges {
|
||||
|
||||
isJoinRequested: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
|
||||
_sitesApi: SitesApi;
|
||||
get sitesApi(): SitesApi {
|
||||
return new SitesApi(this.alfrescoApiService.getInstance());
|
||||
this._sitesApi = this._sitesApi ?? new SitesApi(this.alfrescoApiService.getInstance());
|
||||
return this._sitesApi;
|
||||
}
|
||||
|
||||
/** Site for which to toggle the membership request. */
|
||||
|
@@ -62,12 +62,16 @@ export class NodeDeleteDirective implements OnChanges {
|
||||
@Output()
|
||||
delete: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
_trashcanApi: TrashcanApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.alfrescoApiService.getInstance());
|
||||
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.apiService.getInstance());
|
||||
return this._trashcanApi;
|
||||
}
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.alfrescoApiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
@HostListener('click')
|
||||
|
@@ -31,8 +31,10 @@ import { DownloadService } from '../services/download.service';
|
||||
})
|
||||
export class NodeDownloadDirective {
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
/** Nodes to download. */
|
||||
|
@@ -30,8 +30,10 @@ import { catchError, map } from 'rxjs/operators';
|
||||
export class NodeFavoriteDirective implements OnChanges {
|
||||
favorites: any[] = [];
|
||||
|
||||
_favoritesApi: FavoritesApi;
|
||||
get favoritesApi(): FavoritesApi {
|
||||
return new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.alfrescoApiService.getInstance());
|
||||
return this._favoritesApi;
|
||||
}
|
||||
|
||||
/** Array of nodes to toggle as favorites. */
|
||||
|
@@ -36,8 +36,10 @@ export class RestoreMessageModel {
|
||||
export class NodeRestoreDirective {
|
||||
private readonly restoreProcessStatus;
|
||||
|
||||
_trashcanApi: TrashcanApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.alfrescoApiService.getInstance());
|
||||
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.apiService.getInstance());
|
||||
return this._trashcanApi;
|
||||
}
|
||||
|
||||
/** Array of deleted nodes to restore. */
|
||||
|
@@ -23,7 +23,7 @@ import {
|
||||
IntegrationAlfrescoOnPremiseApi,
|
||||
MinimalNode,
|
||||
RelatedContentRepresentation,
|
||||
ActivitiContentApi
|
||||
ActivitiContentApi, UserProfileApi
|
||||
} from '@alfresco/js-api';
|
||||
import { Observable, from, throwError } from 'rxjs';
|
||||
import { ExternalContent } from '../components/widgets/core/external-content';
|
||||
@@ -35,11 +35,16 @@ import { map, catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class ActivitiContentService {
|
||||
|
||||
_integrationAlfrescoOnPremiseApi: IntegrationAlfrescoOnPremiseApi;
|
||||
get integrationAlfrescoOnPremiseApi(): IntegrationAlfrescoOnPremiseApi {
|
||||
return new IntegrationAlfrescoOnPremiseApi(this.apiService.getInstance());
|
||||
this._integrationAlfrescoOnPremiseApi= this._integrationAlfrescoOnPremiseApi ?? new IntegrationAlfrescoOnPremiseApi(this.apiService.getInstance());
|
||||
return this._integrationAlfrescoOnPremiseApi;
|
||||
}
|
||||
|
||||
_contentApi: ActivitiContentApi;
|
||||
get contentApi(): ActivitiContentApi {
|
||||
return new ActivitiContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ActivitiContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
|
||||
|
@@ -32,8 +32,10 @@ export class EcmModelService {
|
||||
public static MODEL_NAME: string = 'activitiFormsModel';
|
||||
public static TYPE_MODEL: string = 'cm:folder';
|
||||
|
||||
_customModelApi: CustomModelApi;
|
||||
get customModelApi(): CustomModelApi {
|
||||
return new CustomModelApi(this.apiService.getInstance());
|
||||
this._customModelApi = this._customModelApi ?? new CustomModelApi(this.apiService.getInstance());
|
||||
return this._customModelApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -52,40 +52,58 @@ export class FormService {
|
||||
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
|
||||
static GENERIC_ERROR_MESSAGE: string = 'Server error';
|
||||
|
||||
get taskApi(): TasksApi {
|
||||
return new TasksApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
_taskFormsApi: TaskFormsApi;
|
||||
get taskFormsApi(): TaskFormsApi {
|
||||
return new TaskFormsApi(this.apiService.getInstance());
|
||||
this._taskFormsApi = this._taskFormsApi ?? new TaskFormsApi(this.apiService.getInstance());
|
||||
return this._taskFormsApi;
|
||||
}
|
||||
|
||||
_taskApi: TasksApi;
|
||||
get taskApi(): TasksApi {
|
||||
this._taskApi = this._taskApi ?? new TasksApi(this.apiService.getInstance());
|
||||
return this._taskApi;
|
||||
}
|
||||
|
||||
_modelsApi: ModelsApi;
|
||||
get modelsApi(): ModelsApi {
|
||||
return new ModelsApi(this.apiService.getInstance());
|
||||
this._modelsApi = this._modelsApi ?? new ModelsApi(this.apiService.getInstance());
|
||||
return this._modelsApi;
|
||||
}
|
||||
|
||||
_editorApi: FormModelsApi;
|
||||
get editorApi(): FormModelsApi {
|
||||
return new FormModelsApi(this.apiService.getInstance());
|
||||
this._editorApi = this._editorApi ?? new FormModelsApi(this.apiService.getInstance());
|
||||
return this._editorApi;
|
||||
}
|
||||
|
||||
_processDefinitionsApi: ProcessDefinitionsApi;
|
||||
get processDefinitionsApi(): ProcessDefinitionsApi {
|
||||
return new ProcessDefinitionsApi(this.apiService.getInstance());
|
||||
this._processDefinitionsApi = this._processDefinitionsApi ?? new ProcessDefinitionsApi(this.apiService.getInstance());
|
||||
return this._processDefinitionsApi;
|
||||
}
|
||||
|
||||
_processInstanceVariablesApi: ProcessInstanceVariablesApi;
|
||||
get processInstanceVariablesApi(): ProcessInstanceVariablesApi {
|
||||
return new ProcessInstanceVariablesApi(this.apiService.getInstance());
|
||||
this._processInstanceVariablesApi = this._processInstanceVariablesApi ?? new ProcessInstanceVariablesApi(this.apiService.getInstance());
|
||||
return this._processInstanceVariablesApi;
|
||||
}
|
||||
|
||||
_processInstancesApi: ProcessInstancesApi;
|
||||
get processInstancesApi(): ProcessInstancesApi {
|
||||
return new ProcessInstancesApi(this.apiService.getInstance());
|
||||
this._processInstancesApi= this._processInstancesApi ?? new ProcessInstancesApi(this.apiService.getInstance());
|
||||
return this._processInstancesApi;
|
||||
}
|
||||
|
||||
_groupsApi: ActivitiGroupsApi;
|
||||
get groupsApi(): ActivitiGroupsApi {
|
||||
return new ActivitiGroupsApi(this.apiService.getInstance());
|
||||
this._groupsApi = this._groupsApi ?? new ActivitiGroupsApi(this.apiService.getInstance());
|
||||
return this._groupsApi;
|
||||
}
|
||||
|
||||
_usersApi: UsersApi;
|
||||
get usersApi(): UsersApi {
|
||||
return new UsersApi(this.apiService.getInstance());
|
||||
this._usersApi = this._usersApi ?? new UsersApi(this.apiService.getInstance());
|
||||
return this._usersApi;
|
||||
}
|
||||
|
||||
formLoaded = new Subject<FormEvent>();
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivitiContentApi, RelatedContentRepresentation } from '@alfresco/js-api';
|
||||
import { ActivitiContentApi, ContentApi, RelatedContentRepresentation } from '@alfresco/js-api';
|
||||
import { Observable, from, throwError } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
@@ -30,8 +30,10 @@ export class ProcessContentService {
|
||||
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
|
||||
static GENERIC_ERROR_MESSAGE: string = 'Server error';
|
||||
|
||||
get contentApi(): ActivitiContentApi {
|
||||
return new ActivitiContentApi(this.apiService.getInstance());
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -30,15 +30,17 @@ import {
|
||||
import { TaskProcessVariableModel } from '../models/task-process-variable.model';
|
||||
import { WidgetVisibilityModel, WidgetTypeEnum } from '../models/widget-visibility.model';
|
||||
import { map, catchError } from 'rxjs/operators';
|
||||
import { TaskFormsApi } from '@alfresco/js-api';
|
||||
import { RuntimeAppDefinitionsApi, TaskFormsApi } from '@alfresco/js-api';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class WidgetVisibilityService {
|
||||
|
||||
_taskFormsApi: TaskFormsApi;
|
||||
get taskFormsApi(): TaskFormsApi {
|
||||
return new TaskFormsApi(this.apiService.getInstance());
|
||||
this._taskFormsApi = this._taskFormsApi ?? new TaskFormsApi(this.apiService.getInstance());
|
||||
return this._taskFormsApi;
|
||||
}
|
||||
|
||||
private processVarList: TaskProcessVariableModel[];
|
||||
|
@@ -27,8 +27,10 @@ import { map, catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class AppsProcessService {
|
||||
|
||||
_appsApi: RuntimeAppDefinitionsApi;
|
||||
get appsApi(): RuntimeAppDefinitionsApi {
|
||||
return new RuntimeAppDefinitionsApi(this.apiService.getInstance());
|
||||
this._appsApi = this._appsApi ?? new RuntimeAppDefinitionsApi(this.apiService.getInstance());
|
||||
return this._appsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -48,8 +48,10 @@ export class AuthenticationService {
|
||||
*/
|
||||
onLogout: ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||
|
||||
_profileApi: UserProfileApi;
|
||||
get profileApi(): UserProfileApi {
|
||||
return new UserProfileApi(this.alfrescoApi.getInstance());
|
||||
this._profileApi = this._profileApi ?? new UserProfileApi(this.alfrescoApi.getInstance());
|
||||
return this._profileApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -33,8 +33,10 @@ import { UserProfileApi, UserRepresentation } from '@alfresco/js-api';
|
||||
})
|
||||
export class BpmUserService {
|
||||
|
||||
_profileApi: UserProfileApi;
|
||||
get profileApi(): UserProfileApi {
|
||||
return new UserProfileApi(this.apiService.getInstance());
|
||||
this._profileApi = this._profileApi ?? new UserProfileApi(this.apiService.getInstance());
|
||||
return this._profileApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -28,8 +28,10 @@ import { CommentEntry, CommentsApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class CommentContentService {
|
||||
|
||||
_commentsApi: CommentsApi;
|
||||
get commentsApi(): CommentsApi {
|
||||
return new CommentsApi(this.apiService.getInstance());
|
||||
this._commentsApi = this._commentsApi ?? new CommentsApi(this.apiService.getInstance());
|
||||
return this._commentsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -29,8 +29,10 @@ import { ActivitiCommentsApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class CommentProcessService {
|
||||
|
||||
_commentsApi: ActivitiCommentsApi;
|
||||
get commentsApi(): ActivitiCommentsApi {
|
||||
return new ActivitiCommentsApi(this.apiService.getInstance());
|
||||
this._commentsApi = this._commentsApi ?? new ActivitiCommentsApi(this.apiService.getInstance());
|
||||
return this._commentsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -38,12 +38,16 @@ export class ContentService {
|
||||
folderCreate: Subject<MinimalNode> = new Subject<MinimalNode>();
|
||||
folderEdit: Subject<MinimalNode> = new Subject<MinimalNode>();
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(public authService: AuthenticationService,
|
||||
|
@@ -28,12 +28,16 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class DeletedNodesApiService {
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
_trashcanApi: TrashcanApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.apiService.getInstance());
|
||||
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.apiService.getInstance());
|
||||
return this._trashcanApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -27,8 +27,10 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class DownloadZipService {
|
||||
|
||||
_downloadsApi: DownloadsApi;
|
||||
get downloadsApi(): DownloadsApi {
|
||||
return new DownloadsApi(this.apiService.getInstance());
|
||||
this._downloadsApi = this._downloadsApi ?? new DownloadsApi(this.apiService.getInstance());
|
||||
return this._downloadsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -28,16 +28,16 @@ import { PeopleApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class EcmUserService {
|
||||
|
||||
private _peopleApi: PeopleApi;
|
||||
_peopleApi: PeopleApi;
|
||||
get peopleApi(): PeopleApi {
|
||||
this._peopleApi = this._peopleApi ?? new PeopleApi(this.apiService.getInstance());
|
||||
return this._peopleApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private contentService: ContentService) {
|
||||
}
|
||||
|
||||
get peopleApi(): PeopleApi {
|
||||
return this._peopleApi || (this._peopleApi = new PeopleApi(this.apiService.getInstance()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets information about a user identified by their username.
|
||||
* @param userName Target username
|
||||
|
@@ -20,7 +20,7 @@ import {
|
||||
AlfrescoApiCompatibility,
|
||||
ContentApi,
|
||||
Core,
|
||||
Node
|
||||
Node, NodesApi
|
||||
} from '@alfresco/js-api';
|
||||
import { ReplaySubject, Subject } from 'rxjs';
|
||||
|
||||
@@ -46,8 +46,10 @@ export class ExternalAlfrescoApiService {
|
||||
return this.getInstance().content;
|
||||
}
|
||||
|
||||
get nodesApi(): Core.NodesApi {
|
||||
return this.getInstance().nodes;
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
init(ecmHost: string, contextRoot: string) {
|
||||
|
@@ -27,8 +27,10 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class FavoritesApiService {
|
||||
|
||||
_favoritesApi: FavoritesApi;
|
||||
get favoritesApi(): FavoritesApi {
|
||||
return new FavoritesApi(this.apiService.getInstance());
|
||||
this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.apiService.getInstance());
|
||||
return this._favoritesApi;
|
||||
}
|
||||
|
||||
static remapEntry({ entry }: any): any {
|
||||
|
@@ -28,12 +28,16 @@ import { NodeMetadata } from '../models/node-metadata.model';
|
||||
})
|
||||
export class NodesApiService {
|
||||
|
||||
_trashcanApi: TrashcanApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
return new TrashcanApi(this.apiService.getInstance());
|
||||
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.apiService.getInstance());
|
||||
return this._trashcanApi;
|
||||
}
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -50,8 +50,10 @@ export class PeopleContentService {
|
||||
private hasContentAdminRole: boolean = false;
|
||||
hasCheckedIsContentAdmin: boolean = false;
|
||||
|
||||
_peopleApi: PeopleApi;
|
||||
get peopleApi(): PeopleApi {
|
||||
return new PeopleApi(this.apiService.getInstance());
|
||||
this._peopleApi = this._peopleApi ?? new PeopleApi(this.apiService.getInstance());
|
||||
return this._peopleApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
|
@@ -24,7 +24,7 @@ import { catchError, map } from 'rxjs/operators';
|
||||
import {
|
||||
TaskActionsApi,
|
||||
UsersApi,
|
||||
ResultListDataRepresentationLightUserRepresentation
|
||||
ResultListDataRepresentationLightUserRepresentation, DownloadsApi
|
||||
} from '@alfresco/js-api';
|
||||
|
||||
@Injectable({
|
||||
@@ -32,12 +32,16 @@ import {
|
||||
})
|
||||
export class PeopleProcessService {
|
||||
|
||||
_taskActionsApi: TaskActionsApi;
|
||||
get taskActionsApi(): TaskActionsApi {
|
||||
return new TaskActionsApi(this.apiService.getInstance());
|
||||
this._taskActionsApi = this._taskActionsApi ?? new TaskActionsApi(this.apiService.getInstance());
|
||||
return this._taskActionsApi;
|
||||
}
|
||||
|
||||
_userApi: UsersApi;
|
||||
get userApi(): UsersApi {
|
||||
return new UsersApi(this.apiService.getInstance());
|
||||
this._userApi = this._userApi ?? new UsersApi(this.apiService.getInstance());
|
||||
return this._userApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -26,12 +26,16 @@ import { concatMap, switchMap, takeWhile, map } from 'rxjs/operators';
|
||||
})
|
||||
export class RenditionsService {
|
||||
|
||||
_renditionsApi: RenditionsApi;
|
||||
get renditionsApi(): RenditionsApi {
|
||||
return new RenditionsApi(this.apiService.getInstance());
|
||||
this._renditionsApi = this._renditionsApi ?? new RenditionsApi(this.apiService.getInstance());
|
||||
return this._renditionsApi;
|
||||
}
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService) {
|
||||
|
@@ -28,12 +28,16 @@ export class SearchService {
|
||||
|
||||
dataLoaded: Subject<ResultSetPaging> = new Subject();
|
||||
|
||||
_queriesApi: QueriesApi;
|
||||
get queriesApi(): QueriesApi {
|
||||
return new QueriesApi(this.apiService.getInstance());
|
||||
this._queriesApi = this._queriesApi ?? new QueriesApi(this.apiService.getInstance());
|
||||
return this._queriesApi;
|
||||
}
|
||||
|
||||
_searchApi: SearchApi;
|
||||
get searchApi(): SearchApi {
|
||||
return new SearchApi(this.apiService.getInstance());
|
||||
this._searchApi = this._searchApi ?? new SearchApi(this.apiService.getInstance());
|
||||
return this._searchApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -29,8 +29,10 @@ export class SharedLinksApiService {
|
||||
|
||||
error = new Subject<{ statusCode: number, message: string }>();
|
||||
|
||||
_sharedLinksApi: SharedlinksApi;
|
||||
get sharedLinksApi(): SharedlinksApi {
|
||||
return new SharedlinksApi(this.apiService.getInstance());
|
||||
this._sharedLinksApi = this._sharedLinksApi ?? new SharedlinksApi(this.apiService.getInstance());
|
||||
return this._sharedLinksApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -40,8 +40,10 @@ import { LogService } from './log.service';
|
||||
})
|
||||
export class SitesService {
|
||||
|
||||
_sitesApi: SitesApi;
|
||||
get sitesApi(): SitesApi {
|
||||
return new SitesApi(this.apiService.getInstance());
|
||||
this._sitesApi = this._sitesApi ?? new SitesApi(this.apiService.getInstance());
|
||||
return this._sitesApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
|
@@ -164,8 +164,10 @@ export class ThumbnailService {
|
||||
'task': './assets/images/task.svg'
|
||||
};
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
constructor(protected apiService: AlfrescoApiService, matIconRegistry: MatIconRegistry, sanitizer: DomSanitizer) {
|
||||
|
@@ -63,16 +63,22 @@ export class UploadService {
|
||||
fileUploadDeleted: Subject<FileUploadDeleteEvent> = new Subject<FileUploadDeleteEvent>();
|
||||
fileDeleted: Subject<string> = new Subject<string>();
|
||||
|
||||
_uploadApi: UploadApi;
|
||||
get uploadApi(): UploadApi {
|
||||
return new UploadApi(this.apiService.getInstance());
|
||||
this._uploadApi = this._uploadApi ?? new UploadApi(this.apiService.getInstance());
|
||||
return this._uploadApi;
|
||||
}
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
_versionsApi: VersionsApi;
|
||||
get versionsApi(): VersionsApi {
|
||||
return new VersionsApi(this.apiService.getInstance());
|
||||
this._versionsApi = this._versionsApi ?? new VersionsApi(this.apiService.getInstance());
|
||||
return this._versionsApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -257,20 +257,28 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
private shouldCloseViewer = true;
|
||||
private keyDown$ = fromEvent<KeyboardEvent>(document, 'keydown');
|
||||
|
||||
_sharedLinksApi: SharedlinksApi;
|
||||
get sharedLinksApi(): SharedlinksApi {
|
||||
return new SharedlinksApi(this.apiService.getInstance());
|
||||
this._sharedLinksApi = this._sharedLinksApi ?? new SharedlinksApi(this.apiService.getInstance());
|
||||
return this._sharedLinksApi;
|
||||
}
|
||||
|
||||
_versionsApi: VersionsApi;
|
||||
get versionsApi(): VersionsApi {
|
||||
return new VersionsApi(this.apiService.getInstance());
|
||||
this._versionsApi = this._versionsApi ?? new VersionsApi(this.apiService.getInstance());
|
||||
return this._versionsApi;
|
||||
}
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -74,16 +74,22 @@ export class ViewUtilService {
|
||||
viewerTypeChange: Subject<string> = new Subject<string>();
|
||||
urlFileContentChange: Subject<string> = new Subject<string>();
|
||||
|
||||
_renditionsApi: RenditionsApi;
|
||||
get renditionsApi(): RenditionsApi {
|
||||
return new RenditionsApi(this.apiService.getInstance());
|
||||
this._renditionsApi = this._renditionsApi ?? new RenditionsApi(this.apiService.getInstance());
|
||||
return this._renditionsApi;
|
||||
}
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
return new ContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
_versionsApi: VersionsApi;
|
||||
get versionsApi(): VersionsApi {
|
||||
return new VersionsApi(this.apiService.getInstance());
|
||||
this._versionsApi = this._versionsApi ?? new VersionsApi(this.apiService.getInstance());
|
||||
return this._versionsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -33,12 +33,16 @@ import { ProcessDefinitionsApi, ReportApi } from '@alfresco/js-api';
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AnalyticsService {
|
||||
|
||||
_reportApi: ReportApi;
|
||||
get reportApi(): ReportApi {
|
||||
return new ReportApi(this.apiService.getInstance());
|
||||
this._reportApi = this._reportApi ?? new ReportApi(this.apiService.getInstance());
|
||||
return this._reportApi;
|
||||
}
|
||||
|
||||
_processDefinitionsApi: ProcessDefinitionsApi;
|
||||
get processDefinitionsApi(): ProcessDefinitionsApi {
|
||||
return new ProcessDefinitionsApi(this.apiService.getInstance());
|
||||
this._processDefinitionsApi = this._processDefinitionsApi ?? new ProcessDefinitionsApi(this.apiService.getInstance());
|
||||
return this._processDefinitionsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -24,8 +24,10 @@ import { ModelJsonBpmnApi } from '@alfresco/js-api';
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class DiagramsService {
|
||||
|
||||
_modelJsonBpmnApi: ModelJsonBpmnApi;
|
||||
get modelJsonBpmnApi(): ModelJsonBpmnApi {
|
||||
return new ModelJsonBpmnApi(this.apiService.getInstance());
|
||||
this._modelJsonBpmnApi = this._modelJsonBpmnApi ?? new ModelJsonBpmnApi(this.apiService.getInstance());
|
||||
return this._modelJsonBpmnApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -67,8 +67,10 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i
|
||||
rootNodeId = AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER;
|
||||
selectedNode: Node;
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -31,8 +31,10 @@ import { Observable, Subject, throwError } from 'rxjs';
|
||||
})
|
||||
export class ContentCloudNodeSelectorService {
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
return new NodesApi(this.apiService.getInstance());
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
sourceNodeNotFound = false;
|
||||
|
@@ -36,8 +36,10 @@ import { FormContent } from '../../services/form-fields.interfaces';
|
||||
})
|
||||
export class FormCloudService extends BaseCloudService {
|
||||
|
||||
private _uploadApi;
|
||||
get uploadApi(): UploadApi {
|
||||
return new UploadApi(this.apiService.getInstance());
|
||||
this._uploadApi = this._uploadApi ?? new UploadApi(this.apiService.getInstance());
|
||||
return this._uploadApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -31,12 +31,16 @@ import { AuthenticationApi, Node, UploadApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class ProcessCloudContentService {
|
||||
|
||||
private _uploadApi;
|
||||
get uploadApi(): UploadApi {
|
||||
return new UploadApi(this.apiService.getInstance());
|
||||
this._uploadApi = this._uploadApi ?? new UploadApi(this.apiService.getInstance());
|
||||
return this._uploadApi;
|
||||
}
|
||||
|
||||
get authenticationApi(): AuthenticationApi {
|
||||
return new AuthenticationApi(this.apiService.getInstance());
|
||||
private _authenticationApi
|
||||
get authenticationApi(): UploadApi {
|
||||
this._authenticationApi = this._authenticationApi ?? new AuthenticationApi(this.apiService.getInstance());
|
||||
return this._authenticationApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@@ -30,8 +30,10 @@ import {
|
||||
})
|
||||
export class ProcessFilterService {
|
||||
|
||||
private _userFiltersApi;
|
||||
get userFiltersApi(): UserFiltersApi {
|
||||
return new UserFiltersApi(this.alfrescoApiService.getInstance());
|
||||
this._userFiltersApi = this._userFiltersApi ?? new UserFiltersApi(this.alfrescoApiService.getInstance());
|
||||
return this._userFiltersApi;
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
|
@@ -23,7 +23,7 @@ import {
|
||||
ProcessInstancesApi,
|
||||
RestVariable,
|
||||
ProcessInstanceRepresentation,
|
||||
ProcessInstanceVariablesApi
|
||||
ProcessInstanceVariablesApi, ActivitiContentApi
|
||||
} from '@alfresco/js-api';
|
||||
import { Observable, from, throwError, of } from 'rxjs';
|
||||
import { TaskDetailsModel } from '../../task-list';
|
||||
@@ -42,20 +42,28 @@ declare let moment: any;
|
||||
})
|
||||
export class ProcessService {
|
||||
|
||||
get processInstanceVariablesApi(): ProcessInstanceVariablesApi {
|
||||
return new ProcessInstanceVariablesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
get processInstancesApi(): ProcessInstancesApi {
|
||||
return new ProcessInstancesApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
get processDefinitionsApi(): ProcessDefinitionsApi {
|
||||
return new ProcessDefinitionsApi(this.alfrescoApiService.getInstance());
|
||||
}
|
||||
|
||||
private _tasksApi;
|
||||
get tasksApi(): TasksApi {
|
||||
return new TasksApi(this.alfrescoApiService.getInstance());
|
||||
this._tasksApi = this._tasksApi ?? new TasksApi(this.alfrescoApiService.getInstance());
|
||||
return this._tasksApi;
|
||||
}
|
||||
|
||||
private _processDefinitionsApi;
|
||||
get processDefinitionsApi(): ProcessDefinitionsApi {
|
||||
this._processDefinitionsApi = this._processDefinitionsApi ?? new ProcessDefinitionsApi(this.alfrescoApiService.getInstance());
|
||||
return this._processDefinitionsApi;
|
||||
}
|
||||
|
||||
private _processInstancesApi;
|
||||
get processInstancesApi(): ProcessInstancesApi {
|
||||
this._processInstancesApi = this._processInstancesApi ?? new ProcessInstancesApi(this.alfrescoApiService.getInstance());
|
||||
return this._processInstancesApi;
|
||||
}
|
||||
|
||||
private _processInstanceVariablesApi;
|
||||
get processInstanceVariablesApi(): ProcessInstanceVariablesApi {
|
||||
this._processInstanceVariablesApi = this._processInstanceVariablesApi ?? new ProcessInstanceVariablesApi(this.alfrescoApiService.getInstance());
|
||||
return this._processInstanceVariablesApi;
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
|
@@ -25,8 +25,10 @@ import { throwError } from 'rxjs';
|
||||
})
|
||||
export class ProcessUploadService extends UploadService {
|
||||
|
||||
private _contentApi;
|
||||
get contentApi(): ActivitiContentApi {
|
||||
return new ActivitiContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ActivitiContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
constructor(protected apiService: AlfrescoApiService, appConfigService: AppConfigService, discoveryApiService: DiscoveryApiService) {
|
||||
|
@@ -20,15 +20,17 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable, forkJoin, from, throwError } from 'rxjs';
|
||||
import { FilterRepresentationModel } from '../models/filter.model';
|
||||
import { map, catchError } from 'rxjs/operators';
|
||||
import { UserFiltersApi } from '@alfresco/js-api';
|
||||
import { ActivitiContentApi, UserFiltersApi } from '@alfresco/js-api';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TaskFilterService {
|
||||
|
||||
get userFiltersApi(): UserFiltersApi {
|
||||
return new UserFiltersApi(this.apiService.getInstance());
|
||||
private _userFiltersApi;
|
||||
get userFiltersApi(): ActivitiContentApi {
|
||||
this._userFiltersApi = this._userFiltersApi ?? new UserFiltersApi(this.apiService.getInstance());
|
||||
return this._userFiltersApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
@@ -25,8 +25,10 @@ import { ActivitiContentApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class TaskUploadService extends UploadService {
|
||||
|
||||
private _contentApi;
|
||||
get contentApi(): ActivitiContentApi {
|
||||
return new ActivitiContentApi(this.apiService.getInstance());
|
||||
this._contentApi = this._contentApi ?? new ActivitiContentApi(this.apiService.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
constructor(protected apiService: AlfrescoApiService, appConfigService: AppConfigService, discoveryApiService: DiscoveryApiService) {
|
||||
|
@@ -34,20 +34,28 @@ import {
|
||||
})
|
||||
export class TaskListService {
|
||||
|
||||
get modelsApi(): ModelsApi {
|
||||
return new ModelsApi(this.apiService.getInstance());
|
||||
private _modelsApi;
|
||||
get modelsApi(): TasksApi {
|
||||
this._modelsApi = this._modelsApi ?? new ModelsApi(this.apiService.getInstance());
|
||||
return this._modelsApi;
|
||||
}
|
||||
|
||||
private _tasksApi;
|
||||
get tasksApi(): TasksApi {
|
||||
return new TasksApi(this.apiService.getInstance());
|
||||
this._tasksApi = this._tasksApi ?? new TasksApi(this.apiService.getInstance());
|
||||
return this._tasksApi;
|
||||
}
|
||||
|
||||
private _taskActionsApi;
|
||||
get taskActionsApi(): TaskActionsApi {
|
||||
return new TaskActionsApi(this.apiService.getInstance());
|
||||
this._taskActionsApi = this._taskActionsApi ?? new TaskActionsApi(this.apiService.getInstance());
|
||||
return this._taskActionsApi;
|
||||
}
|
||||
|
||||
private _checklistsApi;
|
||||
get checklistsApi(): ChecklistsApi {
|
||||
return new ChecklistsApi(this.apiService.getInstance());
|
||||
this._checklistsApi = this._checklistsApi ?? new ChecklistsApi(this.apiService.getInstance());
|
||||
return this._checklistsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
|
Reference in New Issue
Block a user