use of io.gravitee.rest.api.service.exceptions.InstallationNotFoundException in project gravitee-management-rest-api by gravitee-io.
the class InstallationServiceImpl method setAdditionalInformation.
@Override
public InstallationEntity setAdditionalInformation(Map<String, String> additionalInformation) {
try {
final Optional<Installation> optInstallation = this.installationRepository.find();
if (optInstallation.isPresent()) {
Installation installation = optInstallation.get();
installation.setAdditionalInformation(additionalInformation);
installation.setUpdatedAt(new Date());
return convert(this.installationRepository.update(installation));
}
} catch (final Exception ex) {
LOGGER.error("Error while updating installation : {}", ex.getMessage());
throw new TechnicalManagementException("Error while updating installation", ex);
}
throw new InstallationNotFoundException("");
}
Aggregations