mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-2451] Reviewed component docs (#3108)
* [ADF-2451] Reviewed component docs * [ADF-2451] Reviewed component docs * [ADF-2451] Renamed node share directive doc fileand rebuilt index
This commit is contained in:
committed by
Eugenio Romano
parent
e8e2af7d6b
commit
36625c1af6
@@ -89,7 +89,7 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
@Input()
|
||||
size: number = PaginationComponent.DEFAULT_PAGINATION.maxItems;
|
||||
|
||||
/** The presetColumn of the custom schema to fetch. */
|
||||
/** Name of a custom schema to fetch from `app.config.json`. */
|
||||
@Input()
|
||||
presetColumn: string;
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ export class ProcessFilterService {
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all filters defined for a Process App.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
getProcessFilters(appId: number): Observable<FilterProcessRepresentationModel[]> {
|
||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||
.map((response: any) => {
|
||||
@@ -41,9 +45,9 @@ export class ProcessFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the process filter by id
|
||||
* @param filterId - number - The id of the filter
|
||||
* @param appId - string - optional - The id of app
|
||||
* Retrieves the process filter by ID.
|
||||
* @param filterId ID of the filter
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
getProcessFilterById(filterId: number, appId?: number): Observable<FilterProcessRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||
@@ -53,9 +57,9 @@ export class ProcessFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the process filter by name
|
||||
* @param filterName - string - The name of the filter
|
||||
* @param appId - string - optional - The id of app
|
||||
* Retrieves the process filter by name.
|
||||
* @param filterName Name of the filter
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
getProcessFilterByName(filterName: string, appId?: number): Observable<FilterProcessRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||
@@ -65,8 +69,8 @@ export class ProcessFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and return the default filters
|
||||
* @param appId
|
||||
* Creates and returns the default filters for an app.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
public createDefaultFilters(appId: number): Observable<FilterProcessRepresentationModel[]> {
|
||||
let runningFilter = this.getRunningFilterInstance(appId);
|
||||
@@ -107,6 +111,10 @@ export class ProcessFilterService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a filter that matches "running" process instances.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
public getRunningFilterInstance(appId: number): FilterProcessRepresentationModel {
|
||||
return new FilterProcessRepresentationModel({
|
||||
'name': 'Running',
|
||||
@@ -118,8 +126,8 @@ export class ProcessFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a static Completed filter instance
|
||||
* @param appId
|
||||
* Returns a static Completed filter instance.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
private getCompletedFilterInstance(appId: number): FilterProcessRepresentationModel {
|
||||
return new FilterProcessRepresentationModel({
|
||||
@@ -132,8 +140,8 @@ export class ProcessFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a static All filter instance
|
||||
* @param appId
|
||||
* Returns a static All filter instance.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
private getAllFilterInstance(appId: number): FilterProcessRepresentationModel {
|
||||
return new FilterProcessRepresentationModel({
|
||||
@@ -146,8 +154,8 @@ export class ProcessFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a filter
|
||||
* @param filter - FilterProcessRepresentationModel
|
||||
* Adds a filter.
|
||||
* @param filter The filter to add
|
||||
*/
|
||||
addProcessFilter(filter: FilterProcessRepresentationModel): Observable<FilterProcessRepresentationModel> {
|
||||
return Observable.fromPromise(this.alfrescoApiService.getInstance().activiti.userFiltersApi.createUserProcessInstanceFilter(filter))
|
||||
@@ -157,6 +165,10 @@ export class ProcessFilterService {
|
||||
}).catch(err => this.handleProcessError(err));
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls `getUserProcessInstanceFilters` from the Alfresco JS API.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
callApiProcessFilters(appId?: number) {
|
||||
if (appId) {
|
||||
return this.alfrescoApiService.getInstance().activiti.userFiltersApi.getUserProcessInstanceFilters({ appId: appId });
|
||||
|
||||
@@ -35,8 +35,8 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and return the default filters
|
||||
* @param appId
|
||||
* Creates and returns the default filters for a process app.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
public createDefaultFilters(appId: number): Observable<FilterRepresentationModel[]> {
|
||||
let involvedTasksFilter = this.getInvolvedTasksFilterInstance(appId);
|
||||
@@ -85,7 +85,8 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all the Tasks filters
|
||||
* Gets all task filters for a process app.
|
||||
* @param appId Optional ID for a specific app
|
||||
*/
|
||||
getTaskListFilters(appId?: number): Observable<FilterRepresentationModel[]> {
|
||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||
@@ -100,9 +101,9 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Tasks filter by id
|
||||
* @param filterId - number - The id of the filter
|
||||
* @param appId - string - optional - The id of app
|
||||
* Gets a task filter by ID.
|
||||
* @param filterId ID of the filter
|
||||
* @param appId ID of the app for the filter
|
||||
*/
|
||||
getTaskFilterById(filterId: number, appId?: number): Observable<FilterRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||
@@ -112,8 +113,9 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Tasks filter by name
|
||||
* @param taskName - string - The name of the filter
|
||||
* Gets a task filter by name.
|
||||
* @param taskName Name of the filter
|
||||
* @param appId ID of the app for the filter
|
||||
*/
|
||||
getTaskFilterByName(taskName: string, appId?: number): Observable<FilterRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||
@@ -123,8 +125,8 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a filter
|
||||
* @param filter - FilterRepresentationModel
|
||||
* Adds a new task filter
|
||||
* @param filter The new filter to add
|
||||
*/
|
||||
addFilter(filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().activiti.userFiltersApi.createUserTaskFilter(filter))
|
||||
@@ -134,6 +136,10 @@ export class TaskFilterService {
|
||||
}).catch(err => this.handleError(err));
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls `getUserTaskFilters` from the Alfresco JS API.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
callApiTaskFilters(appId?: number) {
|
||||
if (appId) {
|
||||
return this.apiService.getInstance().activiti.userFiltersApi.getUserTaskFilters({appId: appId});
|
||||
@@ -143,8 +149,8 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a static Involved filter instance
|
||||
* @param appId
|
||||
* Creates and returns a filter for "Involved" task instances.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
getInvolvedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
@@ -157,8 +163,8 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a static My task filter instance
|
||||
* @param appId
|
||||
* Creates and returns a filter for "My Tasks" task instances.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
getMyTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
@@ -171,8 +177,8 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a static Queued filter instance
|
||||
* @param appId
|
||||
* Creates and returns a filter for "Queued Tasks" task instances.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
getQueuedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
@@ -185,8 +191,8 @@ export class TaskFilterService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a static Completed filter instance
|
||||
* @param appId
|
||||
* Creates and returns a filter for "Completed" task instances.
|
||||
* @param appId ID of the target app
|
||||
*/
|
||||
getCompletedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
|
||||
Reference in New Issue
Block a user