use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAllAttributeValuesAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringAdhocEndpoint method getAllAttributeValues.
@PayloadRoot(localPart = "GetAllAttributeValuesRequest", namespace = SMARTMETER_ADHOC_NAMESPACE)
@ResponsePayload
public GetAllAttributeValuesAsyncResponse getAllAttributeValues(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetAllAttributeValuesRequest 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.GetAllAttributeValuesRequest getAllAttributeValuesRequest = new org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetAllAttributeValuesRequest(request.getDeviceIdentification());
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_ALL_ATTRIBUTE_VALUES).withMessageType(MessageType.GET_ALL_ATTRIBUTE_VALUES).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, getAllAttributeValuesRequest);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.adhocMapper.map(asyncResponse, GetAllAttributeValuesAsyncResponse.class);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAllAttributeValuesAsyncResponse in project open-smart-grid-platform by OSGP.
the class AllAttributeValues method whenTheGetAllAttributeValuesRequestIsReceived.
@When("^the get all attribute values request is received$")
public void whenTheGetAllAttributeValuesRequestIsReceived(final Map<String, String> settings) throws Throwable {
final GetAllAttributeValuesRequest request = AllAttributeValuesRequestFactory.fromParameterMap(settings);
final GetAllAttributeValuesAsyncResponse asyncResponse = this.requestClient.doRequest(request);
assertThat(asyncResponse).as("AsyncResponse should not be null").isNotNull();
ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Aggregations