Search in sources :

Example 1 with ImportNodeCommitParams

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);
    }
}
Also used : ImportNodeCommitParams(com.enonic.xp.node.ImportNodeCommitParams) IOException(java.io.IOException)

Aggregations

ImportNodeCommitParams (com.enonic.xp.node.ImportNodeCommitParams)1 IOException (java.io.IOException)1