package Ġp oc . handler Ċ Ċ import Ġcom . amazonaws . services . lambda . runtime . events . API Gateway Proxy Request Event Ċ import Ġcom . amazonaws . services . lambda . runtime . events . API Gateway Proxy Response Event Ċ import Ġp oc . mapper . Api Gateway Mapper Ċ import Ġp oc . model . Entity Ċ import Ġp oc . service . Entity Service Ċ Ċ class ĠFind All RequestHandler ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġmapper : ĠApi Gateway Mapper , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġservice : ĠEntity Service Ċ ): ĠRequest Handler Template < Unit , ĠList < Entity >>() Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġpath : ĠString Ġby Ġlazy Ġ{ Ġ"/ entity / all " Ġ} ĊĠĠĠ Ġoverride Ġval Ġmethod : ĠString Ġby Ġlazy Ġ{ Ġ" GET " Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġapply ( entity : ĠUnit ): ĠList < Entity > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġservice . findAll () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġparse To ( request : ĠAPI Gateway Proxy Request Event ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmapper . validate Find All ( request ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠparseFrom ( response : ĠList < Entity >): ĠAPI Gateway Proxy Response Event Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġmapper . ok ( response ) ĊĠĠĠ Ġ} Ċ }