/* - Ċ Ġ* Ġ#% L Ċ Ġ* Ġff 4 j - spring - boot - web - api Ċ Ġ* Ġ%% Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 1 3 Ġ- Ġ 2 0 2 2 ĠFF 4 J Ċ Ġ* Ġ%% Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* ĠĊ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* ĠĊ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ* Ġ# L % Ċ Ġ*/ Ċ Ċ package Ġorg . ff 4 j . spring . boot . web . api . resources Ċ Ċ import Ġio . swagger . v 3 . o as . annotations . Operation Ċ import Ġio . swagger . v 3 . o as . annotations . media . Content Ċ import Ġio . swagger . v 3 . o as . annotations . media . Schema Ċ import Ġio . swagger . v 3 . o as . annotations . responses . ApiResponse Ċ import Ġio . swagger . v 3 . o as . annotations . responses . Api Responses Ċ import Ġio . swagger . v 3 . o as . annotations . tags . Tag Ċ import Ġorg . ff 4 j . services . Monitoring Services Ċ import Ġorg . ff 4 j . services . constants . Feature Constants . RESOURCE _ FF 4 J Ċ import Ġorg . ff 4 j . services . constants . Feature Constants . RESOURCE _ MONITOR ING Ċ import Ġorg . ff 4 j . services . domain . Event Repository Api Bean Ċ import Ġorg . ff 4 j . web . FF 4 j Web Constants . PARAM _ END Ċ import Ġorg . ff 4 j . web . FF 4 j Web Constants . PARAM _ START Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . http . MediaType . APPLICATION _ JSON _ VALUE Ċ import Ġorg . springframework . web . bind . annotation . GetMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestParam Ċ import Ġorg . springframework . web . bind . annotation . RestController Ċ Ċ /** Ċ Ġ* ĠCreated Ġby ĠPaul Ċ Ġ* Ċ Ġ* Ġ@ author Ġ[ Pa ul ĠW illi ams ]( mailto : paul 5 8 9 1 4 0 8 0 @ gmail . com ) Ċ Ġ*/ Ċ @ Tag ( name Ġ= Ġ" Monitoring ", Ġdescription Ġ= Ġ" The ĠAPI Ġfor Ġmonitoring Ġrelated Ġoperations ") Ċ @ RestController Ċ @ RequestMapping ( value Ġ= Ġ[" \ ${ ff 4 j . api . context - path :$ RESOURCE _ FF 4 J }$ RESOURCE _ MONITOR ING "]) Ċ class ĠMonitoring Resource (@ Autowired Ġval Ġmonitoring Services : ĠMonitoring Services ) Ġ{ ĊĊĠ Ġ@ Operation ( ĊĠĠĠ Ġsummary Ġ= Ġ" Display ĠMonitoring Ġinformation Ġfor Ġall Ġfeatures ", ĊĠĠĠ Ġdescription Ġ= Ġ" The ĠEvent Repository Ġhandle Ġto Ġstore Ġaudit Ġevents Ġis Ġnot Ġrequired ", ĊĠĠĠ Ġtags Ġ= Ġ[" Monitoring "] ĊĠ Ġ) ĊĠ Ġ@ Api Responses ( ĊĠĠĠ Ġvalue Ġ= Ġ[ ApiResponse ( ĊĠĠĠĠĠ Ġresponse Code Ġ= Ġ" 2 0 0 ", ĊĠĠĠĠĠ Ġdescription Ġ= Ġ" Status Ġof Ġevent Ġrepository Ġbean ", ĊĠĠĠĠĠ Ġcontent Ġ= ĠarrayOf ( Content ( schema Ġ= ĠSchema ( implementation Ġ= ĠEvent Repository Api Bean :: class ))) ĊĠĠĠ Ġ), ĠApiResponse ( response Code Ġ= Ġ" 4 0 4 ", Ġdescription Ġ= Ġ" No Ġevent Ġrepository Ġdefined ")] ĊĠ Ġ) ĊĠ Ġ@ GetMapping ( pro duces Ġ= Ġ[ APPLICATION _ JSON _ VALUE ]) ĊĠ Ġfun Ġget Monitoring Status (@ RequestParam ( ĊĠĠĠ Ġvalue Ġ= ĠPARAM _ START , Ġrequired Ġ= Ġfalse , ĠdefaultValue Ġ= Ġ" 0 " ĊĠ Ġ) Ġstart : ĠLong , Ġ@ RequestParam ( value Ġ= ĠPARAM _ END , Ġrequired Ġ= Ġfalse , ĠdefaultValue Ġ= Ġ" 0 ") Ġend : ĠLong ): ĠEvent Repository Api Bean Ġ= ĊĠĠĠ Ġmonitoring Services . get Monitoring Status ( start , Ġend ) Ċ } Ċ