@Override public String getHtml(final ApplicationUser remoteUser, final Long projectId, final String fieldId, final boolean isOtherFieldsExist) { try { final AlphabeticalLabelGroupingSupport alphabeticallyGroupedLabels = alphabeticalLabelGroupingService.getAlphabeticallyGroupedLabels(remoteUser, projectId, fieldId); final Map<String, Object> startingParams = getDefaultVelocityParams(); startingParams.put("field", fieldManager.getField(fieldId)); startingParams.put("project", projectManager.getProjectObj(projectId)); startingParams.put("labelUtils", labelUtil); startingParams.put("labelCount", alphabeticallyGroupedLabels.getUniqueLabelsCount()); startingParams.put("alphaSupport", alphabeticallyGroupedLabels); startingParams.put("isCustomField", fieldId.startsWith(CustomFieldUtils.CUSTOM_FIELD_PREFIX)); startingParams.put("remoteUser", remoteUser); startingParams.put("i18n", beanFactory.getInstance(remoteUser)); startingParams.put("isOtherFieldsExist", isOtherFieldsExist); return templatingEngine.render(file("templates/plugins/jira/projectpanels/labels-alphabetical.vm")) .applying(startingParams) .asHtml(); } catch (VelocityException e) { throw new RuntimeException(e); } }
alphabeticalLabelGroupingService.getAlphabeticallyGroupedLabels(authenticationContext.getLoggedInUser(), projectId.get(), fieldId); final ApplicationUser user = authenticationContext.getLoggedInUser(); final List<LabelGroup> groups = Lists.newArrayList();