@@ -359,48 +359,45 @@ public SecurityEventNotificationResponse securityEventNotification(SecurityEvent
359359
360360 return new SecurityEventNotificationResponse ();
361361 }
362- public LogStatusNotificationResponse logStatusNotification (LogStatusNotification parameters ,
363- String chargeBoxIdentity ) {
362+
363+ public SignedFirmwareStatusNotificationResponse signedFirmwareStatusNotification (SignedFirmwareStatusNotification parameters ,
364+ String chargeBoxIdentity ) {
364365 try {
365366 if (parameters .getRequestId () == null ) {
366367 log .warn ("No requestId in {}" , parameters );
367368 } else {
368- securityRepository .insertLogUploadStatus (
369+ securityRepository .insertFirmwareUpdateStatus (
369370 chargeBoxIdentity ,
370371 parameters .getRequestId (),
371372 parameters .getStatus ().value (),
372373 DateTime .now ()
373374 );
374375 }
375376 } catch (Exception e ) {
376- log .error ("Error processing log status notification from '{}': {}" , chargeBoxIdentity , e .getMessage (), e );
377+ log .error ("Error processing firmware status notification from '{}': {}" , chargeBoxIdentity , e .getMessage (), e );
377378 }
378379
379- return new LogStatusNotificationResponse ();
380+ return new SignedFirmwareStatusNotificationResponse ();
380381 }
381382
382- public SignedFirmwareStatusNotificationResponse signedFirmwareStatusNotification (
383- SignedFirmwareStatusNotification parameters , String chargeBoxIdentity ) {
384- var status = parameters .getStatus () != null ? parameters .getStatus ().toString () : "Unknown" ;
385- var requestId = parameters .getRequestId ();
386-
387- log .info ("FirmwareStatus from '{}': status={}, requestId={}" , chargeBoxIdentity , status , requestId );
388-
383+ public LogStatusNotificationResponse logStatusNotification (LogStatusNotification parameters ,
384+ String chargeBoxIdentity ) {
389385 try {
390- var firmwareUpdate = securityRepository .getCurrentFirmwareUpdate (chargeBoxIdentity );
391-
392- if (firmwareUpdate != null ) {
393- securityRepository .updateFirmwareUpdateStatus (firmwareUpdate .getFirmwareUpdateId (), status );
394- log .info ("Updated firmware status for chargeBox '{}' to '{}'" , chargeBoxIdentity , status );
386+ if (parameters .getRequestId () == null ) {
387+ log .warn ("No requestId in {}" , parameters );
395388 } else {
396- log .warn ("No firmware update found for chargeBox '{}'" , chargeBoxIdentity );
389+ securityRepository .insertLogUploadStatus (
390+ chargeBoxIdentity ,
391+ parameters .getRequestId (),
392+ parameters .getStatus ().value (),
393+ DateTime .now ()
394+ );
397395 }
398396 } catch (Exception e ) {
399- log .error ("Error processing firmware status notification from '{}': {}" ,
400- chargeBoxIdentity , e .getMessage (), e );
397+ log .error ("Error processing log status notification from '{}': {}" , chargeBoxIdentity , e .getMessage (), e );
401398 }
402399
403- return new SignedFirmwareStatusNotificationResponse ();
400+ return new LogStatusNotificationResponse ();
404401 }
405402
406403 // -------------------------------------------------------------------------
0 commit comments