use of com.enonic.xp.node.ImportNodeCommitParams in project xp by enonic.
the class CommitEntryProcessor method addCommit.
private void addCommit(final EntryLoadResult.Builder result, final CommitDumpEntry commitDumpEntry) {
try {
ImportNodeCommitParams params = ImportNodeCommitParams.create().nodeCommitId(commitDumpEntry.getNodeCommitId()).message(commitDumpEntry.getMessage()).committer(commitDumpEntry.getCommitter()).timestamp(commitDumpEntry.getTimestamp()).build();
this.nodeService.importNodeCommit(params);
result.successful();
} catch (Exception e) {
final String message = String.format("Cannot load commit with id %s: %s", commitDumpEntry.getNodeCommitId(), e.getMessage());
result.error(EntryLoadError.error(message));
LOG.error(message, e);
}
}
Aggregations