import { WebLinks } from "./weblinks" ; import { Build } from "../bll/entities/build" ; import { TYPES } from "../bll/utils/constants" ; import { XmlParser } from "../bll/utils/xmlparser" ; import { inject , injectable } from "inversify" ; @ injectable ( ) export class BuildDao { private webLinks : WebLinks ; private xmlParser : XmlParser ; constructor ( @ inject ( TYPES . WebLinks ) webLinks , @ inject ( TYPES . XmlParser ) xmlParser ) { this . webLinks = webLinks ; this . xmlParser = xmlParser ; } public async getById ( id ) { const buildXml = await this . webLinks . getBuildInfo ( id ) ; return await this . xmlParser . parseRestBuild ( buildXml ) ; } }