use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SecretType in project open-smart-grid-platform by OSGP.
the class ConfigurationService method getKeys.
public void getKeys(final MessageMetadata messageMetadata, final GetKeysRequestData getKeysRequestData) throws FunctionalException {
log.info("getKeys for organisationIdentification: {} for deviceIdentification: {}", messageMetadata.getOrganisationIdentification(), messageMetadata.getDeviceIdentification());
final SmartMeter smartMeter = this.domainHelperService.findSmartMeter(messageMetadata.getDeviceIdentification());
final List<SecretTypeDto> secretTypes = getKeysRequestData.getSecretTypes().stream().map(secretType -> SecretTypeDto.valueOf(secretType.name())).collect(Collectors.toList());
final GetKeysRequestDto requestDto = new GetKeysRequestDto(secretTypes);
this.osgpCoreRequestMessageSender.send(requestDto, messageMetadata.builder().withIpAddress(smartMeter.getIpAddress()).withNetworkSegmentIds(smartMeter.getBtsId(), smartMeter.getCellId()).build());
}
Aggregations