Merge "Resource dictionary- updated license text"
[ccsdk/cds.git] / cds-ui / server / src / services / blueprint.service.ts
1 import {getService} from '@loopback/service-proxy';
2 import {inject, Provider} from '@loopback/core';
3 import {BlueprintDataSource} from '../datasources';
4
5 export interface BlueprintService {
6    getAllblueprints(): Promise<any>;
7 }
8
9 export class BlueprintServiceProvider implements Provider<BlueprintService> {
10   constructor(
11     // blueprint must match the name property in the datasource json file
12     @inject('datasources.blueprint')
13     protected dataSource: BlueprintDataSource = new BlueprintDataSource(),
14   ) {}
15
16   value(): Promise<BlueprintService> {
17     return getService(this.dataSource);
18   }
19 }