108915: Added the missing Filetypes followLink to Process

This commit is contained in:
Alexandre Vryghem
2023-11-30 17:56:34 +01:00
parent 6b0f2e7c44
commit e339b46228
3 changed files with 54 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
import { typedObject } from '../../core/cache/builders/build-decorators';
import { excludeFromEquals } from '../../core/utilities/equals.decorators';
import { autoserialize } from 'cerialize';
import { ResourceType } from '../../core/shared/resource-type';
import { FILETYPES } from './filetypes.resource-type';
/**
* Object representing the file types of the {@link Bitstream}s of a {@link Process}
*/
@typedObject
export class Filetypes {
static type = FILETYPES;
/**
* The id of this {@link Filetypes}
*/
@autoserialize
id: string;
/**
* The values of this {@link Filetypes}
*/
@autoserialize
values: string[];
/**
* The object type
*/
@excludeFromEquals
@autoserialize
type: ResourceType;
}

View File

@@ -0,0 +1,8 @@
/**
* The resource type for {@link Filetypes}
*
* Needs to be in a separate file to prevent circular dependencies in webpack.
*/
import { ResourceType } from '../../core/shared/resource-type';
export const FILETYPES = new ResourceType('filetypes');

View File

@@ -15,6 +15,8 @@ import { Script } from '../scripts/script.model';
import { CacheableObject } from '../../core/cache/cacheable-object.model'; import { CacheableObject } from '../../core/cache/cacheable-object.model';
import { BITSTREAM } from '../../core/shared/bitstream.resource-type'; import { BITSTREAM } from '../../core/shared/bitstream.resource-type';
import { PaginatedList } from '../../core/data/paginated-list.model'; import { PaginatedList } from '../../core/data/paginated-list.model';
import { Filetypes } from './filetypes.model';
import { FILETYPES } from './filetypes.resource-type';
/** /**
* Object representing a process * Object representing a process
@@ -80,7 +82,8 @@ export class Process implements CacheableObject {
self: HALLink, self: HALLink,
script: HALLink, script: HALLink,
output: HALLink, output: HALLink,
files: HALLink files: HALLink,
filetypes: HALLink,
}; };
/** /**
@@ -103,4 +106,12 @@ export class Process implements CacheableObject {
*/ */
@link(BITSTREAM, true) @link(BITSTREAM, true)
files?: Observable<RemoteData<PaginatedList<Bitstream>>>; files?: Observable<RemoteData<PaginatedList<Bitstream>>>;
/**
* The filetypes present in this Process
* Will be undefined unless the output {@link HALLink} has been resolved.
*/
@link(FILETYPES)
filetypes?: Observable<RemoteData<Filetypes>>;
} }