mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merged Dspace/dspace-angular/master and changed all new FindAllOptions references to FindListOptions
This commit is contained in:
@@ -37,7 +37,7 @@ export class BundleDataService extends DataService<Bundle> {
|
||||
|
||||
/**
|
||||
* Get the endpoint for browsing bundles
|
||||
* @param {FindAllOptions} options
|
||||
* @param {FindListOptions} options
|
||||
* @returns {Observable<string>}
|
||||
*/
|
||||
getBrowseEndpoint(options: FindListOptions = {}, linkPath?: string): Observable<string> {
|
||||
|
@@ -240,17 +240,17 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
* @param options
|
||||
*/
|
||||
getItemRelationshipsByLabel(item: Item, label: string, options?: FindListOptions): Observable<RemoteData<PaginatedList<Relationship>>> {
|
||||
let findAllOptions = new FindListOptions();
|
||||
let findListOptions = new FindListOptions();
|
||||
if (options) {
|
||||
findAllOptions = Object.assign(new FindListOptions(), options);
|
||||
findListOptions = Object.assign(new FindListOptions(), options);
|
||||
}
|
||||
const searchParams = [ new SearchParam('label', label), new SearchParam('dso', item.id) ];
|
||||
if (findAllOptions.searchParams) {
|
||||
findAllOptions.searchParams = [...findAllOptions.searchParams, ...searchParams];
|
||||
if (findListOptions.searchParams) {
|
||||
findListOptions.searchParams = [...findListOptions.searchParams, ...searchParams];
|
||||
} else {
|
||||
findAllOptions.searchParams = searchParams;
|
||||
findListOptions.searchParams = searchParams;
|
||||
}
|
||||
return this.searchBy('byLabel', findAllOptions);
|
||||
return this.searchBy('byLabel', findListOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -13,7 +13,7 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { RestResponse } from '../cache/response.models';
|
||||
import { RequestEntry } from './request.reducer';
|
||||
import { FindAllOptions } from './request.models';
|
||||
import { FindListOptions } from './request.models';
|
||||
import { TestScheduler } from 'rxjs/testing';
|
||||
import { PaginatedList } from './paginated-list';
|
||||
import { RemoteData } from './remote-data';
|
||||
@@ -31,7 +31,7 @@ describe('SiteDataService', () => {
|
||||
});
|
||||
|
||||
const requestUUID = '34cfed7c-f597-49ef-9cbe-ea351f0023c2';
|
||||
const options = Object.assign(new FindAllOptions(), {});
|
||||
const options = Object.assign(new FindListOptions(), {});
|
||||
|
||||
const getRequestEntry$ = (successful:boolean, statusCode:number, statusText:string) => {
|
||||
return observableOf({
|
||||
|
@@ -10,7 +10,7 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
|
||||
import { FindAllOptions } from './request.models';
|
||||
import { FindListOptions } from './request.models';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { RemoteData } from './remote-data';
|
||||
@@ -46,10 +46,10 @@ export class SiteDataService extends DataService<Site> {
|
||||
|
||||
/**
|
||||
* Get the endpoint for browsing the site object
|
||||
* @param {FindAllOptions} options
|
||||
* @param {FindListOptions} options
|
||||
* @param {Observable<string>} linkPath
|
||||
*/
|
||||
getBrowseEndpoint(options:FindAllOptions, linkPath?:string):Observable<string> {
|
||||
getBrowseEndpoint(options:FindListOptions, linkPath?:string):Observable<string> {
|
||||
return this.halService.getEndpoint(this.linkPath);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user