use of com.google.gerrit.server.restapi.change.GetMetaDiff in project gerrit by GerritCodeReview.
the class ChangeApiImpl method metaDiff.
@Override
public ChangeInfoDifference metaDiff(@Nullable String oldMetaRevId, @Nullable String newMetaRevId, EnumSet<ListChangesOption> options, ImmutableListMultimap<String, String> pluginOptions) throws RestApiException {
try (DynamicOptions dynamicOptions = new DynamicOptions(injector, dynamicBeans)) {
GetMetaDiff metaDiff = getMetaDiffProvider.get();
metaDiff.setOldMetaRevId(oldMetaRevId);
metaDiff.setNewMetaRevId(newMetaRevId);
options.forEach(metaDiff::addOption);
dynamicOptionParser.parseDynamicOptions(metaDiff, pluginOptions, dynamicOptions);
return metaDiff.apply(change).value();
} catch (Exception e) {
throw asRestApiException("Cannot retrieve metaDiff", e);
}
}
Aggregations