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
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
BASE_PATCH_NUM_URL_PART
static String
CHANGE_CANONICAL_URL
static Pattern
CHANGE_URL_PATTERN
static Pattern
DIFF_URL_PATTERN
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
computeChangeRequestsPath(String requestedURL, Pattern pattern)
static com.google.common.collect.ImmutableMap<String,Object>
dynamicTemplateData(GerritApi gerritApi)
Returns dynamic parameters ofindex.html
.static Set<String>
experimentData(Map<String,String[]> urlParameterMap)
Returns experimentData to be used inindex.html
.static String
getDefaultChangeDetailHex()
static String
getDefaultDiffDetailHex()
static com.google.common.collect.ImmutableMap<String,Object>
templateData(GerritApi gerritApi, 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
.
-
-
-
Field Detail
-
CHANGE_CANONICAL_URL
public static final String CHANGE_CANONICAL_URL
- See Also:
- Constant Field Values
-
BASE_PATCH_NUM_URL_PART
public static final String BASE_PATCH_NUM_URL_PART
- See Also:
- Constant Field Values
-
CHANGE_URL_PATTERN
public static final Pattern CHANGE_URL_PATTERN
-
DIFF_URL_PATTERN
public static final Pattern DIFF_URL_PATTERN
-
-
Method Detail
-
getDefaultChangeDetailHex
public static String getDefaultChangeDetailHex()
-
getDefaultDiffDetailHex
public static String getDefaultDiffDetailHex()
-
computeChangeRequestsPath
public static String computeChangeRequestsPath(String requestedURL, Pattern pattern)
-
templateData
public static com.google.common.collect.ImmutableMap<String,Object> templateData(GerritApi gerritApi, 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) throws RestApiException
Returns dynamic parameters ofindex.html
.- Throws:
RestApiException
-
-