private void setVersionSavedIn() {
properties.setProperty(SAVED_IN_VERSION, Versions.CURRENT.toString());
}
private void setMinimumVersionRequired() {
Version min = ApplicationConfiguration.getVersion("IntegrationProject.RequiredVersion", null);
if (min == null) {
// This means that the ApplicationConfiguration contains invalid data. If this happens
// it is either because:
// 1. A developer has entered an invalid version value in the properties file (i.e. a
// programming error)
// 2. The user has edited the properties file (as shipped in the JAR file) and messed
// it up.
// 3. The file has become corrupted somehow.
// Not much to do here, other than to log the error and use the current client version
// as the minimmum.
ErrorLog.log(ProjectFile.class,
"Invalid or missing Minimum Version Required property in the ApplicationConfiguration", new Exception());
min = Versions.CURRENT;
}
if (project != null) {
Version requiredByProject = project.getRequiredVersion();
if (requiredByProject.isLaterThan(min)) {
min = requiredByProject;
}
}
properties.setProperty(REQUIRES_VERSION, min.toString());
}