mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
108915: Added the missing Filetypes followLink to Process
This commit is contained in:
34
src/app/process-page/processes/filetypes.model.ts
Normal file
34
src/app/process-page/processes/filetypes.model.ts
Normal 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;
|
||||
|
||||
}
|
@@ -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');
|
@@ -15,6 +15,8 @@ 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';
|
||||
import { Filetypes } from './filetypes.model';
|
||||
import { FILETYPES } from './filetypes.resource-type';
|
||||
|
||||
/**
|
||||
* Object representing a process
|
||||
@@ -80,7 +82,8 @@ export class Process implements CacheableObject {
|
||||
self: HALLink,
|
||||
script: HALLink,
|
||||
output: HALLink,
|
||||
files: HALLink
|
||||
files: HALLink,
|
||||
filetypes: HALLink,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -103,4 +106,12 @@ export class Process implements CacheableObject {
|
||||
*/
|
||||
@link(BITSTREAM, true)
|
||||
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>>;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user