@Override public String toString() { if (upper == null) { return lower.getVersionName() + " - ..."; } else { return lower.getVersionName() + " - " + upper.getVersionName(); } } }
public CommonVersionImpl(CommonVersion version) { major = version.getMajor(); minor = version.getMinor(); revision = version.getRevision(); }
private int compareRevision(CommonVersion other) { String otherRevision = other.getRevision(); if (ONLY_DIGITS.matcher(revision).matches() && ONLY_DIGITS.matcher(otherRevision).matches()) { return Integer.parseInt(revision) - Integer.parseInt(otherRevision); } // Can't be parsed as int. Compare as Strings. return revision.compareTo(otherRevision); }
private int compareRevision(CommonVersion other) { String otherRevision = other.getRevision(); if (ONLY_DIGITS.matcher(revision).matches() && ONLY_DIGITS.matcher(otherRevision).matches()) { return Integer.parseInt(revision) - Integer.parseInt(otherRevision); } // Can't be parsed as int. Compare as Strings. return revision.compareTo(otherRevision); }
/** * Generates folder name for deployment by given deployment name and common * version. * * @return folder name */ private String getDeploymentFolderName(String deploymentName, CommonVersion version) { return deploymentName + "_v" + version.getVersionName(); }
public RepositoryProjectVersionImpl(CommonVersion version, VersionInfo versionInfo, String versionComment, Map<String, Object> versionProperties) { revision = version.getRevision(); this.major = version.getMajor(); this.minor = version.getMinor(); this.versionInfo = versionInfo; this.versionComment = versionComment; this.versionProperties = versionProperties; }
public static int getNextDeploymentVersion(Repository repository, String project, String deployPath) throws RRepositoryException { Collection<Deployment> lastDeploymentProjects = getLastDeploymentProjects(repository, deployPath); int version = 1; String prefix = project + SEPARATOR; for (Deployment deployment : lastDeploymentProjects) { if (deployment.getName().startsWith(prefix)) { version = Integer.valueOf(deployment.getCommonVersion().getRevision()) + 1; break; } } return version; }
/** * Generates folder name for deployment by given deployment name and common * version. * * @return folder name */ private String getDeploymentFolderName(String deploymentName, CommonVersion version) { return new StringBuilder(deploymentName).append("_v").append(version.getVersionName()).toString(); }
public RepositoryProjectVersionImpl(CommonVersion version, VersionInfo versionInfo) { major = version.getMajor(); minor = version.getMinor(); revision = version.getRevision(); this.versionInfo = versionInfo; }
int projectRevision = Integer.parseInt(version.getRevision());
/** * Gets deployment from storage. If deployment doesn't exists in storage * returns null. * * @return deployment from storage or null if doens't exists */ Deployment getDeployment(String deploymentName, CommonVersion version) { log.debug("Getting deployment with name='{}' and version='{}'", deploymentName, version.getVersionName()); String deploymentFolderName = getDeploymentFolderName(deploymentName, version); return cacheForGetDeployment.get(deploymentFolderName); }
public CommonVersionImpl(CommonVersion version) { major = version.getMajor(); minor = version.getMinor(); revision = version.getRevision(); }
int projectRevision = Integer.parseInt(version.getRevision());
throw new IllegalStateException(); if (failedServiceDescription.getDeployment().getVersion().compareTo( serviceDescription.getDeployment().getVersion()) != 0) { failedServiceDescriptions.remove(serviceName);
public AProject getProject(String name, CommonVersion version) { String key = String.format("%s:%s", name, version.getVersionName()); AProject project = projectsVersions.get(key); if (project == null) { project = new AProject(getRepository(), rulesLocation + name, version.getVersionName()); projectsVersions.put(key, project); } return project; }
public RepositoryProjectVersionImpl(CommonVersion version, VersionInfo versionInfo) { major = version.getMajor(); minor = version.getMinor(); revision = version.getRevision(); this.versionInfo = versionInfo; }
throw new IllegalStateException(); if (failedServiceDescription.getDeployment().getVersion().compareTo( serviceDescription.getDeployment().getVersion()) != 0) { failedServiceDescriptions.remove(serviceName);