Compare commits

...

4 commits

Author SHA1 Message Date
anhefti
3a8d29fe6e SEBSERV-455 for 1.6 2024-03-12 15:54:06 +01:00
anhefti
0c04a358f4 SEBSERV-455 2024-03-07 16:33:30 +01:00
anhefti
b1bd21c424 Merge branch 'downgrade_exam_config' into dev-1.5 2024-03-07 15:31:08 +01:00
anhefti
a096253e6d fix error on downgrade for SEB Settings 2024-03-04 13:10:39 +01:00
4 changed files with 10 additions and 4 deletions

View file

@ -46,7 +46,7 @@ public class DowngradeSEBSettingsCheck implements DBIntegrityCheck {
"400,401,402,403,404,405,406,407,408,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516," +
"517,518,519,520,804,812,900,901,904,919,928,940,941,942,950,951,952,953,960,961,970,971,972,973,974,975," +
"1100,1101,1102,1103,1104,1105,1106,1108,1116,1120,1121,1122,1123,1124,1125,1129,1130,1131,1132,1133,1500," +
"1501,1502,1503,1504,1505,1506,1508,1516,1530,1531,1532,1533,1551,1578,";
"1501,1502,1503,1504,1505,1506,1508,1516,1530,1531,1532,1533,1551,1578,947";
private final boolean fixDowngrade;
public DowngradeSEBSettingsCheck(
@ -139,7 +139,7 @@ public class DowngradeSEBSettingsCheck implements DBIntegrityCheck {
"DELETE FROM "+ schemaName +".flyway_schema_history WHERE version > " + lastMigrationVersion);
prepareStatement.execute();
INIT_LOGGER.info(" ---> Deleted {} entries from table flyway_schema_history", deletedOrientation);
INIT_LOGGER.info(" ---> Deleted entries from table flyway_schema_history until version: {}", lastMigrationVersion);
return "Successfully deleted SEB Settings attributes: " + allNames;
} catch (final Exception e) {

View file

@ -31,4 +31,9 @@ public final class DAOLoggingSupport {
result.onError(error -> log.error("Unexpected error. Object processing is skipped: ", error)));
}
public static <T> Stream<T> logMinAndSkipOnError(final Result<T> result) {
return Result.skipOnError(
result.onError(error -> log.error("Unexpected error. Object processing is skipped: {}", error.getMessage())));
}
}

View file

@ -120,7 +120,7 @@ public class ConfigurationAttributeDAOImpl implements ConfigurationAttributeDAO
.execute()
.stream()
.map(ConfigurationAttributeDAOImpl::toDomainModel)
.flatMap(DAOLoggingSupport::logAndSkipOnError)
.flatMap(DAOLoggingSupport::logMinAndSkipOnError)
.filter(predicate)
.collect(Collectors.toList()));
}
@ -153,7 +153,7 @@ public class ConfigurationAttributeDAOImpl implements ConfigurationAttributeDAO
.execute()
.stream()
.map(ConfigurationAttributeDAOImpl::toDomainModel)
.flatMap(DAOLoggingSupport::logAndSkipOnError)
.flatMap(DAOLoggingSupport::logMinAndSkipOnError)
.collect(Collectors.toList()));
}

View file

@ -1355,6 +1355,7 @@ sebserver.examconfig.props.label.allowPDFPlugIn.tooltip=The Adobe Acrobat Reader
sebserver.examconfig.props.label.downloadAndOpenSebConfig=Download and open SEB Config Files
sebserver.examconfig.props.label.downloadAndOpenSebConfig.tooltip=Download and open .seb config files regardless if downloading and opening other file types is allowed
sebserver.examconfig.props.label.allowCustomDownloadLocation=Allow user to select custom download / upload directory
sebserver.examconfig.props.label.allowCustomDownUploadLocation=Allow user to select custom download / upload directory
sebserver.examconfig.props.group.sessionHandling=Session Handling