@Override public String getBuildInformation() {return buildUtilsInfo.getBuildInformation();}
@Override public String getRegistryName() { BuildUtilsInfo buildInfo = ComponentAccessor.getComponent(BuildUtilsInfo.class); return "JIRA-" + buildInfo.getBuildInformation(); }
public String getFaultDescription() { StringBuilder message = new StringBuilder(512); message.append("Failed to start due to your data being too old to be able to be upgraded by this version of JIRA.\n"); message.append("Database version is: ").append(getDbBuildNumber()).append("\n"); message.append("Minimum version required is: ").append(getMinimumUpgradableVersionString()).append("\n"); message.append("You are running: ").append(buildUtilsInfo.getBuildInformation()).append("\n"); message.append("For information on how to upgrade your data, please see our documentation: ").append(INSTRUCTIONS_URL).append("\n"); return message.toString(); }
public String getHTMLFaultDescription() { StringBuilder message = new StringBuilder(512); message.append("<p>Failed to start due to your data being too old to be able to be upgraded by this version of JIRA.</p>"); message.append("<p>Database version is: ").append(getDbBuildNumber()).append("</p>"); message.append("<p>Minimum version required is: ").append(getMinimumUpgradableVersionString()).append("</p>"); message.append("<p>You are running: ").append(buildUtilsInfo.getBuildInformation()).append("</p>"); message.append("<p>For information on how to upgrade your data, please see <a href=\"").append(INSTRUCTIONS_URL).append("\">our documentation</a>.</p>"); return message.toString(); }
public static String getGeneratedInfo(final ApplicationUser user) { final I18nBean i18nBean = new I18nBean(user); if (user != null) { return i18nBean.getText("rss.search.request.view.header.text.with.user", new Date().toString(), user.getDisplayName(), BUILD_UTILS_INFO.getBuildInformation()); } return i18nBean.getText("rss.search.request.view.header.text.with.out.user", new Date().toString(), BUILD_UTILS_INFO.getBuildInformation()); }
private void setBuildNumberInconsistentMessages(final boolean canAttemptDowngrade) { buildFaultDescriptions( "Failed to start JIRA due to a build number inconsistency.", "The data present in your database is newer than the version of JIRA you are trying to startup." + "\nDatabase build number: " + getDbBuildNumber() + "\nJIRA app build number: " + getAppBuildNumber(), "Please use the correct version of JIRA. You are running: " + buildUtilsInfo.getBuildInformation() ); if (canAttemptDowngrade) { // Just add to log file for now. faultDescription += "Alternatively, you can allow a Downgrade to occur by setting the system property " + SystemPropertyKeys.JIRA_DOWNGRADE_ALLOWED + "=true.\n"; } }
private String getHeader(SearchRequest searchRequest, PagerFilter pagerFilter, int totalComments) { long startComment = pagerFilter.getStart(); long tempMax = pagerFilter.getMax() < 0 ? 0 : pagerFilter.getMax(); long endComment = Math.min(startComment + tempMax, totalComments); Map headerParams = JiraVelocityUtils.getDefaultVelocityParams(new HashMap(), authenticationContext); headerParams.put("title", SearchRequestViewUtils.getTitle(searchRequest, applicationProperties.getString(APKeys.JIRA_TITLE))); VelocityRequestContext velocityRequestContext = new DefaultVelocityRequestContextFactory(applicationProperties).getJiraVelocityRequestContext(); headerParams.put("link", SearchRequestViewUtils.getLink(searchRequest, velocityRequestContext.getBaseUrl(), authenticationContext.getUser())); headerParams.put("buildInfo", buildUtilsInfo.getBuildInformation()); headerParams.put("currentDate", new Date()); headerParams.put("description", getDescription(searchRequest)); headerParams.put("rssLocale", RssViewUtils.getRssLocale(authenticationContext.getLocale())); headerParams.put("startcomment", startComment); headerParams.put("endcomment", endComment); headerParams.put("totalcomment", (long) totalComments); headerParams.put("version", buildUtilsInfo.getVersion()); headerParams.put("buildNumber", buildUtilsInfo.getCurrentBuildNumber()); headerParams.put("buildDate", new SimpleDateFormat("dd-MM-yyyy").format(buildUtilsInfo.getCurrentBuildDate())); return descriptor.getHtml("header", headerParams); }
private String getHeader(SearchRequest searchRequest, SearchRequestParams searchRequestParams, ApplicationProperties applicationProperties, JiraResourcedModuleDescriptor descriptor) { long startIssue = searchRequestParams.getPagerFilter().getStart(); long totalIssues = getSearchCount(searchRequest, searchRequestParams); long tempMax = searchRequestParams.getPagerFilter().getMax() < 0 ? 0 : searchRequestParams.getPagerFilter().getMax(); long endIssue = Math.min(startIssue + tempMax, totalIssues); Map headerParams = JiraVelocityUtils.getDefaultVelocityParams(authenticationContext); headerParams.put("title", SearchRequestViewUtils.getTitle(searchRequest, applicationProperties.getString(APKeys.JIRA_TITLE))); VelocityRequestContext velocityRequestContext = new DefaultVelocityRequestContextFactory(applicationProperties).getJiraVelocityRequestContext(); headerParams.put("link", SearchRequestViewUtils.getLink(searchRequest, velocityRequestContext.getBaseUrl(), authenticationContext.getUser())); headerParams.put("buildInfo", buildUtilsInfo.getBuildInformation()); headerParams.put("currentDate", new Date()); headerParams.put("description", getDescription(searchRequest)); headerParams.put("rssLocale", RssViewUtils.getRssLocale(authenticationContext.getLocale())); headerParams.put("startissue", startIssue); headerParams.put("endissue", endIssue); headerParams.put("totalissue", totalIssues); headerParams.put("version", buildUtilsInfo.getVersion()); headerParams.put("buildNumber", buildUtilsInfo.getCurrentBuildNumber()); headerParams.put("buildDate", new SimpleDateFormat("dd-MM-yyyy").format(buildUtilsInfo.getCurrentBuildDate())); return descriptor.getHtml("header", headerParams); }
velocityParams.put("jiraTitle", applicationProperties.getString(APKeys.JIRA_TITLE)); velocityParams.put("topBgColor", lookAndFeelBean.getTopBackgroundColour()); velocityParams.put("buildInfo", buildUtilsInfo.getBuildInformation()); velocityParams.put("buildNumber", buildUtilsInfo.getCurrentBuildNumber()); velocityParams.put("createDate", new Date());
headerParams.put("buildInfo", buildUtilsInfo.getBuildInformation()); headerParams.put("currentDate", new Date()); headerParams.put("rssLocale", RssViewUtils.getRssLocale(authenticationContext.getLocale()));
final VelocityRequestContext velocityRequestContext = new DefaultVelocityRequestContextFactory(applicationProperties).getJiraVelocityRequestContext(); headerParams.put("link", SearchRequestViewUtils.getLink(searchRequest, velocityRequestContext.getBaseUrl(), authenticationContext.getUser())); headerParams.put("buildInfo", buildUtilsInfo.getBuildInformation()); headerParams.put("currentDate", new Date()); headerParams.put("description", getDescription(searchRequest));
"Database build number: " + getDbBuildNumber(), "JIRA app build number: " + getAppBuildNumber(), "JIRA app version: " + buildUtilsInfo.getBuildInformation() ); return false; "Database build number: " + getDbBuildNumber(), "JIRA app build number: " + getAppBuildNumber(), "JIRA app version: " + buildUtilsInfo.getBuildInformation() ); htmlFaultDescription += "<p>See the log files for details</p>";
logMsg.outputProperty("JIRA Build", buildUtilsInfo.getBuildInformation()); logMsg.outputProperty("Build Date", String.valueOf(buildUtilsInfo.getCurrentBuildDate())); logMsg.outputProperty("JIRA Installation Type", releaseInfo.getInfo());