Search in sources :

Example 1 with PluginConfigInfo

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;
}
Also used : WebUiPlugin(com.google.gerrit.extensions.webui.WebUiPlugin) PluginConfigInfo(com.google.gerrit.extensions.common.PluginConfigInfo)

Aggregations

PluginConfigInfo (com.google.gerrit.extensions.common.PluginConfigInfo)1 WebUiPlugin (com.google.gerrit.extensions.webui.WebUiPlugin)1