use of com.enonic.xp.repo.impl.dump.upgrade.obsoletemodel.pre6.Pre6BranchDumpEntryJson in project xp by enonic.
the class RepositoryIdDumpUpgrader method upgradeBranchEntry.
@Override
protected byte[] upgradeBranchEntry(final RepositoryId repositoryId, final String entryContent) {
final Pre6BranchDumpEntryJson sourceBranchEntry = deserializeValue(entryContent, Pre6BranchDumpEntryJson.class);
final Pre6VersionDumpEntryJson sourceVersionEntry = sourceBranchEntry.getMeta();
final Pre6VersionDumpEntryJson updatedVersionEntry = upgradeVersionDumpEntry(sourceVersionEntry);
final Pre6BranchDumpEntryJson updatedBranchEntry = Pre6BranchDumpEntryJson.create(sourceBranchEntry).nodeId(upgradeString(sourceBranchEntry.getNodeId())).meta(updatedVersionEntry).build();
return serialize(updatedBranchEntry);
}
use of com.enonic.xp.repo.impl.dump.upgrade.obsoletemodel.pre6.Pre6BranchDumpEntryJson in project xp by enonic.
the class CommitDumpUpgrader method upgradeBranchEntry.
@Override
protected byte[] upgradeBranchEntry(final RepositoryId repositoryId, final String entryContent) {
if (processingMaster) {
final Pre6BranchDumpEntryJson sourceEntry = deserializeValue(entryContent, Pre6BranchDumpEntryJson.class);
commitedNodeIds.add(sourceEntry.getNodeId());
commitedVersionIds.add(sourceEntry.getMeta().getVersion());
final BranchDumpEntryJson upgradedEntry = upgradeBranchDumpEntry(sourceEntry, true);
return serialize(upgradedEntry);
} else {
final Pre6BranchDumpEntryJson sourceEntry = deserializeValue(entryContent, Pre6BranchDumpEntryJson.class);
final boolean commit = commitedVersionIds.contains(sourceEntry.getMeta().getVersion());
final BranchDumpEntryJson upgradedEntry = upgradeBranchDumpEntry(sourceEntry, commit);
return serialize(upgradedEntry);
}
}
use of com.enonic.xp.repo.impl.dump.upgrade.obsoletemodel.pre6.Pre6BranchDumpEntryJson in project xp by enonic.
the class IndexAccessSegmentsDumpUpgrader method upgradeBranchEntry.
@Override
protected byte[] upgradeBranchEntry(final RepositoryId repositoryId, final String entryContent) {
final Pre4BranchDumpEntryJson branchDumpEntry = deserializeValue(entryContent, Pre4BranchDumpEntryJson.class);
final Pre6VersionDumpEntryJson upgradedVersionDumpEntry = upgradeVersionDumpEntry(repositoryId, branchDumpEntry.getMeta());
final Pre6BranchDumpEntryJson upgradedBranchDumpEntry = Pre6BranchDumpEntryJson.create().nodeId(branchDumpEntry.getNodeId()).binaries(branchDumpEntry.getBinaries()).meta(upgradedVersionDumpEntry).build();
return serialize(upgradedBranchDumpEntry);
}
Aggregations