package Ġpl . alt kom . asc . lab . mic ronaut . p oc . documents . web Ċ Ċ import Ġpl . alt kom . asc . lab . mic ronaut . p oc . documents . api . Documents Operations Ċ import Ġpl . alt kom . asc . lab . mic ronaut . p oc . documents . api . queries . find documents . Find Documents Result Ċ import Ġpl . alt kom . asc . lab . mic ronaut . p oc . documents . api . queries . find documents . Generated Document Ċ import Ġpl . alt kom . asc . lab . mic ronaut . p oc . documents . domain . Policy Document Repository Ċ import Ġio . mic ronaut . http . annotation . Controller Ċ import Ġio . mic ronaut . http . annotation . Get Ċ import Ġio . mic ronaut . validation . Validated Ċ import Ġorg . assertj . core . util . Lists Ċ Ċ @ Validated Ċ @ Controller ("/ documents ") Ċ class ĠDocuments Controller ( private Ġval Ġpolicy Document Repository : ĠPolicy Document Repository ) Ġ: ĠDocuments Operations Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġfind ( policy Number : ĠString ): ĠFind Documents Result Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠfindBy Policy Number Ġ= Ġpolicy Document Repository . findBy Policy Number ( policy Number ) ĊĠĠĠĠĠĠĠ Ġval Ġlist Ġ= ĠfindBy Policy Number . map Ġ{ Ġpolicy Document Ġ-> ĠGenerated Document ( policy Number , Ġpolicy Document . bytes ) Ġ} ĊĠĠĠĠĠĠĠ Ġreturn ĠFind Documents Result ( list ) ĊĠĠĠ Ġ} Ċ } Ċ