blob: 0072196f261664fa188f395d329afdd4e27aa6d4 [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001import {Injectable} from "@angular/core";
2import {ILevelNodeInfo} from "./models/basic.model.info";
3import {VnfModelInfo} from "./models/vnf/vnf.model.info";
4import {NetworkModelInfo} from "./models/network/network.model.info";
5import {ConfigurationModelInfo} from "./models/configuration/configuration.model.info";
6import {DefaultDataGeneratorService} from "../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
7import {DynamicInputsService} from "./dynamicInputs.service";
8import {SharedTreeService} from "./shared.tree.service";
9import {NgRedux} from "@angular-redux/store";
10import {AppState} from "../../../shared/store/reducers";
11import {DialogService} from "ng2-bootstrap-modal";
12import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
13import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
14import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
15import {VnfGroupingModelInfo} from "./models/vnfGrouping/vnfGrouping.model.info";
16import {VnfGroupPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service";
17import {DuplicateService} from "../duplicate/duplicate.service";
18import {SdcUiServices} from "onap-ui-angular";
19import {IframeService} from "../../../shared/utils/iframe.service";
20import {ComponentInfoService} from "../component-info/component-info.service";
Ittay Sternf7926712019-07-07 19:23:03 +030021import {PnfModelInfo} from "./models/pnf/pnf.model.info";
22import {CollectionResourceModelInfo} from "./models/collectionResource/collectionResource.model.info";
23import {AaiService} from "../../../shared/services/aaiService/aai.service";
24import {VrfModelInfo} from "./models/vrf/vrf.model.info";
25import {NetworkStepService} from "./models/vrf/vrfModal/networkStep/network.step.service";
26import {VpnStepService} from "./models/vrf/vrfModal/vpnStep/vpn.step.service";
Ittay Stern6f900cc2018-08-29 17:01:32 +030027
28@Injectable()
29export 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 Sternf7926712019-07-07 19:23:03 +030042 private _networkStepService : NetworkStepService,
43 private _vpnStepService : VpnStepService,
44 private _aaiService : AaiService,
Ittay Stern6f900cc2018-08-29 17:01:32 +030045 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 Sternf7926712019-07-07 19:23:03 +030057 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 Stern6f900cc2018-08-29 17:01:32 +030060 new ConfigurationModelInfo(this._dynamicInputsService, this._sharedTreeService),
Ittay Sternf7926712019-07-07 19:23:03 +030061 new VnfGroupingModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._vnfGroupPopupService, this._iframeService, this._aaiService, this._store)];
Ittay Stern6f900cc2018-08-29 17:01:32 +030062 };
63}