use of com.enonic.xp.node.NodeCommitEntries in project xp by enonic.
the class RepoDumper method dumpCommits.
private void dumpCommits() {
writer.openCommitsMeta(repository.getId());
try {
final NodeCommitQuery nodeCommitQuery = NodeCommitQuery.create().size(-1).build();
final NodeCommitEntries nodeCommitEntries = this.nodeService.findCommits(nodeCommitQuery).getNodeCommitEntries();
nodeCommitEntries.stream().map(nodeCommitEntry -> CommitDumpEntry.create().nodeCommitId(nodeCommitEntry.getNodeCommitId()).message(nodeCommitEntry.getMessage()).committer(nodeCommitEntry.getCommitter()).timestamp(nodeCommitEntry.getTimestamp()).build()).forEach(writer::writeCommitEntry);
} finally {
writer.closeMeta();
}
}
use of com.enonic.xp.node.NodeCommitEntries in project xp by enonic.
the class NodeCommitQueryResultFactory method create.
public static NodeCommitQueryResult create(final NodeCommitQuery query, final SearchResult searchResult) {
final NodeCommitQueryResult.Builder nodeCommitQueryResult = NodeCommitQueryResult.create();
nodeCommitQueryResult.hits(searchResult.getHits().getSize());
nodeCommitQueryResult.totalHits(searchResult.getTotalHits());
nodeCommitQueryResult.from(query.getFrom());
nodeCommitQueryResult.to(query.getSize());
final NodeCommitEntries nodeCommitEntries = buildNodeCommitEntries(query, searchResult);
nodeCommitQueryResult.nodeCommitEntries(nodeCommitEntries);
return nodeCommitQueryResult.build();
}
Aggregations