package Ġcom . tester um . web _ backend . services . steps . builder Ċ Ċ import Ġcom . tester um . model . infrastructure . path . Has Path Ċ import Ġcom . tester um . model . infrastructure . path . Path Ċ import Ġcom . tester um . model . step . Comp osed Step Def Ċ import Ġcom . tester um . model . step . tree . Comp osed Container Step Node Ċ import Ġcom . tester um . model . step . tree . Comp osed Step Step Node Ċ import Ġcom . tester um . model . util . new _ tree _ builder . Container TreeNode Ċ import Ġcom . tester um . model . util . new _ tree _ builder . Path Based Tree Builder Ċ import Ġcom . tester um . model . util . new _ tree _ builder . TreeNode Ċ import Ġcom . tester um . model . util . new _ tree _ builder . TreeNode Factory Ċ import Ġcom . tester um . web _ backend . services . steps . Comp osed Step Update Compatibility Frontend Service Ċ Ċ class ĠComp osed Step Tree Builder ( private Ġval Ġcomposed Step Update Compatibility Frontend Service : ĠComp osed Step Update Compatibility Frontend Service ) Ġ{ ĊĊĠĠĠ Ġfun Ġcreate Tree ( items : ĠList < Comp osed Step Def >): ĠComp osed Container Step Node Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcomposed Steps Tree Builder Ġ= ĠPath Based Tree Builder ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠComp osed Steps TreeNode Factory ( composed Step Update Compatibility Frontend Service ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġreturn Ġcomposed Steps Tree Builder . create Tree ( items ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ private Ġclass ĠComp osed Steps TreeNode Factory ( private Ġval Ġcomposed Step Update Compatibility Frontend Service : ĠComp osed Step Update Compatibility Frontend Service ) Ġ: ĠTreeNode Factory < Comp osed Container Step Node , ĠComp osed Container Step Node > Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġcreate Root Node ( item : ĠHas Path ?): ĠComp osed Container Step Node Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠComp osed Container Step Node ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpath Ġ= ĠPath . EMPTY , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= Ġ" Comp osed ĠSteps " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Virtual Container ( parentNode : ĠContainer TreeNode , Ġpath : ĠPath ): ĠComp osed Container Step Node Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠComp osed Container Step Node ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpath Ġ= Ġpath , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= Ġpath . directories . last () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Node ( parentNode : ĠContainer TreeNode , Ġitem : ĠHas Path ): ĠTreeNode Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġitem As Comp osed Step Def Ġ= Ġitem Ġas ? ĠComp osed Step Def ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ?: Ġthrow ĠIllegalArgumentException (" at tempted Ġto Ġadd Ġchild Ġnode Ġof Ġunexpected Ġtype Ġ[ ${ item . java Class } ]: Ġ[$ item ]") ĊĊĠĠĠĠĠĠĠ Ġreturn ĠComp osed Step Step Node ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpath Ġ= Ġitem As Comp osed Step Def . path , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstep Def Ġ= Ġitem As Comp osed Step Def , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Own Or Desc endant Warnings Ġ= Ġitem As Comp osed Step Def . has Own Or Desc endant Warnings , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis Used Step Ġ= Ġcomposed Step Update Compatibility Frontend Service . is Step Used ( item As Comp osed Step Def ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } ĊĊ