use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringAdhocEndpoint method getAssociationLnObjects.
@PayloadRoot(localPart = "GetAssociationLnObjectsRequest", namespace = SMARTMETER_ADHOC_NAMESPACE)
@ResponsePayload
public GetAssociationLnObjectsAsyncResponse getAssociationLnObjects(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetAssociationLnObjectsRequest 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.GetAssociationLnObjectsRequest getAssociationLnObjectsRequest = new org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetAssociationLnObjectsRequest(request.getDeviceIdentification());
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_ASSOCIATION_LN_OBJECTS).withMessageType(MessageType.GET_ASSOCIATION_LN_OBJECTS).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, getAssociationLnObjectsRequest);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.adhocMapper.map(asyncResponse, GetAssociationLnObjectsAsyncResponse.class);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncResponse in project open-smart-grid-platform by OSGP.
the class AssociationLnObjects method receivingARetrieveAssociationLNObjectlistRequest.
@When("^receiving a retrieve association LN objectlist request$")
public void receivingARetrieveAssociationLNObjectlistRequest(final Map<String, String> settings) throws Throwable {
final GetAssociationLnObjectsRequest request = AssociationLnObjectsRequestFactory.fromParameterMap(settings);
final GetAssociationLnObjectsAsyncResponse asyncResponse = this.requestClient.doRequest(request);
assertThat(asyncResponse).as("AsyncRespone should not be null").isNotNull();
ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Aggregations