Search in sources :

Example 1 with DecoupleMbusDeviceByChannelResponse

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());
}
Also used : DecoupleMbusDeviceByChannelResponse(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.DecoupleMbusDeviceByChannelResponse) ResponseMessage(org.opensmartgridplatform.shared.infra.jms.ResponseMessage) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

DecoupleMbusDeviceByChannelResponse (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.DecoupleMbusDeviceByChannelResponse)1 ResponseMessage (org.opensmartgridplatform.shared.infra.jms.ResponseMessage)1 Transactional (org.springframework.transaction.annotation.Transactional)1