1
0

68729: Version and VersionHistory model, normalized and data-service classes

This commit is contained in:
Kristof De Langhe
2020-02-18 16:05:38 +01:00
parent a04eb28815
commit d4ff4aab36
7 changed files with 268 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
import { ListableObject } from '../../shared/object-collection/shared/listable-object.model';
import { CacheableObject } from '../cache/object-cache.reducer';
import { ResourceType } from './resource-type';
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';
/**
* Class representing a DSpace Version History
*/
export class VersionHistory extends ListableObject implements CacheableObject {
static type = new ResourceType('versionhistory');
/**
* Link to itself
*/
@excludeFromEquals
self: string;
/**
* The identifier of this Version History
*/
id: number;
/**
* The list of versions within this history
*/
@excludeFromEquals
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>];
}
}