From 03668e347e1c425d7113daf0803eacea0ac98cfb Mon Sep 17 00:00:00 2001 From: lotte Date: Tue, 12 May 2020 17:03:48 +0200 Subject: [PATCH] added missing typedoc --- .../submission/workflowitem-data.service.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/app/core/submission/workflowitem-data.service.ts b/src/app/core/submission/workflowitem-data.service.ts index 370b2df6dd..c82f7bf0b5 100644 --- a/src/app/core/submission/workflowitem-data.service.ts +++ b/src/app/core/submission/workflowitem-data.service.ts @@ -19,7 +19,7 @@ import { hasValue } from '../../shared/empty.util'; import { RequestEntry } from '../data/request.reducer'; /** - * A service that provides methods to make REST requests with workflowitems endpoint. + * A service that provides methods to make REST requests with workflow items endpoint. */ @Injectable() @dataService(WorkflowItem.type) @@ -40,18 +40,30 @@ export class WorkflowItemDataService extends DataService { } /** - * Delete an existing Workspace Item on the server - * @param id The Workspace Item's id to be removed + * Delete an existing Workflow Item on the server + * @param id The Workflow Item's id to be removed * @return an observable that emits true when the deletion was successful, false when it failed */ delete(id: string): Observable { return this.deleteWFI(id, true) } + /** + * Send an existing Workflow Item back to the workflow on the server + * @param id The Workspace Item's id to be sent back + * @return an observable that emits true when sending back the item was successful, false when it failed + */ sendBack(id: string): Observable { return this.deleteWFI(id, false) } + /** + * Method to delete a workflow item from the server + * @param id The identifier of the server + * @param expunge Whether or not to expunge: + * When true, the workflow item and its item will be permanently expunged on the server + * When false, the workflow item will be removed, but the item will still be available as a workspace item + */ private deleteWFI(id: string, expunge: boolean): Observable { const requestId = this.requestService.generateRequestId();