mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
refactor core
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user