member_webapp/src/packages/sensor-item/service/sensor-item-dependency.service.ts
2018-04-06 20:02:18 +09:00

30 lines
917 B
TypeScript

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);
}
}