Search in sources :

Example 1 with FileDumpBlobStore

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);
}
Also used : Path(java.nio.file.Path) RepoLoadException(com.enonic.xp.repo.impl.dump.RepoLoadException) FileDumpBlobStore(com.enonic.xp.repo.impl.dump.blobstore.FileDumpBlobStore)

Example 2 with FileDumpBlobStore

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));
}
Also used : Path(java.nio.file.Path) FileDumpBlobStore(com.enonic.xp.repo.impl.dump.blobstore.FileDumpBlobStore)

Aggregations

FileDumpBlobStore (com.enonic.xp.repo.impl.dump.blobstore.FileDumpBlobStore)2 Path (java.nio.file.Path)2 RepoLoadException (com.enonic.xp.repo.impl.dump.RepoLoadException)1