use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsAsyncResponse in project open-smart-grid-platform by OSGP.
the class SetDeviceCommunicationSettingsSteps method theSetDeviceCommunicationSettingsRequestIsReceived.
@When("^the set device communication settings request is received$")
public void theSetDeviceCommunicationSettingsRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final SetDeviceCommunicationSettingsRequest setDeviceCommunicationSettingsRequest = SetDeviceCommunicationSettingsRequestFactory.fromParameterMap(requestData);
final SetDeviceCommunicationSettingsAsyncResponse setDeviceCommunicationSettingsAsyncResponse = this.smManagementRequestClientSetDeviceCommunicationSettings.doRequest(setDeviceCommunicationSettingsRequest);
assertThat(setDeviceCommunicationSettingsAsyncResponse).as("setDeviceCommunicationSettingsAsyncResponse should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setDeviceCommunicationSettingsAsyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringManagementEndpoint method setDeviceCommunicationSettingsRequest.
@PayloadRoot(localPart = "SetDeviceCommunicationSettingsRequest", namespace = NAMESPACE)
@ResponsePayload
public SetDeviceCommunicationSettingsAsyncResponse setDeviceCommunicationSettingsRequest(@OrganisationIdentification final String organisationIdentification, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @RequestPayload final SetDeviceCommunicationSettingsRequest request, @BypassRetry final String bypassRetry) throws OsgpException {
final org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SetDeviceCommunicationSettingsRequest dataRequest = this.managementMapper.map(request, org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SetDeviceCommunicationSettingsRequest.class);
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.SET_DEVICE_COMMUNICATION_SETTINGS).withMessageType(MessageType.SET_DEVICE_COMMUNICATION_SETTINGS).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, dataRequest);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.managementMapper.map(asyncResponse, SetDeviceCommunicationSettingsAsyncResponse.class);
}
Aggregations