Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #509 from atmire/w2p-65572_Add-support-for-bundles
Add support for bundles
- Loading branch information
Showing
67 changed files
with
278 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { DataService } from './data.service'; | ||
import { Bundle } from '../shared/bundle.model'; | ||
import { RequestService } from './request.service'; | ||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service'; | ||
import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; | ||
import { Store } from '@ngrx/store'; | ||
import { CoreState } from '../core.reducers'; | ||
import { ObjectCacheService } from '../cache/object-cache.service'; | ||
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 { FindAllOptions } from './request.models'; | ||
import { Observable } from 'rxjs/internal/Observable'; | ||
|
||
/** | ||
* A service responsible for fetching/sending data from/to the REST API on the bundles endpoint | ||
*/ | ||
@Injectable() | ||
export class BundleDataService extends DataService<Bundle> { | ||
protected linkPath = 'bundles'; | ||
protected forceBypassCache = false; | ||
|
||
constructor( | ||
protected requestService: RequestService, | ||
protected rdbService: RemoteDataBuildService, | ||
protected dataBuildService: NormalizedObjectBuildService, | ||
protected store: Store<CoreState>, | ||
protected objectCache: ObjectCacheService, | ||
protected halService: HALEndpointService, | ||
protected notificationsService: NotificationsService, | ||
protected http: HttpClient, | ||
protected comparator: DefaultChangeAnalyzer<Bundle>) { | ||
super(); | ||
} | ||
|
||
/** | ||
* Get the endpoint for browsing bundles | ||
* @param {FindAllOptions} options | ||
* @returns {Observable<string>} | ||
*/ | ||
getBrowseEndpoint(options: FindAllOptions = {}, linkPath?: string): Observable<string> { | ||
return this.halService.getEndpoint(this.linkPath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.