mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
65272: Missing JSDocs + id and uuid serializing fix for NormalizedTemplateItem
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { inheritSerialization, deserialize } from 'cerialize';
|
||||
import { inheritSerialization, deserialize, autoserializeAs } from 'cerialize';
|
||||
|
||||
import { mapsTo, relationship } from '../builders/build-decorators';
|
||||
import { TemplateItem } from '../../shared/template-item.model';
|
||||
@@ -12,6 +12,18 @@ import { Collection } from '../../shared/collection.model';
|
||||
@inheritSerialization(NormalizedItem)
|
||||
export class NormalizedTemplateItem extends NormalizedItem {
|
||||
|
||||
/**
|
||||
* The human-readable identifier of this DSpaceObject
|
||||
*/
|
||||
@autoserializeAs(String)
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The universally unique identifier of this DSpaceObject
|
||||
*/
|
||||
@autoserializeAs(String, 'id')
|
||||
uuid: string;
|
||||
|
||||
/**
|
||||
* The Collection that this item is a template for
|
||||
*/
|
||||
|
@@ -261,6 +261,7 @@ export abstract class DataService<T extends CacheableObject> implements UpdateDa
|
||||
* Add a new patch to the object cache
|
||||
* The patch is derived from the differences between the given object and its version in the object cache
|
||||
* @param {DSpaceObject} object The given object
|
||||
* @param ignoreMetadataFields An optional list of metadata fields to ignore updates for (* is allowed as a wildcard, for example: dc.description.*)
|
||||
*/
|
||||
update(object: T, ignoreMetadataFields: string[] = []): Observable<RemoteData<T>> {
|
||||
const ignoreMetadataFieldsPrefix = ignoreMetadataFields.map((field) => field.indexOf('*') > -1 ? field.slice(0, field.indexOf('*')) : field);
|
||||
|
Reference in New Issue
Block a user