use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.DisableDebuggingAsyncResponse in project open-smart-grid-platform by OSGP.
the class EnableAndDisableDebugging method theDisableDebugRequestIsReceived.
@When("^the disable Debug request is received$")
public void theDisableDebugRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final DisableDebuggingRequest disableDebuggingRequest = DisableDebuggingRequestFactory.fromParameterMap(requestData);
final DisableDebuggingAsyncResponse disableDebuggingAsyncResponse = this.smartMeteringManagementRequestClientDisableDebugging.doRequest(disableDebuggingRequest);
assertThat(disableDebuggingAsyncResponse).as("AsyncResponse should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, disableDebuggingAsyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.DisableDebuggingAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringManagementEndpoint method disableDebuggingRequest.
@PayloadRoot(localPart = "DisableDebuggingRequest", namespace = NAMESPACE)
@ResponsePayload
public DisableDebuggingAsyncResponse disableDebuggingRequest(@OrganisationIdentification final String organisationIdentification, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @RequestPayload final DisableDebuggingRequest request, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.DISABLE_DEBUGGING).withMessageType(MessageType.DISABLE_DEBUGGING).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, null);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.managementMapper.map(asyncResponse, DisableDebuggingAsyncResponse.class);
}
Aggregations