Search in sources :

Example 1 with ClearMBusStatusOnAllChannelsAsyncResponse

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsAsyncResponse in project open-smart-grid-platform by OSGP.

the class ClearMBusStatusOnAllChannelsSteps method theBundleRequestContainsAClearMBusStatusOnAllChannelsAction.

@When("^the clear M-Bus status on all channels request is received$")
public void theBundleRequestContainsAClearMBusStatusOnAllChannelsAction(final Map<String, String> requestData) throws Throwable {
    final ClearMBusStatusOnAllChannelsRequest request = new ClearMBusStatusOnAllChannelsRequest();
    request.setClearMBusStatusOnAllChannelsRequestData(new ClearMBusStatusOnAllChannelsRequestData());
    request.setDeviceIdentification(requestData.get(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION));
    final ClearMBusStatusOnAllChannelsAsyncResponse asyncResponse = this.managementRequestClient.doRequest(request);
    assertThat(asyncResponse).as("AsyncResponse should not be null").isNotNull();
    ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Also used : ClearMBusStatusOnAllChannelsRequestData(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsRequestData) ClearMBusStatusOnAllChannelsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsRequest) ClearMBusStatusOnAllChannelsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsAsyncResponse) When(io.cucumber.java.en.When)

Example 2 with ClearMBusStatusOnAllChannelsAsyncResponse

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsAsyncResponse in project open-smart-grid-platform by OSGP.

the class SmartMeteringManagementEndpoint method clearMBusStatusOnAllChannels.

@PayloadRoot(localPart = "ClearMBusStatusOnAllChannelsRequest", namespace = NAMESPACE)
@ResponsePayload
public ClearMBusStatusOnAllChannelsAsyncResponse clearMBusStatusOnAllChannels(@OrganisationIdentification final String organisationIdentification, @RequestPayload final ClearMBusStatusOnAllChannelsRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
    final org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ClearMBusStatusOnAllChannelsRequestData requestData = this.managementMapper.map(request.getClearMBusStatusOnAllChannelsRequestData(), org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ClearMBusStatusOnAllChannelsRequestData.class);
    final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.CLEAR_MBUS_STATUS_ON_ALL_CHANNELS).withMessageType(MessageType.CLEAR_MBUS_STATUS_ON_ALL_CHANNELS).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
    final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, requestData);
    this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
    return this.managementMapper.map(asyncResponse, ClearMBusStatusOnAllChannelsAsyncResponse.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

ClearMBusStatusOnAllChannelsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsAsyncResponse)2 When (io.cucumber.java.en.When)1 AsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse)1 ClearMBusStatusOnAllChannelsRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsRequest)1 ClearMBusStatusOnAllChannelsRequestData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.ClearMBusStatusOnAllChannelsRequestData)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 SetDeviceCommunicationSettingsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceCommunicationSettingsAsyncResponse)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