Package com.google.gerrit.httpd.raw
Class IndexHtmlUtil
- java.lang.Object
-
- com.google.gerrit.httpd.raw.IndexHtmlUtil
-
public class IndexHtmlUtil extends Object
Helper for generating parts ofindex.html
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.common.collect.ImmutableMap<String,Object>
dynamicTemplateData(GerritApi gerritApi, String requestedURL)
Returns dynamic parameters ofindex.html
.static Set<String>
experimentData(Map<String,String[]> urlParameterMap)
Returns experimentData to be used inindex.html
.static com.google.common.collect.ImmutableMap<String,Object>
templateData(GerritApi gerritApi, ExperimentFeatures experimentFeatures, String canonicalURL, String cdnPath, String faviconPath, Map<String,String[]> urlParameterMap, Function<String,com.google.template.soy.data.SanitizedContent> urlInScriptTagOrdainer, String requestedURL)
Returns both static and dynamic parameters ofindex.html
.
-
-
-
Method Detail
-
templateData
public static com.google.common.collect.ImmutableMap<String,Object> templateData(GerritApi gerritApi, ExperimentFeatures experimentFeatures, String canonicalURL, String cdnPath, String faviconPath, Map<String,String[]> urlParameterMap, Function<String,com.google.template.soy.data.SanitizedContent> urlInScriptTagOrdainer, String requestedURL) throws URISyntaxException, RestApiException
Returns both static and dynamic parameters ofindex.html
. The result is to be used when rendering the soy template.- Throws:
URISyntaxException
RestApiException
-
dynamicTemplateData
public static com.google.common.collect.ImmutableMap<String,Object> dynamicTemplateData(GerritApi gerritApi, String requestedURL) throws RestApiException, URISyntaxException
Returns dynamic parameters ofindex.html
.- Throws:
RestApiException
URISyntaxException
-
-