use of com.google.gerrit.extensions.common.PluginConfigInfo in project gerrit by GerritCodeReview.
the class GetServerInfo method getPluginInfo.
private PluginConfigInfo getPluginInfo() {
PluginConfigInfo info = new PluginConfigInfo();
info.hasAvatars = toBoolean(avatar.get() != null);
info.jsResourcePaths = new ArrayList<>();
info.htmlResourcePaths = new ArrayList<>();
for (WebUiPlugin u : plugins) {
String path = String.format("plugins/%s/%s", u.getPluginName(), u.getJavaScriptResourcePath());
if (path.endsWith(".html")) {
info.htmlResourcePaths.add(path);
} else {
info.jsResourcePaths.add(path);
}
}
return info;
}
Aggregations