use of org.zalando.nakadi.domain.Storage in project nakadi by zalando.
the class StorageDbRepository method buildStorage.
static Storage buildStorage(final ObjectMapper mapper, final String id, final String type, final String config) throws SQLException {
final Storage result = new Storage();
result.setId(id);
result.setType(Storage.Type.valueOf(type));
try {
result.parseConfiguration(mapper, config);
} catch (final IOException ex) {
throw new SQLException("Failed to restore storage with id " + result.getId(), ex);
}
return result;
}
Aggregations