108915: Refactored code to use followLinks to retrieve the files of a process instead of a second request

This commit is contained in:
Alexandre Vryghem
2023-11-30 17:30:22 +01:00
parent 9b5001e1d9
commit 6b0f2e7c44
5 changed files with 89 additions and 77 deletions

View File

@@ -13,6 +13,8 @@ import { RemoteData } from '../../core/data/remote-data';
import { SCRIPT } from '../scripts/script.resource-type';
import { Script } from '../scripts/script.model';
import { CacheableObject } from '../../core/cache/cacheable-object.model';
import { BITSTREAM } from '../../core/shared/bitstream.resource-type';
import { PaginatedList } from '../../core/data/paginated-list.model';
/**
* Object representing a process
@@ -94,4 +96,11 @@ export class Process implements CacheableObject {
*/
@link(PROCESS_OUTPUT_TYPE)
output?: Observable<RemoteData<Bitstream>>;
/**
* The files created by this Process
* Will be undefined unless the output {@link HALLink} has been resolved.
*/
@link(BITSTREAM, true)
files?: Observable<RemoteData<PaginatedList<Bitstream>>>;
}