From 98c8eb558a4ad46b04d127549ae08fb2473035f7 Mon Sep 17 00:00:00 2001 From: Marie Verdonck Date: Wed, 16 Oct 2019 12:44:56 +0200 Subject: [PATCH] 65600: Renamed FindAllOptions to FindListOptions --- .../bitstream-formats.component.ts | 6 ++--- .../core/cache/models/search-param.model.ts | 2 +- src/app/core/config/config.service.spec.ts | 4 ++-- src/app/core/config/config.service.ts | 6 ++--- .../data/bitstream-format-data.service.ts | 6 ++--- src/app/core/data/collection-data.service.ts | 12 +++++----- src/app/core/data/comcol-data.service.spec.ts | 4 ++-- src/app/core/data/comcol-data.service.ts | 4 ++-- src/app/core/data/community-data.service.ts | 6 ++--- src/app/core/data/data.service.spec.ts | 6 ++--- src/app/core/data/data.service.ts | 22 +++++++++---------- .../core/data/dspace-object-data.service.ts | 4 ++-- src/app/core/data/item-data.service.spec.ts | 5 ++--- src/app/core/data/item-data.service.ts | 6 ++--- .../core/data/metadata-schema-data.service.ts | 4 ++-- src/app/core/data/request.models.ts | 4 ++-- src/app/core/data/resource-policy.service.ts | 4 ++-- src/app/core/eperson/eperson.service.ts | 4 ++-- src/app/core/eperson/group-eperson.service.ts | 4 ++-- .../submission/workflowitem-data.service.ts | 4 ++-- .../submission/workspaceitem-data.service.ts | 4 ++-- src/app/core/tasks/tasks.service.ts | 4 ++-- .../submission-form-collection.component.ts | 4 ++-- 23 files changed, 64 insertions(+), 65 deletions(-) diff --git a/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.ts b/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.ts index cb7aa1ef91..ec4003c108 100644 --- a/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.ts +++ b/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.ts @@ -5,7 +5,7 @@ import { PaginatedList } from '../../../core/data/paginated-list'; import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model'; import { BitstreamFormat } from '../../../core/shared/bitstream-format.model'; import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service'; -import { FindAllOptions } from '../../../core/data/request.models'; +import { FindListOptions } from '../../../core/data/request.models'; import { map, switchMap, take } from 'rxjs/operators'; import { hasValue } from '../../../shared/empty.util'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; @@ -35,7 +35,7 @@ export class BitstreamFormatsComponent implements OnInit { * The current pagination configuration for the page used by the FindAll method * Currently simply renders all bitstream formats */ - config: FindAllOptions = Object.assign(new FindAllOptions(), { + config: FindListOptions = Object.assign(new FindListOptions(), { elementsPerPage: 20 }); @@ -145,7 +145,7 @@ export class BitstreamFormatsComponent implements OnInit { * @param event The page change event */ onPageChange(event) { - this.config = Object.assign(new FindAllOptions(), this.config, { + this.config = Object.assign(new FindListOptions(), this.config, { currentPage: event, }); this.pageConfig.currentPage = event; diff --git a/src/app/core/cache/models/search-param.model.ts b/src/app/core/cache/models/search-param.model.ts index a33bbee5e6..3881dbe8b7 100644 --- a/src/app/core/cache/models/search-param.model.ts +++ b/src/app/core/cache/models/search-param.model.ts @@ -1,6 +1,6 @@ /** - * Class representing a query parameter (query?fieldName=fieldValue) used in FindAllOptions object + * Class representing a query parameter (query?fieldName=fieldValue) used in FindListOptions object */ export class SearchParam { constructor(public fieldName: string, public fieldValue: any) { diff --git a/src/app/core/config/config.service.spec.ts b/src/app/core/config/config.service.spec.ts index 87add6b656..402ee88b81 100644 --- a/src/app/core/config/config.service.spec.ts +++ b/src/app/core/config/config.service.spec.ts @@ -3,7 +3,7 @@ import { TestScheduler } from 'rxjs/testing'; import { getMockRequestService } from '../../shared/mocks/mock-request.service'; import { ConfigService } from './config.service'; import { RequestService } from '../data/request.service'; -import { ConfigRequest, FindAllOptions } from '../data/request.models'; +import { ConfigRequest, FindListOptions } from '../data/request.models'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service-stub'; @@ -27,7 +27,7 @@ describe('ConfigService', () => { let requestService: RequestService; let halService: any; - const findOptions: FindAllOptions = new FindAllOptions(); + const findOptions: FindListOptions = new FindListOptions(); const scopeName = 'traditional'; const scopeID = 'd9d30c0c-69b7-4369-8397-ca67c888974d'; diff --git a/src/app/core/config/config.service.ts b/src/app/core/config/config.service.ts index 340a7a97d6..db14c4a256 100644 --- a/src/app/core/config/config.service.ts +++ b/src/app/core/config/config.service.ts @@ -2,7 +2,7 @@ import { merge as observableMerge, Observable, throwError as observableThrowErro import { distinctUntilChanged, filter, map, mergeMap, tap } from 'rxjs/operators'; import { RequestService } from '../data/request.service'; import { ConfigSuccessResponse } from '../cache/response.models'; -import { ConfigRequest, FindAllOptions, RestRequest } from '../data/request.models'; +import { ConfigRequest, FindListOptions, RestRequest } from '../data/request.models'; import { hasValue, isNotEmpty } from '../../shared/empty.util'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { ConfigData } from './config-data'; @@ -35,7 +35,7 @@ export abstract class ConfigService { return `${endpoint}/${resourceName}`; } - protected getConfigSearchHref(endpoint, options: FindAllOptions = {}): string { + protected getConfigSearchHref(endpoint, options: FindListOptions = {}): string { let result; const args = []; @@ -93,7 +93,7 @@ export abstract class ConfigService { distinctUntilChanged()); } - public getConfigBySearch(options: FindAllOptions = {}): Observable { + public getConfigBySearch(options: FindListOptions = {}): Observable { return this.halService.getEndpoint(this.linkPath).pipe( map((endpoint: string) => this.getConfigSearchHref(endpoint, options)), filter((href: string) => isNotEmpty(href)), diff --git a/src/app/core/data/bitstream-format-data.service.ts b/src/app/core/data/bitstream-format-data.service.ts index bdf9b16acf..7255ed3663 100644 --- a/src/app/core/data/bitstream-format-data.service.ts +++ b/src/app/core/data/bitstream-format-data.service.ts @@ -11,7 +11,7 @@ import { HALEndpointService } from '../shared/hal-endpoint.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { HttpClient } from '@angular/common/http'; import { DefaultChangeAnalyzer } from './default-change-analyzer.service'; -import { DeleteByIDRequest, FindAllOptions, PostRequest, PutRequest } from './request.models'; +import { DeleteByIDRequest, FindListOptions, PostRequest, PutRequest } from './request.models'; import { Observable } from 'rxjs'; import { find, map, tap } from 'rxjs/operators'; import { configureRequest, getResponseFromEntry } from '../shared/operators'; @@ -54,10 +54,10 @@ export class BitstreamFormatDataService extends DataService { /** * Get the endpoint for browsing bitstream formats - * @param {FindAllOptions} options + * @param {FindListOptions} options * @returns {Observable} */ - getBrowseEndpoint(options: FindAllOptions = {}, linkPath?: string): Observable { + getBrowseEndpoint(options: FindListOptions = {}, linkPath?: string): Observable { return this.halService.getEndpoint(this.linkPath); } diff --git a/src/app/core/data/collection-data.service.ts b/src/app/core/data/collection-data.service.ts index 7ec31d8970..88cc80a9a8 100644 --- a/src/app/core/data/collection-data.service.ts +++ b/src/app/core/data/collection-data.service.ts @@ -16,7 +16,7 @@ import { HttpClient } from '@angular/common/http'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { DSOChangeAnalyzer } from './dso-change-analyzer.service'; import { Observable } from 'rxjs/internal/Observable'; -import { FindAllOptions, GetRequest } from './request.models'; +import { FindListOptions, GetRequest } from './request.models'; import { RemoteData } from './remote-data'; import { PaginatedList } from './paginated-list'; import { configureRequest } from '../shared/operators'; @@ -50,11 +50,11 @@ export class CollectionDataService extends ComColDataService { /** * Get all collections the user is authorized to submit to * - * @param options The [[FindAllOptions]] object + * @param options The [[FindListOptions]] object * @return Observable>> * collection list */ - getAuthorizedCollection(options: FindAllOptions = {}): Observable>> { + getAuthorizedCollection(options: FindListOptions = {}): Observable>> { const searchHref = 'findAuthorized'; return this.searchBy(searchHref, options).pipe( @@ -65,11 +65,11 @@ export class CollectionDataService extends ComColDataService { * Get all collections the user is authorized to submit to, by community * * @param communityId The community id - * @param options The [[FindAllOptions]] object + * @param options The [[FindListOptions]] object * @return Observable>> * collection list */ - getAuthorizedCollectionByCommunity(communityId: string, options: FindAllOptions = {}): Observable>> { + getAuthorizedCollectionByCommunity(communityId: string, options: FindListOptions = {}): Observable>> { const searchHref = 'findAuthorizedByCommunity'; options.searchParams = [new SearchParam('uuid', communityId)]; @@ -85,7 +85,7 @@ export class CollectionDataService extends ComColDataService { */ hasAuthorizedCollection(): Observable { const searchHref = 'findAuthorized'; - const options = new FindAllOptions(); + const options = new FindListOptions(); options.elementsPerPage = 1; return this.searchBy(searchHref, options).pipe( diff --git a/src/app/core/data/comcol-data.service.spec.ts b/src/app/core/data/comcol-data.service.spec.ts index 5cc474dff9..ffefbba6f6 100644 --- a/src/app/core/data/comcol-data.service.spec.ts +++ b/src/app/core/data/comcol-data.service.spec.ts @@ -8,7 +8,7 @@ import { ObjectCacheService } from '../cache/object-cache.service'; import { CoreState } from '../core.reducers'; import { ComColDataService } from './comcol-data.service'; import { CommunityDataService } from './community-data.service'; -import { FindAllOptions, FindByIDRequest } from './request.models'; +import { FindListOptions, FindByIDRequest } from './request.models'; import { RequestService } from './request.service'; import { NormalizedObject } from '../cache/models/normalized-object.model'; import { HALEndpointService } from '../shared/hal-endpoint.service'; @@ -66,7 +66,7 @@ describe('ComColDataService', () => { const dataBuildService = {} as NormalizedObjectBuildService; const scopeID = 'd9d30c0c-69b7-4369-8397-ca67c888974d'; - const options = Object.assign(new FindAllOptions(), { + const options = Object.assign(new FindListOptions(), { scopeID: scopeID }); const getRequestEntry$ = (successful: boolean) => { diff --git a/src/app/core/data/comcol-data.service.ts b/src/app/core/data/comcol-data.service.ts index 68eb3e4880..62e2acfa87 100644 --- a/src/app/core/data/comcol-data.service.ts +++ b/src/app/core/data/comcol-data.service.ts @@ -6,7 +6,7 @@ import { ObjectCacheService } from '../cache/object-cache.service'; import { CommunityDataService } from './community-data.service'; import { DataService } from './data.service'; -import { FindAllOptions, FindByIDRequest } from './request.models'; +import { FindListOptions, FindByIDRequest } from './request.models'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { getResponseFromEntry } from '../shared/operators'; import { CacheableObject } from '../cache/object-cache.reducer'; @@ -26,7 +26,7 @@ export abstract class ComColDataService extends DataS * @return { Observable } * an Observable containing the scoped URL */ - public getBrowseEndpoint(options: FindAllOptions = {}, linkPath: string = this.linkPath): Observable { + public getBrowseEndpoint(options: FindListOptions = {}, linkPath: string = this.linkPath): Observable { if (isEmpty(options.scopeID)) { return this.halService.getEndpoint(linkPath); } else { diff --git a/src/app/core/data/community-data.service.ts b/src/app/core/data/community-data.service.ts index f29c3c8833..1e3875edd4 100644 --- a/src/app/core/data/community-data.service.ts +++ b/src/app/core/data/community-data.service.ts @@ -9,7 +9,7 @@ import { Community } from '../shared/community.model'; import { ComColDataService } from './comcol-data.service'; import { RequestService } from './request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; -import { FindAllOptions, FindAllRequest } from './request.models'; +import { FindListOptions, FindAllRequest } from './request.models'; import { RemoteData } from './remote-data'; import { hasValue } from '../../shared/empty.util'; import { Observable } from 'rxjs'; @@ -44,7 +44,7 @@ export class CommunityDataService extends ComColDataService { return this.halService.getEndpoint(this.linkPath); } - findTop(options: FindAllOptions = {}): Observable>> { + findTop(options: FindListOptions = {}): Observable>> { const hrefObs = this.getFindAllHref(options, this.topLinkPath); hrefObs.pipe( filter((href: string) => hasValue(href)), @@ -57,7 +57,7 @@ export class CommunityDataService extends ComColDataService { return this.rdbService.buildList(hrefObs) as Observable>>; } - findSubCommunitiesPerParentCommunity(parentCommunityUUID: string, options: FindAllOptions = {}): Observable>> { + findSubCommunitiesPerParentCommunity(parentCommunityUUID: string, options: FindListOptions = {}): Observable>> { const hrefObs = this.getFindAllHref(options, this.subcommunitiesLinkPath + '?parent=' + parentCommunityUUID); console.log('subcomurl', hrefObs.pipe(take(1)).subscribe((val) => console.log('subcomurl', val))); diff --git a/src/app/core/data/data.service.spec.ts b/src/app/core/data/data.service.spec.ts index ab3cf0ac16..f2f10eff35 100644 --- a/src/app/core/data/data.service.spec.ts +++ b/src/app/core/data/data.service.spec.ts @@ -6,7 +6,7 @@ import { CoreState } from '../core.reducers'; import { Store } from '@ngrx/store'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { Observable, of as observableOf } from 'rxjs'; -import { FindAllOptions } from './request.models'; +import { FindListOptions } from './request.models'; import { SortDirection, SortOptions } from '../cache/models/sort-options.model'; import { ObjectCacheService } from '../cache/object-cache.service'; import { compare, Operation } from 'fast-json-patch'; @@ -40,7 +40,7 @@ class TestService extends DataService { super(); } - public getBrowseEndpoint(options: FindAllOptions = {}, linkPath: string = this.linkPath): Observable { + public getBrowseEndpoint(options: FindListOptions = {}, linkPath: string = this.linkPath): Observable { return observableOf(endpoint); } } @@ -53,7 +53,7 @@ class DummyChangeAnalyzer implements ChangeAnalyzer { } describe('DataService', () => { let service: TestService; - let options: FindAllOptions; + let options: FindListOptions; const requestService = {} as RequestService; const halService = {} as HALEndpointService; const rdbService = {} as RemoteDataBuildService; diff --git a/src/app/core/data/data.service.ts b/src/app/core/data/data.service.ts index bbfcde2677..69b2cdfcb5 100644 --- a/src/app/core/data/data.service.ts +++ b/src/app/core/data/data.service.ts @@ -14,7 +14,7 @@ import { RemoteData } from './remote-data'; import { CreateRequest, DeleteByIDRequest, - FindAllOptions, + FindListOptions, FindAllRequest, FindByIDRequest, GetRequest @@ -54,17 +54,17 @@ export abstract class DataService { */ protected responseMsToLive: number; - public abstract getBrowseEndpoint(options: FindAllOptions, linkPath?: string): Observable + public abstract getBrowseEndpoint(options: FindListOptions, linkPath?: string): Observable /** * Create the HREF with given options object * - * @param options The [[FindAllOptions]] object + * @param options The [[FindListOptions]] object * @param linkPath The link path for the object * @return {Observable} * Return an observable that emits created HREF */ - protected getFindAllHref(options: FindAllOptions = {}, linkPath?: string): Observable { + protected getFindAllHref(options: FindListOptions = {}, linkPath?: string): Observable { let result: Observable; const args = []; @@ -77,11 +77,11 @@ export abstract class DataService { * Create the HREF for a specific object's search method with given options object * * @param searchMethod The search method for the object - * @param options The [[FindAllOptions]] object + * @param options The [[FindListOptions]] object * @return {Observable} * Return an observable that emits created HREF */ - protected getSearchByHref(searchMethod: string, options: FindAllOptions = {}): Observable { + protected getSearchByHref(searchMethod: string, options: FindListOptions = {}): Observable { let result: Observable; const args = []; @@ -101,11 +101,11 @@ export abstract class DataService { * * @param href$ The HREF to which the query string should be appended * @param args Array with additional params to combine with query string - * @param options The [[FindAllOptions]] object + * @param options The [[FindListOptions]] object * @return {Observable} * Return an observable that emits created HREF */ - protected buildHrefFromFindOptions(href$: Observable, args: string[], options: FindAllOptions): Observable { + protected buildHrefFromFindOptions(href$: Observable, args: string[], options: FindListOptions): Observable { if (hasValue(options.currentPage) && typeof options.currentPage === 'number') { /* TODO: this is a temporary fix for the pagination start index (0 or 1) discrepancy between the rest and the frontend respectively */ @@ -127,7 +127,7 @@ export abstract class DataService { } } - findAll(options: FindAllOptions = {}): Observable>> { + findAll(options: FindListOptions = {}): Observable>> { const hrefObs = this.getFindAllHref(options); hrefObs.pipe( @@ -194,11 +194,11 @@ export abstract class DataService { * Make a new FindAllRequest with given search method * * @param searchMethod The search method for the object - * @param options The [[FindAllOptions]] object + * @param options The [[FindListOptions]] object * @return {Observable>} * Return an observable that emits response from the server */ - protected searchBy(searchMethod: string, options: FindAllOptions = {}): Observable>> { + protected searchBy(searchMethod: string, options: FindListOptions = {}): Observable>> { const hrefObs = this.getSearchByHref(searchMethod, options); diff --git a/src/app/core/data/dspace-object-data.service.ts b/src/app/core/data/dspace-object-data.service.ts index bb02afbcd1..002ac3cdbc 100644 --- a/src/app/core/data/dspace-object-data.service.ts +++ b/src/app/core/data/dspace-object-data.service.ts @@ -8,7 +8,7 @@ import { HALEndpointService } from '../shared/hal-endpoint.service'; import { DataService } from './data.service'; import { RemoteData } from './remote-data'; import { RequestService } from './request.service'; -import { FindAllOptions } from './request.models'; +import { FindListOptions } from './request.models'; import { ObjectCacheService } from '../cache/object-cache.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { HttpClient } from '@angular/common/http'; @@ -32,7 +32,7 @@ class DataServiceImpl extends DataService { super(); } - getBrowseEndpoint(options: FindAllOptions = {}, linkPath: string = this.linkPath): Observable { + getBrowseEndpoint(options: FindListOptions = {}, linkPath: string = this.linkPath): Observable { return this.halService.getEndpoint(linkPath); } diff --git a/src/app/core/data/item-data.service.spec.ts b/src/app/core/data/item-data.service.spec.ts index 36b8e6b3c5..44c5f48cfe 100644 --- a/src/app/core/data/item-data.service.spec.ts +++ b/src/app/core/data/item-data.service.spec.ts @@ -2,14 +2,13 @@ import { Store } from '@ngrx/store'; import { cold, getTestScheduler } from 'jasmine-marbles'; import { TestScheduler } from 'rxjs/testing'; import { BrowseService } from '../browse/browse.service'; -import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service'; import { CoreState } from '../core.reducers'; import { ItemDataService } from './item-data.service'; import { RequestService } from './request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { DeleteRequest, - FindAllOptions, + FindListOptions, GetRequest, MappedCollectionsRequest, PostRequest, @@ -58,7 +57,7 @@ describe('ItemDataService', () => { } as HALEndpointService; const scopeID = '4af28e99-6a9c-4036-a199-e1b587046d39'; - const options = Object.assign(new FindAllOptions(), { + const options = Object.assign(new FindListOptions(), { scopeID: scopeID, sort: { field: '', diff --git a/src/app/core/data/item-data.service.ts b/src/app/core/data/item-data.service.ts index e616cb8020..affcae619c 100644 --- a/src/app/core/data/item-data.service.ts +++ b/src/app/core/data/item-data.service.ts @@ -14,7 +14,7 @@ import { RequestService } from './request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { DeleteRequest, - FindAllOptions, + FindListOptions, MappedCollectionsRequest, PatchRequest, PostRequest, PutRequest, @@ -59,10 +59,10 @@ export class ItemDataService extends DataService { /** * Get the endpoint for browsing items * (When options.sort.field is empty, the default field to browse by will be 'dc.date.issued') - * @param {FindAllOptions} options + * @param {FindListOptions} options * @returns {Observable} */ - public getBrowseEndpoint(options: FindAllOptions = {}, linkPath: string = this.linkPath): Observable { + public getBrowseEndpoint(options: FindListOptions = {}, linkPath: string = this.linkPath): Observable { let field = 'dc.date.issued'; if (options.sort && options.sort.field) { field = options.sort.field; diff --git a/src/app/core/data/metadata-schema-data.service.ts b/src/app/core/data/metadata-schema-data.service.ts index b15dd6865f..662eaa6c7c 100644 --- a/src/app/core/data/metadata-schema-data.service.ts +++ b/src/app/core/data/metadata-schema-data.service.ts @@ -7,7 +7,7 @@ import { CoreState } from '../core.reducers'; import { DataService } from './data.service'; import { RequestService } from './request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; -import { FindAllOptions } from './request.models'; +import { FindListOptions } from './request.models'; import { ObjectCacheService } from '../cache/object-cache.service'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { HttpClient } from '@angular/common/http'; @@ -33,7 +33,7 @@ class DataServiceImpl extends DataService { super(); } - getBrowseEndpoint(options: FindAllOptions = {}, linkPath: string = this.linkPath): Observable { + getBrowseEndpoint(options: FindListOptions = {}, linkPath: string = this.linkPath): Observable { return this.halService.getEndpoint(linkPath); } } diff --git a/src/app/core/data/request.models.ts b/src/app/core/data/request.models.ts index a7d11089df..6396d7a374 100644 --- a/src/app/core/data/request.models.ts +++ b/src/app/core/data/request.models.ts @@ -138,7 +138,7 @@ export class FindByIDRequest extends GetRequest { } } -export class FindAllOptions { +export class FindListOptions { scopeID?: string; elementsPerPage?: number; currentPage?: number; @@ -151,7 +151,7 @@ export class FindAllRequest extends GetRequest { constructor( uuid: string, href: string, - public body?: FindAllOptions, + public body?: FindListOptions, ) { super(uuid, href); } diff --git a/src/app/core/data/resource-policy.service.ts b/src/app/core/data/resource-policy.service.ts index 1574111232..017e5cf5ee 100644 --- a/src/app/core/data/resource-policy.service.ts +++ b/src/app/core/data/resource-policy.service.ts @@ -6,7 +6,7 @@ import { Observable } from 'rxjs'; import { DataService } from '../data/data.service'; import { RequestService } from '../data/request.service'; -import { FindAllOptions } from '../data/request.models'; +import { FindListOptions } from '../data/request.models'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { ResourcePolicy } from '../shared/resource-policy.model'; import { RemoteData } from '../data/remote-data'; @@ -36,7 +36,7 @@ class DataServiceImpl extends DataService { super(); } - getBrowseEndpoint(options: FindAllOptions = {}, linkPath: string = this.linkPath): Observable { + getBrowseEndpoint(options: FindListOptions = {}, linkPath: string = this.linkPath): Observable { return this.halService.getEndpoint(linkPath); } } diff --git a/src/app/core/eperson/eperson.service.ts b/src/app/core/eperson/eperson.service.ts index 70ecf3f59e..81ae532e3b 100644 --- a/src/app/core/eperson/eperson.service.ts +++ b/src/app/core/eperson/eperson.service.ts @@ -1,5 +1,5 @@ import { Observable } from 'rxjs'; -import { FindAllOptions } from '../data/request.models'; +import { FindListOptions } from '../data/request.models'; import { DataService } from '../data/data.service'; import { CacheableObject } from '../cache/object-cache.reducer'; @@ -8,7 +8,7 @@ import { CacheableObject } from '../cache/object-cache.reducer'; */ export abstract class EpersonService extends DataService { - public getBrowseEndpoint(options: FindAllOptions): Observable { + public getBrowseEndpoint(options: FindListOptions): Observable { return this.halService.getEndpoint(this.linkPath); } } diff --git a/src/app/core/eperson/group-eperson.service.ts b/src/app/core/eperson/group-eperson.service.ts index 2014e6120a..c8a2a78917 100644 --- a/src/app/core/eperson/group-eperson.service.ts +++ b/src/app/core/eperson/group-eperson.service.ts @@ -7,7 +7,7 @@ import { filter, map, take } from 'rxjs/operators'; import { EpersonService } from './eperson.service'; import { RequestService } from '../data/request.service'; -import { FindAllOptions } from '../data/request.models'; +import { FindListOptions } from '../data/request.models'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { Group } from './models/group.model'; import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service'; @@ -52,7 +52,7 @@ export class GroupEpersonService extends EpersonService { */ isMemberOf(groupName: string): Observable { const searchHref = 'isMemberOf'; - const options = new FindAllOptions(); + const options = new FindListOptions(); options.searchParams = [new SearchParam('groupName', groupName)]; return this.searchBy(searchHref, options).pipe( diff --git a/src/app/core/submission/workflowitem-data.service.ts b/src/app/core/submission/workflowitem-data.service.ts index 43c4aecafe..47195ed0a1 100644 --- a/src/app/core/submission/workflowitem-data.service.ts +++ b/src/app/core/submission/workflowitem-data.service.ts @@ -8,7 +8,7 @@ import { DataService } from '../data/data.service'; import { RequestService } from '../data/request.service'; import { WorkflowItem } from './models/workflowitem.model'; import { HALEndpointService } from '../shared/hal-endpoint.service'; -import { FindAllOptions } from '../data/request.models'; +import { FindListOptions } from '../data/request.models'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { ObjectCacheService } from '../cache/object-cache.service'; @@ -35,7 +35,7 @@ export class WorkflowItemDataService extends DataService { super(); } - public getBrowseEndpoint(options: FindAllOptions) { + public getBrowseEndpoint(options: FindListOptions) { return this.halService.getEndpoint(this.linkPath); } diff --git a/src/app/core/submission/workspaceitem-data.service.ts b/src/app/core/submission/workspaceitem-data.service.ts index 4d388ec513..3f782b74a2 100644 --- a/src/app/core/submission/workspaceitem-data.service.ts +++ b/src/app/core/submission/workspaceitem-data.service.ts @@ -7,7 +7,7 @@ import { CoreState } from '../core.reducers'; import { DataService } from '../data/data.service'; import { RequestService } from '../data/request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; -import { FindAllOptions } from '../data/request.models'; +import { FindListOptions } from '../data/request.models'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { ObjectCacheService } from '../cache/object-cache.service'; @@ -35,7 +35,7 @@ export class WorkspaceitemDataService extends DataService { super(); } - public getBrowseEndpoint(options: FindAllOptions) { + public getBrowseEndpoint(options: FindListOptions) { return this.halService.getEndpoint(this.linkPath); } diff --git a/src/app/core/tasks/tasks.service.ts b/src/app/core/tasks/tasks.service.ts index f39b144c6a..cf23bfd74b 100644 --- a/src/app/core/tasks/tasks.service.ts +++ b/src/app/core/tasks/tasks.service.ts @@ -4,7 +4,7 @@ import { merge as observableMerge, Observable, of as observableOf } from 'rxjs'; import { distinctUntilChanged, filter, flatMap, map, mergeMap, tap } from 'rxjs/operators'; import { DataService } from '../data/data.service'; -import { DeleteRequest, FindAllOptions, PostRequest, TaskDeleteRequest, TaskPostRequest } from '../data/request.models'; +import { DeleteRequest, FindListOptions, PostRequest, TaskDeleteRequest, TaskPostRequest } from '../data/request.models'; import { isNotEmpty } from '../../shared/empty.util'; import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service'; import { ProcessTaskResponse } from './models/process-task-response'; @@ -18,7 +18,7 @@ import { CacheableObject } from '../cache/object-cache.reducer'; */ export abstract class TasksService extends DataService { - public getBrowseEndpoint(options: FindAllOptions): Observable { + public getBrowseEndpoint(options: FindListOptions): Observable { return this.halService.getEndpoint(this.linkPath); } diff --git a/src/app/submission/form/collection/submission-form-collection.component.ts b/src/app/submission/form/collection/submission-form-collection.component.ts index 79d2f2a7bc..f84764d6a4 100644 --- a/src/app/submission/form/collection/submission-form-collection.component.ts +++ b/src/app/submission/form/collection/submission-form-collection.component.ts @@ -36,7 +36,7 @@ import { SubmissionService } from '../../submission.service'; import { SubmissionObject } from '../../../core/submission/models/submission-object.model'; import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service'; import { CollectionDataService } from '../../../core/data/collection-data.service'; -import { FindAllOptions } from '../../../core/data/request.models'; +import { FindListOptions } from '../../../core/data/request.models'; /** * An interface to represent a collection entry @@ -205,7 +205,7 @@ export class SubmissionFormCollectionComponent implements OnChanges, OnInit { map((collectionRD: RemoteData) => collectionRD.payload.name) ); - const findOptions: FindAllOptions = { + const findOptions: FindListOptions = { elementsPerPage: 1000 };