use of org.opensmartgridplatform.adapter.ws.schema.microgrids.adhocmanagement.GetDataRequest in project open-smart-grid-platform by OSGP.
the class ReportingSteps method doGetDataRequest.
private void doGetDataRequest(final Map<String, String> settings) throws Throwable {
final GetDataRequest getDataRequest = new GetDataRequest();
getDataRequest.setDeviceIdentification(settings.get(PlatformMicrogridsKeys.KEY_DEVICE_IDENTIFICATION));
GetDataAsyncResponse asyncResponse;
asyncResponse = this.adHocManagementClient.getDataAsync(getDataRequest);
final GetDataAsyncRequest getDataAsyncRequest = new GetDataAsyncRequest();
final AsyncRequest value = new AsyncRequest();
value.setCorrelationUid(asyncResponse.getAsyncResponse().getCorrelationUid());
value.setDeviceId(asyncResponse.getAsyncResponse().getDeviceId());
getDataAsyncRequest.setAsyncRequest(value);
this.adHocManagementClient.getData(getDataAsyncRequest);
}
use of org.opensmartgridplatform.adapter.ws.schema.microgrids.adhocmanagement.GetDataRequest in project open-smart-grid-platform by OSGP.
the class GetDataRequestBuilder method fromParameterMap.
public static GetDataRequest fromParameterMap(final Map<String, String> requestParameters) {
final GetDataRequest getDataRequest = new GetDataRequest();
getDataRequest.setDeviceIdentification(requestParameters.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION));
addSystemFilters(requestParameters, getDataRequest);
return getDataRequest;
}
use of org.opensmartgridplatform.adapter.ws.schema.microgrids.adhocmanagement.GetDataRequest in project open-smart-grid-platform by OSGP.
the class GetDataSteps method aGetDataRequestIsReceived.
@When("^a get data request is received$")
public void aGetDataRequestIsReceived(final Map<String, String> requestParameters) throws Throwable {
final GetDataRequest getDataRequest = GetDataRequestBuilder.fromParameterMap(requestParameters);
final GetDataAsyncResponse response = this.client.getDataAsync(getDataRequest);
ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, response.getAsyncResponse().getCorrelationUid());
ScenarioContext.current().put(PlatformKeys.KEY_DEVICE_IDENTIFICATION, response.getAsyncResponse().getDeviceId());
}
Aggregations