Search in sources :

Example 1 with GetAllAttributeValuesAsyncResponse

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);
}
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) GetAllAttributeValuesRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAllAttributeValuesRequest) ResponsePayload(org.springframework.ws.server.endpoint.annotation.ResponsePayload) PayloadRoot(org.springframework.ws.server.endpoint.annotation.PayloadRoot)

Example 2 with GetAllAttributeValuesAsyncResponse

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

Aggregations

GetAllAttributeValuesAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAllAttributeValuesAsyncResponse)2 GetAllAttributeValuesRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAllAttributeValuesRequest)2 When (io.cucumber.java.en.When)1 GetAssociationLnObjectsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncResponse)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