member_webapp/src/packages/sensor-item/service/sensor-item-dependency.service.ts

30 lines
917 B
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { RPCService } from '@loafer/ng-rpc/service';
import { SensorItemDependency } from '../model/SensorItemDependency';
import { MetaSensorItemKey } from 'packages/meta/sensor-item-key/model/MetaSensorItemKey';
import { MetaSensorDisplayItem } from '../../meta/sensor-display-item/model/MetaSensorDisplayItem';
@Injectable()
export class SensorItemDependencyService {
public constructor(
private rpcService: RPCService,
) {
}
public regist(dependency: SensorItemDependency): Observable<SensorItemDependency> {
return this.rpcService.call('SensorItemDependencyService.regist', dependency);
}
public readAllByDisplayItem(displayItem: MetaSensorDisplayItem): Observable<MetaSensorItemKey[]> {
return this.rpcService.call('SensorItemDependencyService.readAllByDisplayItem', displayItem);
}
}