Search in sources :

Example 1 with SetDeviceCommunicationSettingsAsyncResponse

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());
}
Also used : SetDeviceCommunicationSettingsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsAsyncResponse) SetDeviceCommunicationSettingsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsRequest) When(io.cucumber.java.en.When)

Example 2 with SetDeviceCommunicationSettingsAsyncResponse

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);
}
Also used : EnableDebuggingAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.EnableDebuggingAsyncResponse) FindEventsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.FindEventsAsyncResponse) SetDeviceCommunicationSettingsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsAsyncResponse) SetDeviceLifecycleStatusByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceLifecycleStatusByChannelAsyncResponse) AsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse) DisableDebuggingAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.DisableDebuggingAsyncResponse) GetGsmDiagnosticAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.GetGsmDiagnosticAsyncResponse) ClearMBusStatusOnAllChannelsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsAsyncResponse) FindMessageLogsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.FindMessageLogsAsyncResponse) ResponsePayload(org.springframework.ws.server.endpoint.annotation.ResponsePayload) PayloadRoot(org.springframework.ws.server.endpoint.annotation.PayloadRoot)

Aggregations

SetDeviceCommunicationSettingsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsAsyncResponse)2 When (io.cucumber.java.en.When)1 AsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse)1 ClearMBusStatusOnAllChannelsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsAsyncResponse)1 DisableDebuggingAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.DisableDebuggingAsyncResponse)1 EnableDebuggingAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.EnableDebuggingAsyncResponse)1 FindEventsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.FindEventsAsyncResponse)1 FindMessageLogsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.FindMessageLogsAsyncResponse)1 GetGsmDiagnosticAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.GetGsmDiagnosticAsyncResponse)1 SetDeviceCommunicationSettingsRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsRequest)1 SetDeviceLifecycleStatusByChannelAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceLifecycleStatusByChannelAsyncResponse)1 PayloadRoot (org.springframework.ws.server.endpoint.annotation.PayloadRoot)1 ResponsePayload (org.springframework.ws.server.endpoint.annotation.ResponsePayload)1