mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
Merge branch 'master' into w2p-68729_List-version-history
Conflicts: src/app/core/cache/models/normalized-item.model.ts src/app/core/core.module.ts src/app/core/shared/item.model.ts
This commit is contained in:
@@ -1,40 +1,39 @@
|
||||
import { ListableObject } from '../../shared/object-collection/shared/listable-object.model';
|
||||
import { CacheableObject } from '../cache/object-cache.reducer';
|
||||
import { ResourceType } from './resource-type';
|
||||
import { deserialize, autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { excludeFromEquals } from '../utilities/equals.decorators';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { GenericConstructor } from './generic-constructor';
|
||||
import { PaginatedList } from '../data/paginated-list';
|
||||
import { Version } from './version.model';
|
||||
import { VERSION_HISTORY } from './version-history.resource-type';
|
||||
import { link, typedObject } from '../cache/builders/build-decorators';
|
||||
import { DSpaceObject } from './dspace-object.model';
|
||||
import { HALLink } from './hal-link.model';
|
||||
import { VERSION } from './version.resource-type';
|
||||
|
||||
/**
|
||||
* Class representing a DSpace Version History
|
||||
*/
|
||||
export class VersionHistory extends ListableObject implements CacheableObject {
|
||||
static type = new ResourceType('versionhistory');
|
||||
@typedObject
|
||||
@inheritSerialization(DSpaceObject)
|
||||
export class VersionHistory extends DSpaceObject {
|
||||
static type = VERSION_HISTORY;
|
||||
|
||||
/**
|
||||
* Link to itself
|
||||
*/
|
||||
@excludeFromEquals
|
||||
self: string;
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
versions: HALLink;
|
||||
};
|
||||
|
||||
/**
|
||||
* The identifier of this Version History
|
||||
*/
|
||||
id: number;
|
||||
@autoserialize
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The list of versions within this history
|
||||
*/
|
||||
@excludeFromEquals
|
||||
@link(VERSION, true)
|
||||
versions: Observable<RemoteData<PaginatedList<Version>>>;
|
||||
|
||||
/**
|
||||
* Method that returns as which type of object this object should be rendered
|
||||
*/
|
||||
getRenderTypes(): Array<string | GenericConstructor<ListableObject>> {
|
||||
return [this.constructor as GenericConstructor<ListableObject>];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user