@Override public String getVersion() { return buildUtilsInfo.getVersion(); }
private ServerInfoBean createServerInfoBean() { final boolean canUse = permissionManager.hasPermission(USE, authContext.getUser()); return new ServerInfoBean( properties.getString(APKeys.JIRA_BASEURL), buildUtils.getVersion(), buildUtils.getVersionNumbers(), Integer.valueOf(buildUtils.getCurrentBuildNumber()), buildUtils.getCurrentBuildDate(), buildUtils.getCommitId(), buildUtils.getBuildPartnerName(), properties.getString(APKeys.JIRA_TITLE), canUse ? new Date() : null); }
@Override public String getVersion() { return info.getVersion(); }
public JiraCreditsPage(final BuildUtilsInfo buildUtilsInfo) { buildVersion = buildUtilsInfo.getVersion(); }
private String getCurrentVersion() { return buildUtilsInfo.getVersion(); }
public String getVersion() { return buildUtilsInfo.getVersion(); }
@Override public String getVersion() {return buildUtilsInfo.getVersion();}
@Nonnull public String getVersion() { return buildUtilsInfo.getVersion(); }
private String getJiraVersionStringWithoutSuffix() { final String version = buildUtilsInfo.getVersion(); if (version.contains("-")) { return version.substring(0, version.indexOf("-")); } return version; }
public ProductVersionDataBean(BuildUtilsInfo buildUtilsInfo) { this.metaTags = format("<meta name=\"application-name\" content=\"JIRA\" data-name=\"jira\" data-version=\"%s\">", TextUtils.htmlEncode(buildUtilsInfo.getVersion())); this.bodyAttributes = format("data-version=\"%s\"", TextUtils.htmlEncode(buildUtilsInfo.getVersion())); }
public AboutPage(final BuildUtilsInfo buildUtilsInfo, final PluginAccessor pluginAccessor) { copyrightSinceYear = FIRST_JIRA_RELEASE_YEAR; final GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime(buildUtilsInfo.getCurrentBuildDate()); copyrightUntilYear = Integer.toString(calendar.get(GregorianCalendar.YEAR)); buildVersion = buildUtilsInfo.getVersion(); this.pluginAccessor = pluginAccessor; }
private String getMaintenanceDateFailureMessage(List<LicenseDetails> licensesPastMaintenance) { String expiredAppDescription = licensesPastMaintenance.stream() .map(LicenseDetails::getApplicationDescription) .collect(Collectors.joining(", ")); // we know at this point that all of the passed licenses have finite (non-null) expiry dates Date expiryDateOfInstance = licensesPastMaintenance.stream() .map(LicenseDetails::getMaintenanceExpiryDate) .min(Date::compareTo).get(); return i18n.getText("admin.license.build.update.not.possible", buildUtilsInfo.getVersion(), dateTimeFormatter.format(expiryDateOfInstance), expiredAppDescription); } }
public String getRequestLicenseURL() { StringBuilder url = new StringBuilder(); url.append(JiraUrl.constructBaseUrl(request)); url.append("/secure/SetupImport!returnFromMAC.jspa"); return externalLinkUtil.getProperty("external.link.jira.license.view", Arrays.asList(buildUtilsInfo.getVersion(), buildUtilsInfo.getCurrentBuildNumber(), "enterprise", getServerId(), url.toString())); }
private void setVersions(int buildNumber, final UpgradeManagerParams upgradeManagerParams) { try { scrubUpgradeHistoryNewerThan(buildNumber); } catch (GenericEntityException e) { throw new RuntimeException("Error while scrubbing upgrade history", e); } if (upgradeManagerParams.isWithoutDelay()) { // there may not be any patches for this version, so increment to latest build number. buildNumberDao.setDatabaseBuildNumber(Integer.toString(buildNumber)); } buildNumberDao.setJiraVersion(buildUtilsInfo.getVersion()); buildNumberDao.setMinimumDowngradeVersion(); }
public void writeNewBuildNumbers() { final DowngradeUtilsImpl downgradeUtilsInfo = new DowngradeUtilsImpl(); BuildNumberDao buildNumberDao = new BuildNumberDao(downgradeUtilsInfo, applicationProperties); buildNumberDao.setDatabaseBuildNumber(buildUtilsInfo.getCurrentBuildNumber()); buildNumberDao.setJiraVersion(buildUtilsInfo.getVersion()); buildNumberDao.setMinimumDowngradeVersion(); buildNumberDao.insertUpgradeVersionHistory(ofBizDelegator, buildUtilsInfo.getCurrentBuildNumber(), buildUtilsInfo.getVersion()); }
void addErrors( final Set<Plugin> outdatedPlugins) { final String description = "Plugins found that are not compatible with JIRA v" + buildUtilsInfo.getVersion() + ". " + "The following plugins need to be either removed or updated in order for JIRA to start successfully:"; final StringBuilder pluginNames = new StringBuilder(); for (Plugin outdatedPlugin : outdatedPlugins) { pluginNames.append(pluginsToCheck.get(outdatedPlugin.getKey()).getErrorMessage(outdatedPlugin)).append("\n"); } final String cacMessage = "Please visit " + PAC_LINK + " to download the latest versions of these plugins."; final List<String> messages = CollectionBuilder.newBuilder("", description, "", pluginNames.toString().trim(), "", cacMessage, "").asList(); startupLog.printMessage(messages, Level.ERROR); final Event event = new Event(EventType.get("outdated-plugins-installed"), description + "<p/>" + TextUtils.plainTextToHtml(pluginNames.toString()) + "<p/>" + TextUtils.plainTextToHtml(cacMessage), EventLevel.get(EventLevel.ERROR)); final JohnsonEventContainer eventCont = johnsonProvider.getContainer(); eventCont.addEvent(event); }
@Override public String doDefault() throws Exception { if (setupAlready()) { return SETUP_ALREADY; } if (databaseConfigurationManager.isDatabaseSetup()) { // database configuration already exists, but redirect to SetupDatabase anyway // so that the action can perform import of initial data return getRedirect("SetupDatabase!default.jspa"); } webResourceManager.putMetadata("version-number", buildUtilsInfo.getVersion()); return INPUT; }
public RemoteServerInfo() { final BuildUtilsInfo buildUtilsInfo = ComponentAccessor.getComponent(BuildUtilsInfo.class); final ApplicationProperties applicationProperties = ComponentAccessor.getComponent(ApplicationProperties.class); this.buildDate = buildUtilsInfo.getCurrentBuildDate(); this.buildNumber = buildUtilsInfo.getCurrentBuildNumber(); this.version = buildUtilsInfo.getVersion(); this.baseUrl = applicationProperties.getString(APKeys.JIRA_BASEURL); }
public CopyInformationBean getIssueTypeInformation(final String projectKey) throws ProjectNotFoundException { final ApplicationUser user = jiraAuthenticationContext.getLoggedInUser(); Project project = getProjectForCreateIssue(projectKey); final UserBean userBean = new UserBean(user.getName(), user.getEmailAddress(), user.getDisplayName()); final boolean hasCreateAttachmentPermission = permissionManager.hasPermission(Permissions.CREATE_ATTACHMENT, project, user); final boolean hasCreateCommentPermission = permissionManager.hasPermission(Permissions.COMMENT_ISSUE, project, user); final boolean hasCreateLinksPermission = permissionManager.hasPermission(Permissions.LINK_ISSUE, project, user); final long maxAttachmentSize = Long.parseLong(applicationProperties.getDefaultBackedString(APKeys.JIRA_ATTACHMENT_SIZE)); Iterable<IssueTypeBean> issueTypesForProject = Collections2.transform(issueTypeSchemeManager.getNonSubTaskIssueTypesForProject(project), convertIssueType(project)); Iterable<IssueTypeBean> subTaskIssueTypesForProject = Collections2.transform(issueTypeSchemeManager.getSubTaskIssueTypesForProject(project), convertIssueType(project)); return new CopyInformationBean( issueTypesForProject, subTaskIssueTypesForProject, applicationProperties.getOption(APKeys.JIRA_OPTION_ALLOWATTACHMENTS), applicationProperties.getOption(APKeys.JIRA_OPTION_ISSUELINKING), userBean, hasCreateAttachmentPermission, hasCreateCommentPermission, hasCreateLinksPermission, buildUtilsInfo.getVersion(), maxAttachmentSize); }
@ActionViewData("success") public Map<String, Object> getData() { return MapBuilder.<String, Object>newBuilder() .add("version", buildUtilsInfo.getVersion()) .add("buildNumber", buildUtilsInfo.getApplicationBuildNumber()) .add("commitId", buildUtilsInfo.getCommitId()) .add("buildDate", getDateTimeFormatter().format(buildUtilsInfo.getCurrentBuildDate())) .toMap(); } }