use of io.gravitee.repository.management.model.ClientRegistrationProvider in project gravitee-management-rest-api by gravitee-io.
the class ClientRegistrationServiceImpl method findById.
@Override
public ClientRegistrationProviderEntity findById(String id) {
try {
LOGGER.debug("Find client registration provider by ID: {}", id);
Optional<ClientRegistrationProvider> clientRegistrationProvider = clientRegistrationProviderRepository.findById(id);
if (clientRegistrationProvider.isPresent()) {
return convert(clientRegistrationProvider.get());
}
throw new ClientRegistrationProviderNotFoundException(id);
} catch (TechnicalException ex) {
LOGGER.error("An error occurs while trying to find a client registration provider using its ID {}", id, ex);
throw new TechnicalManagementException("An error occurs while trying to delete a client registration provider using its ID " + id, ex);
}
}
Aggregations