use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.DecoupleMbusDeviceByChannelResponse in project open-smart-grid-platform by OSGP.
the class InstallationService method handleDecoupleMbusDeviceByChannelResponse.
@Transactional(value = "transactionManager")
public void handleDecoupleMbusDeviceByChannelResponse(final MessageMetadata messageMetadata, final ResponseMessageResultType responseMessageResultType, final OsgpException osgpException, final DecoupleMbusDeviceResponseDto decoupleMbusDeviceResponseDto) throws FunctionalException {
if (osgpException == null) {
this.mBusGatewayService.handleDecoupleMbusDeviceResponse(messageMetadata, decoupleMbusDeviceResponseDto);
}
final DecoupleMbusDeviceByChannelResponse response = new DecoupleMbusDeviceByChannelResponse(decoupleMbusDeviceResponseDto.getMbusDeviceIdentification(), decoupleMbusDeviceResponseDto.getChannelElementValues().getChannel());
final ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder().withMessageMetadata(messageMetadata).withResult(responseMessageResultType).withOsgpException(osgpException).withDataObject(response).build();
this.webServiceResponseMessageSender.send(responseMessage, messageMetadata.getMessageType());
}
Aggregations