use of com.enonic.xp.repo.impl.dump.serializer.json.DumpMetaJsonSerializer in project xp by enonic.
the class RepositoryIdDumpUpgrader method upgradeDumpMetaFile.
private void upgradeDumpMetaFile() {
final DumpMeta sourceDumpMeta = dumpReader.getDumpMeta();
final DumpMeta upgradedDumpMeta = DumpMeta.create(sourceDumpMeta).systemDumpResult(upgradeSystemDumpResult(sourceDumpMeta.getSystemDumpResult())).build();
final Path dumpMetaFile = dumpReader.getMetaDataFile();
try {
Files.write(dumpMetaFile, new DumpMetaJsonSerializer().serialize(upgradedDumpMeta));
} catch (IOException e) {
throw new DumpUpgradeException("Unable to upgrade dump meta file: " + dumpMetaFile.getFileName(), e);
}
}
Aggregations