mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 03:23:07 +00:00
93803: Update DataService constructor signatures
Override linkPath/responseMsToLive/constructIdEndpoint - in class body for inheritable classes (for clarity: it's the first thing you'd read, variable name is right there) - in constructor for composable classes * wrapped services must be 'synchronized' with their wrapper * moved these overrides up in the argument list for emphasis (implementing a new composable feature? first thing is to use the same endpoint!)
This commit is contained in:
@@ -29,9 +29,10 @@ import { dataService } from '../data/base/data-service.decorator';
|
||||
@dataService(WorkflowItem.type)
|
||||
export class WorkflowItemDataService extends IdentifiableDataService<WorkflowItem> implements SearchData<WorkflowItem>, DeleteData<WorkflowItem> {
|
||||
protected linkPath = 'workflowitems';
|
||||
protected searchByItemLinkPath = 'item';
|
||||
protected responseMsToLive = 10 * 1000;
|
||||
|
||||
protected searchByItemLinkPath = 'item';
|
||||
|
||||
private searchData: SearchDataImpl<WorkflowItem>;
|
||||
private deleteData: DeleteDataImpl<WorkflowItem>;
|
||||
|
||||
@@ -42,10 +43,10 @@ export class WorkflowItemDataService extends IdentifiableDataService<WorkflowIte
|
||||
protected halService: HALEndpointService,
|
||||
protected notificationsService: NotificationsService,
|
||||
) {
|
||||
super('workspaceitems', requestService, rdbService, objectCache, halService);
|
||||
super(requestService, rdbService, objectCache, halService);
|
||||
|
||||
this.searchData = new SearchDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive);
|
||||
this.deleteData = new DeleteDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, notificationsService, this.responseMsToLive, this.constructIdEndpoint);
|
||||
this.searchData = new SearchDataImpl(this.linkPath, this.responseMsToLive, requestService, rdbService, objectCache, halService);
|
||||
this.deleteData = new DeleteDataImpl(this.linkPath, this.responseMsToLive, this.constructIdEndpoint, requestService, rdbService, objectCache, halService, notificationsService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user