use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelAsyncResponse in project open-smart-grid-platform by OSGP.
the class SetEncryptionKeyExchangeOnGMeterSteps method theSetMbusUserKeyByChannelRequestIsReceived.
@When("^the set m-bus user key by channel request is received$")
public void theSetMbusUserKeyByChannelRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final SetMbusUserKeyByChannelRequest setMbusUserKeyByChannelRequest = SetMbusUserKeyByChannelRequestFactory.fromParameterMap(requestData);
final SetMbusUserKeyByChannelAsyncResponse setMbusUserKeyByChannelAsyncResponse = this.smartMeteringConfigurationClient.setMbusUserKeyByChannel(setMbusUserKeyByChannelRequest);
assertThat(setMbusUserKeyByChannelAsyncResponse).as("Set M-Bus User Key By Channel async response should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setMbusUserKeyByChannelAsyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method setMbusUserKeyByChannel.
@PayloadRoot(localPart = "SetMbusUserKeyByChannelRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public SetMbusUserKeyByChannelAsyncResponse setMbusUserKeyByChannel(@OrganisationIdentification final String organisationIdentification, @RequestPayload final SetMbusUserKeyByChannelRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final SetMbusUserKeyByChannelRequestData setMbusUserKeyByChannelRequestData = this.configurationMapper.map(request.getSetMbusUserKeyByChannelRequestData(), SetMbusUserKeyByChannelRequestData.class);
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.SET_MBUS_USER_KEY_BY_CHANNEL).withMessageType(MessageType.SET_MBUS_USER_KEY_BY_CHANNEL).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, setMbusUserKeyByChannelRequestData);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, SetMbusUserKeyByChannelAsyncResponse.class);
}
Aggregations