use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringManagementEndpoint method findEventsRequest.
@PayloadRoot(localPart = "FindEventsRequest", namespace = NAMESPACE)
@ResponsePayload
public FindEventsAsyncResponse findEventsRequest(@OrganisationIdentification final String organisationIdentification, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @RequestPayload final FindEventsRequest request, @BypassRetry final String bypassRetry) throws OsgpException {
final List<org.opensmartgridplatform.domain.core.valueobjects.smartmetering.FindEventsRequestData> findEventsQueryList = this.managementMapper.mapAsList(request.getFindEventsRequestData(), org.opensmartgridplatform.domain.core.valueobjects.smartmetering.FindEventsRequestData.class);
this.validateFindEventsQueries(findEventsQueryList);
final FindEventsRequestDataList requestData = new FindEventsRequestDataList(findEventsQueryList);
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.FIND_EVENTS).withMessageType(MessageType.FIND_EVENTS).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, requestData);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.managementMapper.map(asyncResponse, FindEventsAsyncResponse.class);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method setEncryptionKeyExchangeOnGMeter.
@PayloadRoot(localPart = "SetEncryptionKeyExchangeOnGMeterRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public SetEncryptionKeyExchangeOnGMeterAsyncResponse setEncryptionKeyExchangeOnGMeter(@OrganisationIdentification final String organisationIdentification, @RequestPayload final SetEncryptionKeyExchangeOnGMeterRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.SET_ENCRYPTION_KEY_EXCHANGE_ON_G_METER).withMessageType(MessageType.SET_ENCRYPTION_KEY_EXCHANGE_ON_G_METER).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, null);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, SetEncryptionKeyExchangeOnGMeterAsyncResponse.class);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method getMbusEncryptionKeyStatus.
@PayloadRoot(localPart = "GetMbusEncryptionKeyStatusRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetMbusEncryptionKeyStatusAsyncResponse getMbusEncryptionKeyStatus(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetMbusEncryptionKeyStatusRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_MBUS_ENCRYPTION_KEY_STATUS).withMessageType(MessageType.GET_MBUS_ENCRYPTION_KEY_STATUS).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, null);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, GetMbusEncryptionKeyStatusAsyncResponse.class);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method getMbusEncryptionKeyStatusByChannel.
@PayloadRoot(localPart = "GetMbusEncryptionKeyStatusByChannelRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetMbusEncryptionKeyStatusByChannelAsyncResponse getMbusEncryptionKeyStatusByChannel(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetMbusEncryptionKeyStatusByChannelRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final GetMbusEncryptionKeyStatusByChannelRequestData requestData = this.configurationMapper.map(request.getGetMbusEncryptionKeyStatusByChannelRequestData(), GetMbusEncryptionKeyStatusByChannelRequestData.class);
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getGatewayDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_MBUS_ENCRYPTION_KEY_STATUS_BY_CHANNEL).withMessageType(MessageType.GET_MBUS_ENCRYPTION_KEY_STATUS_BY_CHANNEL).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, requestData);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, GetMbusEncryptionKeyStatusByChannelAsyncResponse.class);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method setActivityCalendar.
@PayloadRoot(localPart = "SetActivityCalendarRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public SetActivityCalendarAsyncResponse setActivityCalendar(@OrganisationIdentification final String organisationIdentification, @RequestPayload final SetActivityCalendarRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final ActivityCalendar activityCalendar = this.configurationMapper.map(request.getActivityCalendarData().getActivityCalendar(), ActivityCalendar.class);
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.SET_ACTIVITY_CALENDAR).withMessageType(MessageType.SET_ACTIVITY_CALENDAR).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, activityCalendar);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, SetActivityCalendarAsyncResponse.class);
}
Aggregations