package Ġcom . virtual pair program mers . the ater . control ĊĊ Ċ import Ġcom . virtual pair program mers . the ater . services . Reporting Service Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . stereotype . Controller Ċ import Ġorg . springframework . web . bind . annotation . RequestMapping Ċ import Ġorg . springframework . web . servlet . Model AndView Ċ import Ġjavax . websocket . server . Path Param Ċ import Ġkotlin . reflect . full . declared Member Functions Ċ Ċ @ Controller Ċ @ RequestMapping ("/ reports ") Ċ class ĠReports Controller Ġ{ ĊĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġlateinit Ġvar Ġreporting Service : ĠReporting Service ĊĊĊĠĠĠ Ġprivate Ġfun Ġget ListOf Reports () Ġ= Ġreporting Service :: class . declared Member Functions . map Ġ{ Ġit . name Ġ} ĊĊĠĠĠ Ġ@ RequestMapping ("") ĊĠĠĠ Ġfun Ġmain () Ġ= ĠModelAndView (" reports ", Ġmap Of (" reports " Ġto Ġget ListOf Reports ())) ĊĊĠĠĠ Ġ@ RequestMapping ("/ get Report ") ĊĠĠĠ Ġfun Ġget Report (@ Path Param (" report ") Ġreport : ĠString ): ĠModelAndView Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmatched Report Ġ= Ġreporting Service :: class . declared Member Functions . filter Ġ{ Ġit . name Ġ== Ġreport Ġ}. first OrNull () ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġmatched Report ?. call ( reporting Service ) Ġ?: Ġ"" ĊĠĠĠĠĠĠĠ Ġreturn ĠModelAndView (" reports ", Ġmap Of (" reports " Ġto Ġget ListOf Reports (), Ġ" result " Ġto Ġresult )) ĊĠĠĠ Ġ} Ċ Ċ }