use of com.enonic.xp.dump.CommitsLoadResult in project xp by enonic.
the class AbstractDumpReader method loadCommits.
@Override
public CommitsLoadResult loadCommits(final RepositoryId repositoryId, final LineProcessor<EntryLoadResult> processor) {
final PathRef tarFile = filePaths.commitMetaPath(repositoryId);
listener.loadingCommits(repositoryId);
final CommitsLoadResult.Builder builder = CommitsLoadResult.create();
if (!exists(tarFile)) {
return builder.build();
}
final EntriesLoadResult result = doLoadEntries(processor, tarFile);
return builder.successful(result.getSuccessful()).errors(result.getErrors().stream().map(error -> LoadError.error(error.getMessage())).collect(Collectors.toList())).build();
}
Aggregations