Search in sources :

Example 1 with GetFirmwareVersionQuery

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery in project open-smart-grid-platform by OSGP.

the class GetFirmwareRequestMessageProcessor method handleMessage.

@Override
protected void handleMessage(final MessageMetadata deviceMessageMetadata, final Object dataObject) throws FunctionalException {
    final GetFirmwareVersionQuery getFirmwareVersionQuery = (GetFirmwareVersionQuery) dataObject;
    this.configurationService.requestFirmwareVersion(deviceMessageMetadata, getFirmwareVersionQuery);
}
Also used : GetFirmwareVersionQuery(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery)

Example 2 with GetFirmwareVersionQuery

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery in project open-smart-grid-platform by OSGP.

the class SmartMeteringConfigurationEndpoint method getFirmwareVersionGas.

@PayloadRoot(localPart = "GetFirmwareVersionGasRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetFirmwareVersionGasAsyncResponse getFirmwareVersionGas(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetFirmwareVersionGasRequest 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_FIRMWARE_VERSION).withMessageType(MessageType.GET_FIRMWARE_VERSION).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
    final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, new GetFirmwareVersionQuery(true));
    this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
    return this.configurationMapper.map(asyncResponse, GetFirmwareVersionGasAsyncResponse.class);
}
Also used : GetFirmwareVersionQuery(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery) SetSpecialDaysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetSpecialDaysAsyncResponse) GetFirmwareVersionGasAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionGasAsyncResponse) GenerateAndReplaceKeysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GenerateAndReplaceKeysAsyncResponse) ReplaceKeysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ReplaceKeysAsyncResponse) SetPushSetupSmsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetPushSetupSmsAsyncResponse) SetAdministrativeStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAdministrativeStatusAsyncResponse) GetConfigurationObjectAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetConfigurationObjectAsyncResponse) SetEncryptionKeyExchangeOnGMeterAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetEncryptionKeyExchangeOnGMeterAsyncResponse) SetClockConfigurationAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetClockConfigurationAsyncResponse) GetMbusEncryptionKeyStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusAsyncResponse) UpdateFirmwareAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.UpdateFirmwareAsyncResponse) SetConfigurationObjectAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetConfigurationObjectAsyncResponse) SetPushSetupAlarmAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetPushSetupAlarmAsyncResponse) GetKeysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysAsyncResponse) GetAdministrativeStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetAdministrativeStatusAsyncResponse) AsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse) SetAlarmNotificationsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAlarmNotificationsAsyncResponse) ConfigureDefinableLoadProfileAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigureDefinableLoadProfileAsyncResponse) GetFirmwareVersionAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionAsyncResponse) SetRandomisationSettingsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetRandomisationSettingsAsyncResponse) SetActivityCalendarAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarAsyncResponse) SetMbusUserKeyByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelAsyncResponse) GetMbusEncryptionKeyStatusByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelAsyncResponse) ResponsePayload(org.springframework.ws.server.endpoint.annotation.ResponsePayload) PayloadRoot(org.springframework.ws.server.endpoint.annotation.PayloadRoot)

Example 3 with GetFirmwareVersionQuery

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery in project open-smart-grid-platform by OSGP.

the class SmartMeteringConfigurationEndpoint method getFirmwareVersion.

/**
 * Starts the proces of retrieving the firmware version(s) of the device specified in the {@link
 * GetFirmwareVersionRequest}
 *
 * @param organisationIdentification {@link String} containing the identification of the
 *     organization
 * @param request the {@link GetFirmwareVersionRequest}
 * @param messagePriority the message priority
 * @param scheduleTime the time the message is scheduled
 * @return the {@link GetFirmwareVersionAsyncResponse} containing the correlation id
 * @throws OsgpException
 */
@PayloadRoot(localPart = "GetFirmwareVersionRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetFirmwareVersionAsyncResponse getFirmwareVersion(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetFirmwareVersionRequest 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_FIRMWARE_VERSION).withMessageType(MessageType.GET_FIRMWARE_VERSION).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
    final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, new GetFirmwareVersionQuery());
    this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
    return this.configurationMapper.map(asyncResponse, GetFirmwareVersionAsyncResponse.class);
}
Also used : GetFirmwareVersionQuery(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery) SetSpecialDaysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetSpecialDaysAsyncResponse) GetFirmwareVersionGasAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionGasAsyncResponse) GenerateAndReplaceKeysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GenerateAndReplaceKeysAsyncResponse) ReplaceKeysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ReplaceKeysAsyncResponse) SetPushSetupSmsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetPushSetupSmsAsyncResponse) SetAdministrativeStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAdministrativeStatusAsyncResponse) GetConfigurationObjectAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetConfigurationObjectAsyncResponse) SetEncryptionKeyExchangeOnGMeterAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetEncryptionKeyExchangeOnGMeterAsyncResponse) SetClockConfigurationAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetClockConfigurationAsyncResponse) GetMbusEncryptionKeyStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusAsyncResponse) UpdateFirmwareAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.UpdateFirmwareAsyncResponse) SetConfigurationObjectAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetConfigurationObjectAsyncResponse) SetPushSetupAlarmAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetPushSetupAlarmAsyncResponse) GetKeysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysAsyncResponse) GetAdministrativeStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetAdministrativeStatusAsyncResponse) AsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse) SetAlarmNotificationsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAlarmNotificationsAsyncResponse) ConfigureDefinableLoadProfileAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigureDefinableLoadProfileAsyncResponse) GetFirmwareVersionAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionAsyncResponse) SetRandomisationSettingsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetRandomisationSettingsAsyncResponse) SetActivityCalendarAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarAsyncResponse) SetMbusUserKeyByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelAsyncResponse) GetMbusEncryptionKeyStatusByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelAsyncResponse) ResponsePayload(org.springframework.ws.server.endpoint.annotation.ResponsePayload) PayloadRoot(org.springframework.ws.server.endpoint.annotation.PayloadRoot)

Aggregations

GetFirmwareVersionQuery (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery)3 AsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.AsyncResponse)2 ConfigureDefinableLoadProfileAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigureDefinableLoadProfileAsyncResponse)2 GenerateAndReplaceKeysAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GenerateAndReplaceKeysAsyncResponse)2 GetAdministrativeStatusAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetAdministrativeStatusAsyncResponse)2 GetConfigurationObjectAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetConfigurationObjectAsyncResponse)2 GetFirmwareVersionAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionAsyncResponse)2 GetFirmwareVersionGasAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionGasAsyncResponse)2 GetKeysAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysAsyncResponse)2 GetMbusEncryptionKeyStatusAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusAsyncResponse)2 GetMbusEncryptionKeyStatusByChannelAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelAsyncResponse)2 ReplaceKeysAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ReplaceKeysAsyncResponse)2 SetActivityCalendarAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarAsyncResponse)2 SetAdministrativeStatusAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAdministrativeStatusAsyncResponse)2 SetAlarmNotificationsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAlarmNotificationsAsyncResponse)2 SetClockConfigurationAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetClockConfigurationAsyncResponse)2 SetConfigurationObjectAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetConfigurationObjectAsyncResponse)2 SetEncryptionKeyExchangeOnGMeterAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetEncryptionKeyExchangeOnGMeterAsyncResponse)2 SetMbusUserKeyByChannelAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelAsyncResponse)2 SetPushSetupAlarmAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetPushSetupAlarmAsyncResponse)2