External source items import code completed

This commit is contained in:
Matteo Perelli
2020-06-22 19:59:10 +02:00
parent 63cff331d2
commit e7ef9dab20
8 changed files with 213 additions and 24 deletions

View File

@@ -11,7 +11,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
import { HttpClient } from '@angular/common/http';
import { FindListOptions, GetRequest } from './request.models';
import { Observable } from 'rxjs/internal/Observable';
import { distinctUntilChanged, map, switchMap, take, flatMap } from 'rxjs/operators';
import { distinctUntilChanged, map, switchMap, take, flatMap, catchError } from 'rxjs/operators';
import { PaginatedSearchOptions } from '../../shared/search/paginated-search-options.model';
import { hasValue, isNotEmptyOperator } from '../../shared/empty.util';
import { configureRequest } from '../shared/operators';
@@ -60,6 +60,20 @@ export class ExternalSourceService extends DataService<ExternalSource> {
);
}
/**
* Return a single external source.
*
* @param id
* The external source id.
* @param linksToFollow
* List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved.
* @return Observable<RemoteData<ExternalSource>>
* The list of the external sources.
*/
getExternalSource(id: string, ...linksToFollow: Array<FollowLinkConfig<ExternalSource>>): Observable<RemoteData<ExternalSource>> {
return this.findById(id, ...linksToFollow);
}
/**
* Return the list of external sources.
*