@Override public MessageUtil getNewInstance() { return new MessageUtilImpl(context.getI18nHelper(), helpUrls, externalLinkUtil, baseUrl); }
public String getDisplayName() { return jiraAuthenticationContext.getI18nHelper().getText("admin.notification.types.current.user"); } }
/** * Returns display name - i18ned admin.permission.types.single.user * * @return display name */ @Override public String getDisplayName() { return jiraAuthenticationContext.getI18nHelper().getText("admin.permission.types.single.user"); }
@Override public RestFieldOperationsHandler getRestFieldOperation() { return new LabelsRestFieldOperationsHandler(authenticationContext.getI18nHelper()); }
@Override public RestFieldOperationsHandler getRestFieldOperation() { return new ComponentsRestFieldOperationsHandler(projectComponentManager, authenticationContext.getI18nHelper()); }
private String getText(String key, Object values) { return authContext.getI18nHelper().getText(key, values); } }
@Override public RestFieldOperationsHandler getRestFieldOperation() { return new CommentRestFieldOperationsHandler(commentManager, projectRoleManager, authenticationContext.getI18nHelper()); }
public String getDisplayName() { return jiraAuthenticationContext.getI18nHelper().getText("admin.notification.types.project.lead"); } }
/** * @deprecated There are countless simpler and faster ways to get an {@code I18nHelper} and ask it to translate * something for you. Asking {@code IssueOperations} to do it does not make any sense. Since v6.3. */ @Deprecated public static String getText(String key) { return ComponentAccessor.getJiraAuthenticationContext().getI18nHelper().getText(key); } }
@Override public DraftWorkflowSchemeMigrationHelper createMigrationHelper(Project triggerProject, List<Project> projects, DraftWorkflowScheme draft) throws GenericEntityException { Preconditions.checkNotNull(projects, "projects cannot be null."); return new DraftWorkflowSchemeMigrationHelper(triggerProject, projects, draft, workflowManager, delegator, schemeManager, authCtx.getI18nHelper(), authCtx.getUser(), constantsManager, taskManager, issueIndexManager, workflowSchemeManager, eventPublisher); } }
@Override public String getUserCountDescription(final Option<Integer> count) { return ctx.getI18nHelper().getText("jira.core.user.count", count.getOrElse(-1)); }
@Override public Map getContextMap(ApplicationUser user, JiraHelper jiraHelper) { return EasyMap.build("i18n", authenticationContext.getI18nHelper(), "helpUtil", HelpUtil.getInstance()); } }
@Override public AssignableWorkflowSchemeMigrationHelper createMigrationHelper(Project project, AssignableWorkflowScheme scheme) throws GenericEntityException { Preconditions.checkNotNull(project, "project cannot be null."); return new AssignableWorkflowSchemeMigrationHelper(project, scheme, workflowManager, delegator, schemeManager, authCtx.getI18nHelper(), authCtx.getUser(), constantsManager, taskManager, getIssueManager(), issueIndexManager, workflowSchemeManager, eventPublisher); }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { Map<String, Object> velocityParams = getVelocityParams(getAuthenticationContext().getI18nHelper(), displayParams, issue); velocityParams.put("versions", getCurrentVersions(issue)); velocityParams.put("searchLinkGenerator", searchLinkGenerator); velocityParams.putAll(addViewVelocityParams()); return renderTemplate("versions-columnview.vm", velocityParams); }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { Map<String, Object> velocityParams = getVelocityParams(getAuthenticationContext().getI18nHelper(), displayParams, issue); velocityParams.put("dueDateFormatter", dateFieldFormat); Timestamp dueDate = issue.getDueDate(); if (dueDate != null) { velocityParams.put(getId(), dueDate); } return renderTemplate("duedate-columnview.vm", velocityParams); }
public void includeFieldResourcesForCurrentUser() { webResourceManager.requireResource("jira.webresources:jira-fields"); //We don't use autCtx.getLocale() because it is more expensive than authCtx.getI18nHelper().getLocale() calendarResourceIncluder.includeForLocale(authCtx.getI18nHelper().getLocale()); } }
private VelocityContext buildActionVelocityContext(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse, final ActionResult actionResult, final ActionInfo.ViewInfo viewInfo) { ActionContextKit.setContext(httpServletRequest, httpServletResponse, ServletContextProvider.getServletContext()); final Map<String, Object> velocityParams = getDefaultVelocityParams(); velocityParams.put("i18n", getAuthenticationContext().getI18nHelper()); velocityParams.putAll(actionViewDataSupport.getData(actionResult, viewInfo)); return (VelocityContext) VelocityHelper.getContextWithoutInit(httpServletRequest, httpServletResponse, velocityParams); }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { Map velocityParams = getVelocityParams(fieldLayoutItem, getAuthenticationContext().getI18nHelper(), displayParams, issue); velocityParams.put(getId(), issue.getVotes()); return renderTemplate("votes-columnview.vm", velocityParams); }
@Override public void apply(final Pair<String, ErrorCollection.Reason> error) { errors.addError(nameFieldName, authenticationContext.getI18nHelper().getText(error.first()), error.second()); } });
private JiraServiceContext createServiceContext() { return new JiraServiceContextImpl(authenticationContext.getUser(), new SimpleErrorCollection(), authenticationContext.getI18nHelper()); }