From f4b4f47881fd5d9fa291f254744d459424093e9a Mon Sep 17 00:00:00 2001 From: emilmelar Date: Wed, 21 Sep 2022 23:25:18 +0200 Subject: [PATCH] Add ConfirmationCompletedHandler to perform actions after a Confirmation is sent back to the Charge Point --- .../java/eu/chargetime/ocpp/Communicator.java | 11 +++++ .../chargetime/ocpp/model/Confirmation.java | 13 +++++- .../model/ConfirmationCompletedHandler.java | 35 ++++++++++++++++ .../ocpp/model/TestConfirmation.java | 3 +- .../ocpp/test/CommunicatorTest.java | 42 +++++++++++++++++++ .../eu/chargetime/ocpp/test/SessionTest.java | 16 ++++++- .../model/core/AuthorizeConfirmation.java | 3 +- .../core/BootNotificationConfirmation.java | 3 +- .../core/ChangeAvailabilityConfirmation.java | 3 +- .../core/ChangeConfigurationConfirmation.java | 3 +- .../model/core/ClearCacheConfirmation.java | 3 +- .../model/core/DataTransferConfirmation.java | 3 +- .../core/GetConfigurationConfirmation.java | 3 +- .../model/core/HeartbeatConfirmation.java | 3 +- .../model/core/MeterValuesConfirmation.java | 3 +- .../RemoteStartTransactionConfirmation.java | 3 +- .../RemoteStopTransactionConfirmation.java | 3 +- .../ocpp/model/core/ResetConfirmation.java | 3 +- .../core/StartTransactionConfirmation.java | 3 +- .../core/StatusNotificationConfirmation.java | 3 +- .../core/StopTransactionConfirmation.java | 3 +- .../core/UnlockConnectorConfirmation.java | 3 +- ...nosticsStatusNotificationConfirmation.java | 3 +- ...irmwareStatusNotificationConfirmation.java | 3 +- .../firmware/GetDiagnosticsConfirmation.java | 3 +- .../firmware/UpdateFirmwareConfirmation.java | 3 +- .../GetLocalListVersionConfirmation.java | 3 +- .../SendLocalListConfirmation.java | 3 +- .../TriggerMessageConfirmation.java | 6 +-- .../CancelReservationConfirmation.java | 3 +- .../reservation/ReserveNowConfirmation.java | 3 +- .../CertificateSignedConfirmation.java | 3 +- .../DeleteCertificateConfirmation.java | 3 +- .../ExtendedTriggerMessageConfirmation.java | 3 +- ...etInstalledCertificateIdsConfirmation.java | 3 +- .../model/securityext/GetLogConfirmation.java | 3 +- .../InstallCertificateConfirmation.java | 3 +- .../LogStatusNotificationConfirmation.java | 3 +- ...SecurityEventNotificationConfirmation.java | 3 +- .../SignCertificateConfirmation.java | 3 +- ...irmwareStatusNotificationConfirmation.java | 3 +- .../SignedUpdateFirmwareConfirmation.java | 3 +- .../ClearChargingProfileConfirmation.java | 3 +- .../GetCompositeScheduleConfirmation.java | 3 +- .../SetChargingProfileConfirmation.java | 3 +- .../basic/BootNotificationConfirmation.java | 3 +- .../model/basic/GetVariablesConfirmation.java | 3 +- .../model/basic/SetVariablesConfirmation.java | 3 +- .../basic/StatusNotificationConfirmation.java | 3 +- 49 files changed, 203 insertions(+), 49 deletions(-) create mode 100644 ocpp-common/src/main/java/eu/chargetime/ocpp/model/ConfirmationCompletedHandler.java diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java index ed819fdc2..e679e24bb 100644 --- a/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java +++ b/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java @@ -2,6 +2,7 @@ /* ChargeTime.eu - Java-OCA-OCPP Copyright (C) 2015-2016 Thomas Volden +Copyright (C) 2022 Emil Melar MIT License @@ -203,6 +204,16 @@ public synchronized void sendCall(String uniqueId, String action, Request reques public void sendCallResult(String uniqueId, String action, Confirmation confirmation) { try { radio.send(makeCallResult(uniqueId, action, packPayload(confirmation))); + + ConfirmationCompletedHandler completedHandler = confirmation.getCompletedHandler(); + + if (completedHandler != null) { + try { + completedHandler.onConfirmationCompleted(); + } catch (Throwable e) { + events.onError(uniqueId, "ConfirmationCompletedHandlerFailed", "The confirmation completed callback handler failed with exception " + e.toString(), confirmation); + } + } } catch (NotConnectedException ex) { logger.warn("sendCallResult() failed", ex); events.onError( diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/model/Confirmation.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/model/Confirmation.java index f55925448..1908fb06e 100644 --- a/ocpp-common/src/main/java/eu/chargetime/ocpp/model/Confirmation.java +++ b/ocpp-common/src/main/java/eu/chargetime/ocpp/model/Confirmation.java @@ -7,6 +7,7 @@ MIT License Copyright (C) 2016-2018 Thomas Volden +Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -28,4 +29,14 @@ of this software and associated documentation files (the "Software"), to deal */ /** Interface used to flag a Model as a Confirmation payload. */ -public interface Confirmation extends Validatable {} +public abstract class Confirmation implements Validatable { + private transient ConfirmationCompletedHandler completedHandler; + + public ConfirmationCompletedHandler getCompletedHandler() { + return completedHandler; + } + public void setCompletedHandler(ConfirmationCompletedHandler completedHandler) { + this.completedHandler = completedHandler; + } +} + diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/model/ConfirmationCompletedHandler.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/model/ConfirmationCompletedHandler.java new file mode 100644 index 000000000..8793dfbfa --- /dev/null +++ b/ocpp-common/src/main/java/eu/chargetime/ocpp/model/ConfirmationCompletedHandler.java @@ -0,0 +1,35 @@ +package eu.chargetime.ocpp.model; + +/* +ChargeTime.eu - Java-OCA-OCPP + +MIT License + +Copyright (C) 2022 Emil Melar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + + +/** + * Callback that can perform actions after the confirmation is sent back to the Charge Point + */ +public interface ConfirmationCompletedHandler { + void onConfirmationCompleted(); +} diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/model/TestConfirmation.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/model/TestConfirmation.java index d61b3fc71..c1ee4f194 100644 --- a/ocpp-common/src/main/java/eu/chargetime/ocpp/model/TestConfirmation.java +++ b/ocpp-common/src/main/java/eu/chargetime/ocpp/model/TestConfirmation.java @@ -7,6 +7,7 @@ MIT License Copyright (C) 2016-2018 Thomas Volden +Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -28,7 +29,7 @@ of this software and associated documentation files (the "Software"), to deal */ /** Test implementation of the Confirmation interface. Used for tests. */ -public class TestConfirmation implements Confirmation { +public class TestConfirmation extends Confirmation { @Override public boolean validate() { return true; diff --git a/ocpp-common/src/test/java/eu/chargetime/ocpp/test/CommunicatorTest.java b/ocpp-common/src/test/java/eu/chargetime/ocpp/test/CommunicatorTest.java index c453ba19c..edf91df41 100644 --- a/ocpp-common/src/test/java/eu/chargetime/ocpp/test/CommunicatorTest.java +++ b/ocpp-common/src/test/java/eu/chargetime/ocpp/test/CommunicatorTest.java @@ -4,6 +4,8 @@ import static org.mockito.Mockito.*; import eu.chargetime.ocpp.*; +import eu.chargetime.ocpp.model.Confirmation; +import eu.chargetime.ocpp.model.ConfirmationCompletedHandler; import eu.chargetime.ocpp.model.Message; import eu.chargetime.ocpp.model.Request; import org.junit.Before; @@ -18,6 +20,7 @@ MIT License Copyright (C) 2016-2018 Thomas Volden + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -195,4 +198,43 @@ public void connected_failedOnceBefore_sameRequestIsRetried() throws Exception { // Then verify(receiver, times(3)).send(eq(uniqueId)); } + + @Test + public void confirmationCallback_Handler() { + // Given + Confirmation conf = new Confirmation() { + @Override + public boolean validate() { + return true; + } + }; + + ConfirmationCompletedHandler handler = mock(ConfirmationCompletedHandler.class); + conf.setCompletedHandler(handler); + + String uniqueId = "some id"; + String action = "some action"; + + // When + communicator.sendCallResult(uniqueId, action, conf); + + // Then + verify(handler, times(1)).onConfirmationCompleted(); + } + + @Test + public void confirmationCallback_noHandler() { + // Make sure it's not crashing because it has no handler set + + Confirmation conf = new Confirmation() { + @Override + public boolean validate() { + return true; + } + }; + + String uniqueId = "some id"; + String action = "some action"; + communicator.sendCallResult(uniqueId, action, conf); + } } diff --git a/ocpp-common/src/test/java/eu/chargetime/ocpp/test/SessionTest.java b/ocpp-common/src/test/java/eu/chargetime/ocpp/test/SessionTest.java index ceca7ae9d..78c37ed62 100644 --- a/ocpp-common/src/test/java/eu/chargetime/ocpp/test/SessionTest.java +++ b/ocpp-common/src/test/java/eu/chargetime/ocpp/test/SessionTest.java @@ -24,6 +24,7 @@ MIT License Copyright (C) 2016-2018 Thomas Volden +Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -119,7 +120,12 @@ public void sendRequest_someUniqueId_sendsUniqueIdToCommunicator() { @Test public void sendConfirmation_sendsConfirmationToCommunicator() { // Given - Confirmation conf = () -> false; + Confirmation conf = new Confirmation() { + @Override + public boolean validate() { + return false; + } + }; String someUniqueId = "Some id"; String action = "Some action"; @@ -162,7 +168,13 @@ public void onCall_unhandledCallback_callSendCallError() throws Exception { public void onCall_handledCallback_callSendCallResult() throws Exception { // Given String someId = "Some id"; - Confirmation aConfirmation = () -> true; + Confirmation aConfirmation = new Confirmation() { + @Override + public boolean validate() { + return false; + } + }; + doAnswer( invocation -> invocation.getArgumentAt(0, CompletableFuture.class).complete(aConfirmation)) diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/AuthorizeConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/AuthorizeConfirmation.java index 6d3011669..fba2044df 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/AuthorizeConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/AuthorizeConfirmation.java @@ -4,6 +4,7 @@ ChargeTime.eu - Java-OCA-OCPP Copyright (C) 2015-2016 Thomas Volden Copyright (C) 2019 Kevin Raddatz +Copyright (C) 2022 Emil Melar MIT License @@ -37,7 +38,7 @@ of this software and associated documentation files (the "Software"), to deal /** Sent by the Central System to the Charge Point in response to a {@link AuthorizeRequest}. */ @XmlRootElement(name = "authorizeResponse") -public class AuthorizeConfirmation implements Confirmation { +public class AuthorizeConfirmation extends Confirmation { private IdTagInfo idTagInfo; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/BootNotificationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/BootNotificationConfirmation.java index 46a696691..02724ae22 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/BootNotificationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/BootNotificationConfirmation.java @@ -4,6 +4,7 @@ ChargeTime.eu - Java-OCA-OCPP Copyright (C) 2015-2016 Thomas Volden Copyright (C) 2019 Kevin Raddatz +Copyright (C) 2022 Emil Melar MIT License @@ -45,7 +46,7 @@ of this software and associated documentation files (the "Software"), to deal */ @XmlRootElement(name = "bootNotificationResponse") @XmlType(propOrder = {"status", "currentTime", "interval"}) -public class BootNotificationConfirmation implements Confirmation { +public class BootNotificationConfirmation extends Confirmation { private ZonedDateTime currentTime; private Integer interval; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeAvailabilityConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeAvailabilityConfirmation.java index 75e9a1988..191d7e477 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeAvailabilityConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeAvailabilityConfirmation.java @@ -9,6 +9,7 @@ Copyright (C) 2016-2018 Thomas Volden Copyright (C) 2019 Kevin Raddatz +Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -37,7 +38,7 @@ of this software and associated documentation files (the "Software"), to deal /** return by Charge Point to Central System. */ @XmlRootElement(name = "changeAvailabilityResponse") -public class ChangeAvailabilityConfirmation implements Confirmation { +public class ChangeAvailabilityConfirmation extends Confirmation { private AvailabilityStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeConfigurationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeConfigurationConfirmation.java index 4b225a267..8573f5cb4 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeConfigurationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ChangeConfigurationConfirmation.java @@ -9,6 +9,7 @@ Copyright (C) 2016-2018 Thomas Volden Copyright (C) 2019 Kevin Raddatz +Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -37,7 +38,7 @@ of this software and associated documentation files (the "Software"), to deal /** Returned from Charge Point to Central System */ @XmlRootElement(name = "changeConfigurationResponse") -public class ChangeConfigurationConfirmation implements Confirmation { +public class ChangeConfigurationConfirmation extends Confirmation { private ConfigurationStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ClearCacheConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ClearCacheConfirmation.java index 5d927ae71..032fdd7cf 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ClearCacheConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ClearCacheConfirmation.java @@ -9,6 +9,7 @@ Copyright (C) 2016-2018 Thomas Volden Copyright (C) 2019 Kevin Raddatz +Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -37,7 +38,7 @@ of this software and associated documentation files (the "Software"), to deal /** Sent by the Charge Point to the Central System in response to a {@link ClearCacheRequest}. */ @XmlRootElement(name = "clearCacheResponse") -public class ClearCacheConfirmation implements Confirmation { +public class ClearCacheConfirmation extends Confirmation { private ClearCacheStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/DataTransferConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/DataTransferConfirmation.java index fba357905..66cfe87c6 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/DataTransferConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/DataTransferConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,7 +41,7 @@ */ @XmlRootElement(name = "dataTransferResponse") @XmlType(propOrder = {"status", "data"}) -public class DataTransferConfirmation implements Confirmation { +public class DataTransferConfirmation extends Confirmation { private DataTransferStatus status; private String data; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/GetConfigurationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/GetConfigurationConfirmation.java index 59a368ca3..0682f7fcd 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/GetConfigurationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/GetConfigurationConfirmation.java @@ -17,6 +17,7 @@ MIT License Copyright (C) 2016-2018 Thomas Volden +Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -42,7 +43,7 @@ of this software and associated documentation files (the "Software"), to deal */ @XmlRootElement(name = "getConfigurationResponse") @XmlType(propOrder = {"configurationKey", "unknownKey"}) -public class GetConfigurationConfirmation implements Confirmation { +public class GetConfigurationConfirmation extends Confirmation { private static final String ERROR_MESSAGE = "Exceeds limit of %s chars"; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/HeartbeatConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/HeartbeatConfirmation.java index bd55de04f..fa1b351c1 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/HeartbeatConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/HeartbeatConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +37,7 @@ /** Sent by the Central System to the Charge Point in response to a {@link HeartbeatRequest}. */ @XmlRootElement(name = "heartbeatResponse") -public class HeartbeatConfirmation implements Confirmation { +public class HeartbeatConfirmation extends Confirmation { private ZonedDateTime currentTime; /** diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/MeterValuesConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/MeterValuesConfirmation.java index 12f5dbc51..472411e03 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/MeterValuesConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/MeterValuesConfirmation.java @@ -6,6 +6,7 @@ * MIT License * * Copyright (C) 2016-2018 Thomas Volden + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -33,7 +34,7 @@ /** */ @XmlRootElement(name = "meterValuesResponse") -public class MeterValuesConfirmation implements Confirmation { +public class MeterValuesConfirmation extends Confirmation { @Override public boolean validate() { return true; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStartTransactionConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStartTransactionConfirmation.java index c240a5e90..c66b4c00d 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStartTransactionConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStartTransactionConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,7 +36,7 @@ /** Sent from Charge Point to Central System. */ @XmlRootElement(name = "remoteStartTransactionResponse") -public class RemoteStartTransactionConfirmation implements Confirmation { +public class RemoteStartTransactionConfirmation extends Confirmation { private RemoteStartStopStatus status; /** diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStopTransactionConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStopTransactionConfirmation.java index 5e3c14e4d..ed3a20381 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStopTransactionConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/RemoteStopTransactionConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,7 +36,7 @@ /** sent from Charge Point to Central System. */ @XmlRootElement(name = "remoteStopTransactionResponse") -public class RemoteStopTransactionConfirmation implements Confirmation { +public class RemoteStopTransactionConfirmation extends Confirmation { private RemoteStartStopStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ResetConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ResetConfirmation.java index 5b13c149f..16aaeeda3 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ResetConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/ResetConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,7 +36,7 @@ /** Sent by the Charge Point to the Central System in response to a {@link ResetRequest}. */ @XmlRootElement -public class ResetConfirmation implements Confirmation { +public class ResetConfirmation extends Confirmation { private ResetStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StartTransactionConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StartTransactionConfirmation.java index dec606ad9..74e3ea431 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StartTransactionConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StartTransactionConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -39,7 +40,7 @@ */ @XmlRootElement(name = "startTransactionResponse") @XmlType(propOrder = {"transactionId", "idTagInfo"}) -public class StartTransactionConfirmation implements Confirmation { +public class StartTransactionConfirmation extends Confirmation { private IdTagInfo idTagInfo; private Integer transactionId; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StatusNotificationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StatusNotificationConfirmation.java index bdf07ff7f..ebf2b83ab 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StatusNotificationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StatusNotificationConfirmation.java @@ -6,6 +6,7 @@ * MIT License * * Copyright (C) 2016-2018 Thomas Volden + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "statusNotificationResponse") -public class StatusNotificationConfirmation implements Confirmation { +public class StatusNotificationConfirmation extends Confirmation { @Override public boolean validate() { return true; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StopTransactionConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StopTransactionConfirmation.java index 5f2860db7..d5e58dc0f 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StopTransactionConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/StopTransactionConfirmation.java @@ -6,6 +6,7 @@ * MIT License * * Copyright (C) 2016-2018 Thomas Volden + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +37,7 @@ * Sent by the Central System to the Charge Point in response to a {@link StopTransactionRequest}. */ @XmlRootElement(name = "stopTransactionResponse") -public class StopTransactionConfirmation implements Confirmation { +public class StopTransactionConfirmation extends Confirmation { private IdTagInfo idTagInfo; @Override diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/UnlockConnectorConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/UnlockConnectorConfirmation.java index d31c95ab7..dff9a65ac 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/UnlockConnectorConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/core/UnlockConnectorConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -37,7 +38,7 @@ * Sent by the Charge Point to the Central System in response to an {@link UnlockConnectorRequest}. */ @XmlRootElement(name = "unlockConnectorResponse") -public class UnlockConnectorConfirmation implements Confirmation { +public class UnlockConnectorConfirmation extends Confirmation { private UnlockStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/DiagnosticsStatusNotificationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/DiagnosticsStatusNotificationConfirmation.java index 9aaf7b696..8d151bff1 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/DiagnosticsStatusNotificationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/DiagnosticsStatusNotificationConfirmation.java @@ -6,6 +6,7 @@ * * Copyright (C) 2016 Thomas Volden * Copyright (C) 2018 Mikhail Kladkevich + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +37,7 @@ * DiagnosticsStatusNotificationRequest}. */ @XmlRootElement(name = "diagnosticsStatusNotificationResponse") -public class DiagnosticsStatusNotificationConfirmation implements Confirmation { +public class DiagnosticsStatusNotificationConfirmation extends Confirmation { public DiagnosticsStatusNotificationConfirmation() {} diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/FirmwareStatusNotificationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/FirmwareStatusNotificationConfirmation.java index 53cad0d9e..e590c88a9 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/FirmwareStatusNotificationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/FirmwareStatusNotificationConfirmation.java @@ -6,6 +6,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2018 Mikhail Kladkevich + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +37,7 @@ * FirmwareStatusNotificationRequest}. */ @XmlRootElement(name = "firmwareStatusNotificationResponse") -public class FirmwareStatusNotificationConfirmation implements Confirmation { +public class FirmwareStatusNotificationConfirmation extends Confirmation { public FirmwareStatusNotificationConfirmation() {} diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/GetDiagnosticsConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/GetDiagnosticsConfirmation.java index b516b9617..a07a61c61 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/GetDiagnosticsConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/GetDiagnosticsConfirmation.java @@ -5,6 +5,7 @@ MIT License Copyright (C) 2016-2018 Thomas Volden + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -34,7 +35,7 @@ of this software and associated documentation files (the "Software"), to deal import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "getDiagnosticsResponse") -public class GetDiagnosticsConfirmation implements Confirmation { +public class GetDiagnosticsConfirmation extends Confirmation { private String fileName; @Override diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/UpdateFirmwareConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/UpdateFirmwareConfirmation.java index 1b74522c8..b9b35d56a 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/UpdateFirmwareConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/firmware/UpdateFirmwareConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2018 Mikhail Kladkevich + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +37,7 @@ * Sent by the Charge Point to the Central System in response to an {@link UpdateFirmwareRequest}. */ @XmlRootElement(name = "updateFirmwareResponse") -public class UpdateFirmwareConfirmation implements Confirmation { +public class UpdateFirmwareConfirmation extends Confirmation { public UpdateFirmwareConfirmation() {} diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/GetLocalListVersionConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/GetLocalListVersionConfirmation.java index 634b4a302..fe520940c 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/GetLocalListVersionConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/GetLocalListVersionConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ import eu.chargetime.ocpp.utilities.MoreObjects; import java.util.Objects; -public class GetLocalListVersionConfirmation implements Confirmation { +public class GetLocalListVersionConfirmation extends Confirmation { private Integer listVersion = -2; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/SendLocalListConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/SendLocalListConfirmation.java index cb33ef9fb..0cca893c2 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/SendLocalListConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/localauthlist/SendLocalListConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2016-2018 Thomas Volden * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ import eu.chargetime.ocpp.utilities.MoreObjects; import java.util.Objects; -public class SendLocalListConfirmation implements Confirmation { +public class SendLocalListConfirmation extends Confirmation { private UpdateStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/remotetrigger/TriggerMessageConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/remotetrigger/TriggerMessageConfirmation.java index 2e1d104bd..7c463e2ca 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/remotetrigger/TriggerMessageConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/remotetrigger/TriggerMessageConfirmation.java @@ -2,12 +2,12 @@ /* ChargeTime.eu - Java-OCA-OCPP -Copyright (C) 2017 Emil Christopher Solli Melar +Copyright (C) 2022 Emil Christopher Solli Melar Copyright (C) 2019 Kevin Raddatz MIT License -Copyright (C) 2017 Emil Christopher Solli Melar +Copyright (C) 2022 Emil Christopher Solli Melar Copyright (C) 2019 Kevin Raddatz Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36,7 +36,7 @@ of this software and associated documentation files (the "Software"), to deal import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "triggerMessageResponse") -public class TriggerMessageConfirmation implements Confirmation { +public class TriggerMessageConfirmation extends Confirmation { private TriggerMessageStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/CancelReservationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/CancelReservationConfirmation.java index 9a0249590..4e5fde5a0 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/CancelReservationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/CancelReservationConfirmation.java @@ -8,6 +8,7 @@ * Copyright (C) 2016 Thomas Volden * Copyright (C) 2018 Mikhail Kladkevich * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -39,7 +40,7 @@ * CancelReservationRequest}. */ @XmlRootElement(name = "cancelReservationResponse") -public class CancelReservationConfirmation implements Confirmation { +public class CancelReservationConfirmation extends Confirmation { private CancelReservationStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/ReserveNowConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/ReserveNowConfirmation.java index a7f53bb6c..30934f38a 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/ReserveNowConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/reservation/ReserveNowConfirmation.java @@ -8,6 +8,7 @@ * Copyright (C) 2016 Thomas Volden * Copyright (C) 2018 Mikhail Kladkevich * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +37,7 @@ /** Sent by the Charge Point to the Central System in response to an {@link ReserveNowRequest}. */ @XmlRootElement(name = "reserveNowResponse") -public class ReserveNowConfirmation implements Confirmation { +public class ReserveNowConfirmation extends Confirmation { private ReservationStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/CertificateSignedConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/CertificateSignedConfirmation.java index 9b4b8f83a..346dc1a08 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/CertificateSignedConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/CertificateSignedConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class CertificateSignedConfirmation implements Confirmation { +public class CertificateSignedConfirmation extends Confirmation { private CertificateSignedStatusEnumType status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/DeleteCertificateConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/DeleteCertificateConfirmation.java index d7d72ba3d..3c6d1aedf 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/DeleteCertificateConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/DeleteCertificateConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class DeleteCertificateConfirmation implements Confirmation { +public class DeleteCertificateConfirmation extends Confirmation { private DeleteCertificateStatusEnumType status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/ExtendedTriggerMessageConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/ExtendedTriggerMessageConfirmation.java index a3ff629e0..91decd7de 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/ExtendedTriggerMessageConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/ExtendedTriggerMessageConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class ExtendedTriggerMessageConfirmation implements Confirmation { +public class ExtendedTriggerMessageConfirmation extends Confirmation { private TriggerMessageStatusEnumType status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetInstalledCertificateIdsConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetInstalledCertificateIdsConfirmation.java index 260d60636..35a6465ab 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetInstalledCertificateIdsConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetInstalledCertificateIdsConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -34,7 +35,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Arrays; import java.util.Objects; -public class GetInstalledCertificateIdsConfirmation implements Confirmation { +public class GetInstalledCertificateIdsConfirmation extends Confirmation { private GetInstalledCertificateStatusEnumType status; private CertificateHashDataType[] certificateHashData; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetLogConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetLogConfirmation.java index d8423569a..6ac8674c0 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetLogConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/GetLogConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -35,7 +36,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class GetLogConfirmation implements Confirmation { +public class GetLogConfirmation extends Confirmation { private static final transient Validator filenameValidator = new ValidatorBuilder() diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/InstallCertificateConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/InstallCertificateConfirmation.java index d1ef0e755..2ef4fc69d 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/InstallCertificateConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/InstallCertificateConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class InstallCertificateConfirmation implements Confirmation { +public class InstallCertificateConfirmation extends Confirmation { private CertificateStatusEnumType status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/LogStatusNotificationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/LogStatusNotificationConfirmation.java index e7d8466a5..93f819bf5 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/LogStatusNotificationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/LogStatusNotificationConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31,7 +32,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class LogStatusNotificationConfirmation implements Confirmation { +public class LogStatusNotificationConfirmation extends Confirmation { @Override public boolean validate() { diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SecurityEventNotificationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SecurityEventNotificationConfirmation.java index baafec165..51cf90286 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SecurityEventNotificationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SecurityEventNotificationConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31,7 +32,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class SecurityEventNotificationConfirmation implements Confirmation { +public class SecurityEventNotificationConfirmation extends Confirmation { @Override public boolean validate() { diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignCertificateConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignCertificateConfirmation.java index 679d8be37..f76a0c2ac 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignCertificateConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignCertificateConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class SignCertificateConfirmation implements Confirmation { +public class SignCertificateConfirmation extends Confirmation { private GenericStatusEnumType status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedFirmwareStatusNotificationConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedFirmwareStatusNotificationConfirmation.java index 29a0e246c..e7aa98411 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedFirmwareStatusNotificationConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedFirmwareStatusNotificationConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31,7 +32,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class SignedFirmwareStatusNotificationConfirmation implements Confirmation { +public class SignedFirmwareStatusNotificationConfirmation extends Confirmation { @Override public boolean validate() { diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedUpdateFirmwareConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedUpdateFirmwareConfirmation.java index ea1f8cbe6..3a41aa351 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedUpdateFirmwareConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/securityext/SignedUpdateFirmwareConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2022 Mathias Oben + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -32,7 +33,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; -public class SignedUpdateFirmwareConfirmation implements Confirmation { +public class SignedUpdateFirmwareConfirmation extends Confirmation { private UpdateFirmwareStatusEnumType status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/ClearChargingProfileConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/ClearChargingProfileConfirmation.java index 790688d2f..a2476e943 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/ClearChargingProfileConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/ClearChargingProfileConfirmation.java @@ -8,6 +8,7 @@ * Copyright (C) 2018 Fabian Röhr * Copyright (C) 2018 Robin Roscher * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,7 +36,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "clearChargingProfileResponse") -public class ClearChargingProfileConfirmation implements Confirmation { +public class ClearChargingProfileConfirmation extends Confirmation { private ClearChargingProfileStatus status; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/GetCompositeScheduleConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/GetCompositeScheduleConfirmation.java index 673931aaa..aa6702e2b 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/GetCompositeScheduleConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/GetCompositeScheduleConfirmation.java @@ -6,6 +6,7 @@ MIT License Copyright (C) 2019 Kevin Raddatz + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -33,7 +34,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; import javax.xml.bind.annotation.XmlElement; -public class GetCompositeScheduleConfirmation implements Confirmation { +public class GetCompositeScheduleConfirmation extends Confirmation { private GetCompositeScheduleStatus status; private Integer connectorId; diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/SetChargingProfileConfirmation.java b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/SetChargingProfileConfirmation.java index d306b09a2..d847f5d53 100644 --- a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/SetChargingProfileConfirmation.java +++ b/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/smartcharging/SetChargingProfileConfirmation.java @@ -7,6 +7,7 @@ * * Copyright (C) 2017 Emil Christopher Solli Melar * Copyright (C) 2019 Kevin Raddatz + * Copyright (C) 2022 Emil Melar * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -34,7 +35,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "setChargingProfileResponse") -public class SetChargingProfileConfirmation implements Confirmation { +public class SetChargingProfileConfirmation extends Confirmation { private ChargingProfileStatus status; diff --git a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/BootNotificationConfirmation.java b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/BootNotificationConfirmation.java index 9b9311e39..b964446ef 100644 --- a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/BootNotificationConfirmation.java +++ b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/BootNotificationConfirmation.java @@ -6,6 +6,7 @@ Copyright (C) 2018 Thomas Volden Copyright (C) 2019 Kevin Raddatz + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -34,7 +35,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Objects; /** sent by the CSMS to the Charging Station in response to a {@link BootNotificationRequest}. */ -public class BootNotificationConfirmation implements Confirmation { +public class BootNotificationConfirmation extends Confirmation { private transient RequiredValidator validator = new RequiredValidator(); private ZonedDateTime currentTime; diff --git a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/GetVariablesConfirmation.java b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/GetVariablesConfirmation.java index 8edf1fe46..691d5ad9f 100644 --- a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/GetVariablesConfirmation.java +++ b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/GetVariablesConfirmation.java @@ -5,6 +5,7 @@ MIT License Copyright (C) 2018 Thomas Volden + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31,7 +32,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.Arrays; import java.util.Objects; -public class GetVariablesConfirmation implements Confirmation { +public class GetVariablesConfirmation extends Confirmation { private GetVariableResultType[] getVariableResult; diff --git a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/SetVariablesConfirmation.java b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/SetVariablesConfirmation.java index d4bf4b98f..0a864119d 100644 --- a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/SetVariablesConfirmation.java +++ b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/SetVariablesConfirmation.java @@ -5,6 +5,7 @@ MIT License Copyright (C) 2018 Thomas Volden + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -37,7 +38,7 @@ of this software and associated documentation files (the "Software"), to deal * This contains the field definition of the SetVariablesResponse PDU sent by the Charging Station * to the CSMS in response to a SetVariablesRequest. */ -public class SetVariablesConfirmation implements Confirmation { +public class SetVariablesConfirmation extends Confirmation { private transient Validator requiredValidator = new RequiredValidator(); private SetVariableResultType[] setVariableResult; diff --git a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/StatusNotificationConfirmation.java b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/StatusNotificationConfirmation.java index 38aaa022a..8d9fb4a0c 100644 --- a/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/StatusNotificationConfirmation.java +++ b/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/model/basic/StatusNotificationConfirmation.java @@ -5,6 +5,7 @@ MIT License Copyright (C) 2021 John Michael Luy + Copyright (C) 2022 Emil Melar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29,7 +30,7 @@ of this software and associated documentation files (the "Software"), to deal import eu.chargetime.ocpp.utilities.MoreObjects; import java.util.Objects; -public class StatusNotificationConfirmation implements Confirmation { +public class StatusNotificationConfirmation extends Confirmation { @Override public boolean validate() {