use of com.enonic.xp.repo.impl.dump.blobstore.FileDumpBlobStore in project xp by enonic.
the class FileDumpReader method create.
public static FileDumpReader create(final SystemLoadListener listener, Path basePath, final String dumpName, FilePaths filePaths) {
Preconditions.checkArgument(FileNames.isSafeFileName(dumpName));
final Path dumpPath = basePath.resolve(dumpName);
if (!Files.isDirectory(dumpPath)) {
throw new RepoLoadException("Directory is not a valid dump directory: [" + dumpPath + "]");
}
return new FileDumpReader(listener, filePaths, new FileDumpBlobStore(dumpPath), dumpPath);
}
use of com.enonic.xp.repo.impl.dump.blobstore.FileDumpBlobStore in project xp by enonic.
the class FileDumpWriter method create.
public static FileDumpWriter create(final Path basePath, final String dumpName, final BlobStore blobStore, final FilePaths filePaths) {
Preconditions.checkArgument(FileNames.isSafeFileName(dumpName));
final Path dumpPath = basePath.resolve(dumpName);
return new FileDumpWriter(blobStore, filePaths, dumpPath, new FileDumpBlobStore(dumpPath));
}
Aggregations