use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.EnableDebuggingAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringManagementEndpoint method enableDebuggingRequest.
@PayloadRoot(localPart = "EnableDebuggingRequest", namespace = NAMESPACE)
@ResponsePayload
public EnableDebuggingAsyncResponse enableDebuggingRequest(@OrganisationIdentification final String organisationIdentification, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @RequestPayload final EnableDebuggingRequest request, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.ENABLE_DEBUGGING).withMessageType(MessageType.ENABLE_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, EnableDebuggingAsyncResponse.class);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.EnableDebuggingAsyncResponse in project open-smart-grid-platform by OSGP.
the class EnableAndDisableDebugging method theEnableDebugRequestIsReceived.
@When("^the enable Debug request is received$")
public void theEnableDebugRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final EnableDebuggingRequest enableDebuggingRequest = EnableDebuggingRequestFactory.fromParameterMap(requestData);
final EnableDebuggingAsyncResponse enableDebuggingAsyncResponse = this.smartMeteringManagementRequestClientEnableDebugging.doRequest(enableDebuggingRequest);
assertThat(enableDebuggingAsyncResponse).as("AsyncResponse should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, enableDebuggingAsyncResponse.getCorrelationUid());
}
Aggregations