use of com.enonic.xp.repo.impl.dump.PathRef 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();
}
use of com.enonic.xp.repo.impl.dump.PathRef in project xp by enonic.
the class AbstractDumpReader method loadBranch.
@Override
public BranchLoadResult loadBranch(final RepositoryId repositoryId, final Branch branch, final LineProcessor<EntryLoadResult> processor) {
final PathRef tarFile = filePaths.branchMetaPath(repositoryId, branch);
listener.loadingBranch(repositoryId, branch, getBranchSuccessfulCountFromMeta(repositoryId, branch));
final BranchLoadResult.Builder builder = BranchLoadResult.create(branch);
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();
}
use of com.enonic.xp.repo.impl.dump.PathRef in project xp by enonic.
the class AbstractDumpReader method loadVersions.
@Override
public VersionsLoadResult loadVersions(final RepositoryId repositoryId, final LineProcessor<EntryLoadResult> processor) {
final PathRef tarFile = filePaths.versionMetaPath(repositoryId);
listener.loadingVersions(repositoryId);
final VersionsLoadResult.Builder builder = VersionsLoadResult.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();
}
use of com.enonic.xp.repo.impl.dump.PathRef in project xp by enonic.
the class AbstractDumpWriter method openBranchMeta.
@Override
public void openBranchMeta(final RepositoryId repositoryId, final Branch branch) {
final PathRef branchMetaPath = filePaths.branchMetaPath(repositoryId, branch);
openTarStream(branchMetaPath);
}
use of com.enonic.xp.repo.impl.dump.PathRef in project xp by enonic.
the class AbstractDumpWriter method openCommitsMeta.
@Override
public void openCommitsMeta(final RepositoryId repositoryId) {
final PathRef commitMetaPath = filePaths.commitMetaPath(repositoryId);
openTarStream(commitMetaPath);
}
Aggregations