mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
refactored requestCacheReducer
This commit is contained in:
32
src/app/core/data/request.models.ts
Normal file
32
src/app/core/data/request.models.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { SortOptions } from "../shared/sort-options.model";
|
||||
import { PaginationOptions } from "../shared/pagination-options.model";
|
||||
import { GenericConstructor } from "../shared/generic-constructor";
|
||||
|
||||
export class Request<T> {
|
||||
constructor(
|
||||
public href: string,
|
||||
public resourceType: GenericConstructor<T>
|
||||
) {}
|
||||
}
|
||||
|
||||
export class FindByIDRequest<T> extends Request<T> {
|
||||
constructor(
|
||||
href: string,
|
||||
resourceType: GenericConstructor<T>,
|
||||
public resourceID: string
|
||||
) {
|
||||
super(href, resourceType);
|
||||
}
|
||||
}
|
||||
|
||||
export class FindAllRequest<T> extends Request<T> {
|
||||
constructor(
|
||||
href: string,
|
||||
resourceType: GenericConstructor<T>,
|
||||
public scopeID?: string,
|
||||
public paginationOptions?: PaginationOptions,
|
||||
public sortOptions?: SortOptions
|
||||
) {
|
||||
super(href, resourceType);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user