1
0

refactor, decouple pagination and configuration

This commit is contained in:
FrancescoMolinaro
2024-01-03 17:27:38 +01:00
parent c4b8eaba72
commit 457c3b351f
26 changed files with 256 additions and 146 deletions

View File

@@ -1,8 +1,10 @@
import { deserialize, inheritSerialization } from 'cerialize';
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
import { typedObject } from '../../../core/cache/builders/build-decorators';
import { ADMIN_NOTIFY_MESSAGE } from './admin-notify-message.resource-type';
import { excludeFromEquals } from '../../../core/utilities/equals.decorators';
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
import { GenericConstructor } from '../../../core/shared/generic-constructor';
import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model';
/**
* A message that includes admin notify info
@@ -13,11 +15,47 @@ export class AdminNotifyMessage extends DSpaceObject {
static type = ADMIN_NOTIFY_MESSAGE;
/**
* The type of the message
* The type of the resource
*/
@excludeFromEquals
type = ADMIN_NOTIFY_MESSAGE;
/**
* The type of the notification
*/
@autoserialize
coarNotifyType: string;
/**
* The type of the activity stream
*/
@autoserialize
source: number;
/**
* The type of the activity stream
*/
@autoserialize
target: number;
/**
* The label for the status of the queue
*/
@autoserialize
queueStatusLabel: string;
/**
* The timeout of the queue
*/
@autoserialize
queueTimeout: string;
/**
* The status of the queue
*/
@autoserialize
queueStatus: number;
@deserialize
_links: {
self: {
@@ -28,4 +66,8 @@ export class AdminNotifyMessage extends DSpaceObject {
get self(): string {
return this._links.self.href;
}
getRenderTypes(): (string | GenericConstructor<ListableObject>)[] {
return [this.constructor as GenericConstructor<ListableObject>];
}
}