use of org.openforis.commons.versioning.Version in project collect by openforis.
the class CollectInfoService method getCompleteInfo.
public CollectCompleteInfo getCompleteInfo() {
Version latestRelease = latestRelease();
Version currentVersion = Collect.VERSION;
CollectCompleteInfo info = new CollectCompleteInfo(currentVersion, latestRelease);
return info;
}
use of org.openforis.commons.versioning.Version in project collect by openforis.
the class CollectInfoService method getCompleteInfo.
public CollectCompleteInfo getCompleteInfo(HttpServletRequest request) {
Version latestRelease = latestRelease();
Version currentVersion = Collect.VERSION;
CollectCompleteInfo info = new CollectCompleteInfo(currentVersion, latestRelease);
info.setSaikuUrl(determineSaikuUrl(request));
return info;
}
use of org.openforis.commons.versioning.Version in project collect by openforis.
the class NewBackupFileExtractor method getInfo.
public SurveyBackupInfo getInfo() {
if (info == null) {
if (isOldFormat()) {
info = new SurveyBackupInfo();
info.setCollectVersion(new Version("3.9.0"));
} else {
info = extractInfo();
}
}
return info;
}
use of org.openforis.commons.versioning.Version in project collect by openforis.
the class SurveyBackupInfo method parse.
protected static SurveyBackupInfo parse(Properties props) {
SurveyBackupInfo info = new SurveyBackupInfo();
info.surveyUri = props.getProperty(SURVEY_URI_PROP);
info.surveyName = props.getProperty(SURVEY_NAME_PROP);
info.collectVersion = new Version(props.getProperty(COLLECT_VERSION_PROP));
String timestampString = props.getProperty(TIMESTAMP_PROP);
if (timestampString == null) {
info.timestamp = Dates.parseDate(props.getProperty(DATE_PROP));
} else {
info.timestamp = Dates.parseDateTime(timestampString);
}
return info;
}
use of org.openforis.commons.versioning.Version in project collect by openforis.
the class SurveyImportVM method onSummaryCreationComplete.
protected void onSummaryCreationComplete() {
SurveyBackupInfo info = summaryJob.getInfo();
Version version = VERSION;
if (version != null && version.compareTo(info.getCollectVersion(), VERSION_SIGNIFICANCE) < 0) {
MessageUtil.showError("survey.import_survey.error.outdated_system_version");
} else {
survey = summaryJob.getSurvey();
uploadedSurveyUri = info.getSurveyUri();
uploadedSurveyName = info.getSurveyName();
summaryJob = null;
notifyChange("uploadedSurveyUri");
updateForm();
}
}
Aggregations