Search in sources :

Example 1 with GetGsmDiagnosticAsyncResponse

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

the class GetGsmDiagnostic method aGetGsmDiagnosticRequestIsReceived.

@When("^a get gsm diagnostic request is received$")
public void aGetGsmDiagnosticRequestIsReceived(final Map<String, String> settings) throws Throwable {
    final GetGsmDiagnosticRequest request = GetGsmDiagnosticRequestFactory.fromParameterMap(settings);
    final GetGsmDiagnosticAsyncResponse asyncResponse = this.smManagementRequestClient.doRequest(request);
    assertThat(asyncResponse).as("getGsmDiagnosticAsyncResponse should not be null").isNotNull();
    ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Also used : GetGsmDiagnosticAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.GetGsmDiagnosticAsyncResponse) GetGsmDiagnosticRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.GetGsmDiagnosticRequest) When(io.cucumber.java.en.When)

Example 2 with GetGsmDiagnosticAsyncResponse

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

the class SmartMeteringManagementEndpoint method getGsmDiagnostic.

@PayloadRoot(localPart = "GetGsmDiagnosticRequest", namespace = NAMESPACE)
@ResponsePayload
public GetGsmDiagnosticAsyncResponse getGsmDiagnostic(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetGsmDiagnosticRequest 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.GetGsmDiagnosticRequestData requestData = this.managementMapper.map(request.getGetGsmDiagnosticRequestData(), org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetGsmDiagnosticRequestData.class);
    final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_GSM_DIAGNOSTIC).withMessageType(MessageType.GET_GSM_DIAGNOSTIC).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, GetGsmDiagnosticAsyncResponse.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

GetGsmDiagnosticAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.GetGsmDiagnosticAsyncResponse)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 GetGsmDiagnosticRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.GetGsmDiagnosticRequest)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