Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 1 | import {Injectable} from "@angular/core"; |
| 2 | import {ILevelNodeInfo} from "./models/basic.model.info"; |
| 3 | import {VnfModelInfo} from "./models/vnf/vnf.model.info"; |
| 4 | import {NetworkModelInfo} from "./models/network/network.model.info"; |
| 5 | import {ConfigurationModelInfo} from "./models/configuration/configuration.model.info"; |
| 6 | import {DefaultDataGeneratorService} from "../../../shared/services/defaultDataServiceGenerator/default.data.generator.service"; |
| 7 | import {DynamicInputsService} from "./dynamicInputs.service"; |
| 8 | import {SharedTreeService} from "./shared.tree.service"; |
| 9 | import {NgRedux} from "@angular-redux/store"; |
| 10 | import {AppState} from "../../../shared/store/reducers"; |
| 11 | import {DialogService} from "ng2-bootstrap-modal"; |
| 12 | import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service"; |
| 13 | import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service"; |
| 14 | import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service"; |
| 15 | import {VnfGroupingModelInfo} from "./models/vnfGrouping/vnfGrouping.model.info"; |
| 16 | import {VnfGroupPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service"; |
| 17 | import {DuplicateService} from "../duplicate/duplicate.service"; |
| 18 | import {SdcUiServices} from "onap-ui-angular"; |
| 19 | import {IframeService} from "../../../shared/utils/iframe.service"; |
| 20 | import {ComponentInfoService} from "../component-info/component-info.service"; |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame^] | 21 | import {PnfModelInfo} from "./models/pnf/pnf.model.info"; |
| 22 | import {CollectionResourceModelInfo} from "./models/collectionResource/collectionResource.model.info"; |
| 23 | import {AaiService} from "../../../shared/services/aaiService/aai.service"; |
| 24 | import {VrfModelInfo} from "./models/vrf/vrf.model.info"; |
| 25 | import {NetworkStepService} from "./models/vrf/vrfModal/networkStep/network.step.service"; |
| 26 | import {VpnStepService} from "./models/vrf/vrfModal/vpnStep/vpn.step.service"; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 27 | |
| 28 | @Injectable() |
| 29 | export class ObjectToTreeService { |
| 30 | constructor(private _defaultDataGeneratorService: DefaultDataGeneratorService, |
| 31 | private _dynamicInputsService: DynamicInputsService, |
| 32 | private _sharedTreeService : SharedTreeService, |
| 33 | private _dialogService : DialogService, |
| 34 | private _vnfPopupService : VnfPopupService, |
| 35 | private _networkPopupService : NetworkPopupService, |
| 36 | private _vfModulePopupService : VfModulePopuopService, |
| 37 | private _vnfGroupPopupService : VnfGroupPopupService, |
| 38 | private _duplicateService : DuplicateService, |
| 39 | private _modalService: SdcUiServices.ModalService, |
| 40 | private _iframeService : IframeService, |
| 41 | private _componentInfoService : ComponentInfoService, |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame^] | 42 | private _networkStepService : NetworkStepService, |
| 43 | private _vpnStepService : VpnStepService, |
| 44 | private _aaiService : AaiService, |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 45 | private _store : NgRedux<AppState>) { |
| 46 | } |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | /*********************************************************** |
| 52 | * return all first optional first level of the model tree |
| 53 | ************************************************************/ |
| 54 | getFirstLevelOptions(): ILevelNodeInfo[] { |
| 55 | return [new VnfModelInfo(this._dynamicInputsService, this._sharedTreeService, this._defaultDataGeneratorService, this._dialogService, this._vnfPopupService, this._vfModulePopupService, this._duplicateService, this._modalService, this._iframeService, this._componentInfoService, this._store) |
| 56 | , new NetworkModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._networkPopupService, this._duplicateService, this._modalService, this._iframeService, this._store), |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame^] | 57 | new PnfModelInfo(), |
| 58 | new VrfModelInfo(this._store, this._sharedTreeService, this._dialogService, this._iframeService, this._networkStepService, this._vpnStepService), |
| 59 | new CollectionResourceModelInfo(this._store, this._sharedTreeService), |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 60 | new ConfigurationModelInfo(this._dynamicInputsService, this._sharedTreeService), |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame^] | 61 | new VnfGroupingModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._vnfGroupPopupService, this._iframeService, this._aaiService, this._store)]; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 62 | }; |
| 63 | } |