Merged Dspace/dspace-angular/master and changed all new FindAllOptions references to FindListOptions

This commit is contained in:
Marie Verdonck
2019-12-04 14:19:31 +01:00
parent 0b368e8c25
commit e77866a0d2
4 changed files with 12 additions and 12 deletions

View File

@@ -37,7 +37,7 @@ export class BundleDataService extends DataService<Bundle> {
/** /**
* Get the endpoint for browsing bundles * Get the endpoint for browsing bundles
* @param {FindAllOptions} options * @param {FindListOptions} options
* @returns {Observable<string>} * @returns {Observable<string>}
*/ */
getBrowseEndpoint(options: FindListOptions = {}, linkPath?: string): Observable<string> { getBrowseEndpoint(options: FindListOptions = {}, linkPath?: string): Observable<string> {

View File

@@ -240,17 +240,17 @@ export class RelationshipService extends DataService<Relationship> {
* @param options * @param options
*/ */
getItemRelationshipsByLabel(item: Item, label: string, options?: FindListOptions): Observable<RemoteData<PaginatedList<Relationship>>> { getItemRelationshipsByLabel(item: Item, label: string, options?: FindListOptions): Observable<RemoteData<PaginatedList<Relationship>>> {
let findAllOptions = new FindListOptions(); let findListOptions = new FindListOptions();
if (options) { 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) ]; const searchParams = [ new SearchParam('label', label), new SearchParam('dso', item.id) ];
if (findAllOptions.searchParams) { if (findListOptions.searchParams) {
findAllOptions.searchParams = [...findAllOptions.searchParams, ...searchParams]; findListOptions.searchParams = [...findListOptions.searchParams, ...searchParams];
} else { } else {
findAllOptions.searchParams = searchParams; findListOptions.searchParams = searchParams;
} }
return this.searchBy('byLabel', findAllOptions); return this.searchBy('byLabel', findListOptions);
} }
/** /**

View File

@@ -13,7 +13,7 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
import { RestResponse } from '../cache/response.models'; import { RestResponse } from '../cache/response.models';
import { RequestEntry } from './request.reducer'; import { RequestEntry } from './request.reducer';
import { FindAllOptions } from './request.models'; import { FindListOptions } from './request.models';
import { TestScheduler } from 'rxjs/testing'; import { TestScheduler } from 'rxjs/testing';
import { PaginatedList } from './paginated-list'; import { PaginatedList } from './paginated-list';
import { RemoteData } from './remote-data'; import { RemoteData } from './remote-data';
@@ -31,7 +31,7 @@ describe('SiteDataService', () => {
}); });
const requestUUID = '34cfed7c-f597-49ef-9cbe-ea351f0023c2'; 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) => { const getRequestEntry$ = (successful:boolean, statusCode:number, statusText:string) => {
return observableOf({ return observableOf({

View File

@@ -10,7 +10,7 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
import { NotificationsService } from '../../shared/notifications/notifications.service'; import { NotificationsService } from '../../shared/notifications/notifications.service';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { DSOChangeAnalyzer } from './dso-change-analyzer.service'; import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
import { FindAllOptions } from './request.models'; import { FindListOptions } from './request.models';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { RemoteData } from './remote-data'; import { RemoteData } from './remote-data';
@@ -46,10 +46,10 @@ export class SiteDataService extends DataService<Site> {
/** /**
* Get the endpoint for browsing the site object * Get the endpoint for browsing the site object
* @param {FindAllOptions} options * @param {FindListOptions} options
* @param {Observable<string>} linkPath * @param {Observable<string>} linkPath
*/ */
getBrowseEndpoint(options:FindAllOptions, linkPath?:string):Observable<string> { getBrowseEndpoint(options:FindListOptions, linkPath?:string):Observable<string> {
return this.halService.getEndpoint(this.linkPath); return this.halService.getEndpoint(this.linkPath);
} }