Source:
public void handleGetConfigurationResponse( final com.alliander.osgp.dto.valueobjects.ConfigurationDto configurationDto, final String deviceIdentification, final String organisationIdentification, final String correlationUid, final String messageType, final ResponseMessageResultType deviceResult, final OsgpException exception) { ResponseMessageResultType result = ResponseMessageResultType.OK; OsgpException osgpException = exception; Configuration configuration = null; try { if (deviceResult == ResponseMessageResultType.NOT_OK || osgpException != null) { LOGGER.error("Device Response not ok.", osgpException); throw osgpException; } final Device device = this.deviceRepository.findByDeviceIdentification(deviceIdentification); final List<DeviceOutputSetting> outputSettings = this.findSsldForDevice(device).getOutputSettings(); configuration = this.domainCoreMapper.map(mergeOutputSettings(configurationDto, outputSettings), Configuration.class); for (final DeviceOutputSetting dos : outputSettings) { if (dos.getOutputType().equals(RelayType.TARIFF_REVERSED)) { for (final RelayMap rm : configuration.getRelayConfiguration().getRelayMap()) { if (rm.getIndex() == dos.getExternalId() && rm.getRelayType().equals(RelayType.TARIFF)) { rm.changeRelayType(RelayType.TARIFF_REVERSED); } } } } } catch (final Exception e) { LOGGER.error("Unexpected Exception for messageType: {}", messageType, e); result = ResponseMessageResultType.NOT_OK; osgpException = new TechnicalException(ComponentType.UNKNOWN, e.getMessage(), e); } this.webServiceResponseMessageSender.send(new ResponseMessage(correlationUid, organisationIdentification, deviceIdentification, result, osgpException, configuration)); }

Target:
public void handleGetConfigurationResponse( final com.alliander.osgp.dto.valueobjects.ConfigurationDto configurationDto, final String deviceIdentification, final String organisationIdentification, final String correlationUid, final String messageType, final ResponseMessageResultType deviceResult, final OsgpException exception) { ResponseMessageResultType result = ResponseMessageResultType.OK; OsgpException osgpException = exception; Configuration configuration = null; try { if (deviceResult == ResponseMessageResultType.NOT_OK || osgpException != null) { LOGGER.error("Device Response not ok.", osgpException); throw osgpException; } final Device device = this.deviceRepository.findByDeviceIdentification(deviceIdentification); final List<DeviceOutputSetting> outputSettings = this.findSsldForDevice(device).getOutputSettings(); configuration = this.domainCoreMapper.map(this.mergeOutputSettings(configurationDto, outputSettings), Configuration.class); for (final DeviceOutputSetting dos : outputSettings) { if (dos.getOutputType().equals(RelayType.TARIFF_REVERSED)) { for (final RelayMap rm : configuration.getRelayConfiguration().getRelayMap()) { if (rm.getIndex() == dos.getExternalId() && rm.getRelayType().equals(RelayType.TARIFF)) { rm.changeRelayType(RelayType.TARIFF_REVERSED); } } } } } catch (final Exception e) { LOGGER.error("Unexpected Exception for messageType: {}", messageType, e); result = ResponseMessageResultType.NOT_OK; osgpException = new TechnicalException(ComponentType.UNKNOWN, e.getMessage(), e); } this.webServiceResponseMessageSender.send(new ResponseMessage(correlationUid, organisationIdentification, deviceIdentification, result, osgpException, configuration)); }