package Ġcom . seed company . cord tables . components . tables . common . ticket _ assignments Ċ Ċ import Ġcom . seed company . cord tables . components . tables . common . ticket _ assignments .* Ċ import Ġcom . seed company . cord tables . components . tables . common . ticket _ assignments . Create Ċ import Ġcom . seed company . cord tables . components . tables . common . ticket _ assignments . Read ĊĊ Ċ import Ġcom . seed company . cord tables . common . ErrorType Ċ import Ġcom . seed company . cord tables . common . Utility Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . stereotype . Controller Ċ import Ġorg . springframework . web . bind . annotation . Cross Origin Ċ import Ġorg . springframework . web . bind . annotation . PostMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestBody Ċ import Ġorg . springframework . web . bind . annotation . ResponseBody Ċ import Ġjavax . sql . DataSource Ċ Ċ data Ġclass ĠCommon Ticket Assignment Create Read Request ( ĊĠĠĠĠĠĠĠ Ġval Ġtoken : ĠString ? Ġ= Ġnull , ĊĠĠĠĠĠĠĠ Ġval Ġticket _ assignment : ĠCommon Ticket Assignments Input , Ċ ) Ċ Ċ data Ġclass ĠCommon Ticket Assignment Create Read Response ( ĊĠĠĠĠĠĠĠ Ġval Ġerror : ĠError Type , ĊĠĠĠĠĠĠĠ Ġval Ġticket _ assignment : ĠMutable List < Common Ticket Assignments >? Ġ= Ġnull , Ċ ) Ċ Ċ @ Cross Origin ( orig ins Ġ= Ġ[" http :// localhost : 3 3 3 3 ", Ġ" https :// dev . cord tables . com ", Ġ" https :// cord tables . com ", Ġ"* "]) Ċ @ Controller (" Common Ticket Assignments Create Read ") Ċ class ĠCreate Read ( ĊĠĠĠĠĠĠĠ Ġ@ Autowired ĊĠĠĠĠĠĠĠ Ġval Ġutil : ĠUtility , ĊĊĠĠĠĠĠĠĠ Ġ@ Autowired ĊĠĠĠĠĠĠĠ Ġval Ġds : ĠDataSource , ĊĊĠĠĠĠĠĠĠ Ġ@ Autowired ĊĠĠĠĠĠĠĠ Ġval Ġcreate : ĠCreate , ĊĊĠĠĠĠĠĠĠ Ġ@ Autowired ĊĠĠĠĠĠĠĠ Ġval Ġread : ĠRead , Ċ ) Ġ{ ĊĠĠĠ Ġ@ PostMapping (" common / ticket - assignments / create - read ") ĊĠĠĠ Ġ@ ResponseBody ĊĠĠĠ Ġfun Ġcreate Read Handler (@ RequestBody Ġreq : ĠCommon Ticket Assignment Create Read Request ): ĠCommon Ticket Assignment Create Read Response Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġcreate Response Ġ= Ġcreate . create Handler ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCommon Ticket Assignment CreateRequest ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtoken Ġ= Ġreq . token , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġticket _ assignment Ġ= Ġreq . ticket _ assignment ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ( create Response . error Ġ!= ĠError Type . NoError ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠCommon Ticket Assignment Create Read Response ( error Ġ= Ġcreate Response . error ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġread Response Ġ= Ġread . read Handler ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCommon Ticket Assignment Read Request ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtoken Ġ= Ġreq . token , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġticket Ġ= Ġreq . ticket _ assignment . ticket , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġid Ġ= Ġcreate Response !!. id ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠCommon Ticket Assignment Create Read Response ( error Ġ= Ġread Response . error , Ġticket _ assignment Ġ= Ġread Response . ticket _ assignment ) ĊĠĠĠ Ġ} Ċ } Ċ