Search in sources :

Example 1 with CommitDumpEntryJson

use of com.enonic.xp.repo.impl.dump.serializer.json.CommitDumpEntryJson in project xp by enonic.

the class CommitDumpUpgrader method createCommit.

private void createCommit(final RepositoryId repositoryId) {
    tmpDumpWriter.openCommitsMeta(repositoryId);
    try {
        final NodeCommitEntry nodeCommitEntry = NodeCommitEntry.create().build();
        commitId = new NodeCommitId().toString();
        final CommitDumpEntryJson commitDumpEntryJson = CommitDumpEntryJson.create().commitId(commitId).message("Dump upgrade").committer(nodeCommitEntry.getCommitter().toString()).timestamp(nodeCommitEntry.getTimestamp().toString()).build();
        final byte[] commitDumpEntrySerialized = serialize(commitDumpEntryJson);
        tmpDumpWriter.storeTarEntry(commitDumpEntrySerialized, commitId + ".json");
    } finally {
        tmpDumpWriter.closeMeta();
    }
}
Also used : NodeCommitEntry(com.enonic.xp.node.NodeCommitEntry) NodeCommitId(com.enonic.xp.node.NodeCommitId) CommitDumpEntryJson(com.enonic.xp.repo.impl.dump.serializer.json.CommitDumpEntryJson)

Aggregations

NodeCommitEntry (com.enonic.xp.node.NodeCommitEntry)1 NodeCommitId (com.enonic.xp.node.NodeCommitId)1 CommitDumpEntryJson (com.enonic.xp.repo.impl.dump.serializer.json.CommitDumpEntryJson)1