Search in sources :

Example 1 with GetAssociationLnObjectsAsyncResponse

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);
}
Also used : GetSpecificAttributeValueAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueAsyncResponse) ScanMbusChannelsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.ScanMbusChannelsAsyncResponse) SynchronizeTimeAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeAsyncResponse) AsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse) GetAllAttributeValuesAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAllAttributeValuesAsyncResponse) GetAssociationLnObjectsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncResponse) GetAssociationLnObjectsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsRequest) ResponsePayload(org.springframework.ws.server.endpoint.annotation.ResponsePayload) PayloadRoot(org.springframework.ws.server.endpoint.annotation.PayloadRoot)

Example 2 with GetAssociationLnObjectsAsyncResponse

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());
}
Also used : GetAssociationLnObjectsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncResponse) GetAssociationLnObjectsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsRequest) When(io.cucumber.java.en.When)

Aggregations

GetAssociationLnObjectsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncResponse)2 GetAssociationLnObjectsRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsRequest)2 When (io.cucumber.java.en.When)1 GetAllAttributeValuesAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAllAttributeValuesAsyncResponse)1 GetSpecificAttributeValueAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueAsyncResponse)1 ScanMbusChannelsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.ScanMbusChannelsAsyncResponse)1 SynchronizeTimeAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeAsyncResponse)1 AsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse)1 PayloadRoot (org.springframework.ws.server.endpoint.annotation.PayloadRoot)1 ResponsePayload (org.springframework.ws.server.endpoint.annotation.ResponsePayload)1