use of org.apache.jackrabbit.core.fs.BasedFileSystem in project jackrabbit by apache.
the class ObjectPersistenceManager method init.
//---------------------------------------------------< PersistenceManager >
/**
* {@inheritDoc}
*/
public void init(PMContext context) throws Exception {
if (initialized) {
throw new IllegalStateException("already initialized");
}
FileSystem wspFS = context.getFileSystem();
itemStateFS = new BasedFileSystem(wspFS, "/data");
/**
* store BLOB data in local file system in a sub directory
* of the workspace home directory
*/
LocalFileSystem blobFS = new LocalFileSystem();
blobFS.setRoot(new File(context.getHomeDir(), "blobs"));
blobFS.init();
this.blobFS = blobFS;
blobStore = new FileSystemBLOBStore(blobFS);
initialized = true;
}
use of org.apache.jackrabbit.core.fs.BasedFileSystem in project jackrabbit by apache.
the class BundleFsPersistenceManager method init.
/**
* {@inheritDoc}
*/
public void init(PMContext context) throws Exception {
if (initialized) {
throw new IllegalStateException("already initialized");
}
super.init(context);
this.name = context.getHomeDir().getName();
// create item fs
itemFs = new BasedFileSystem(context.getFileSystem(), "items");
// create correct blob store
if (useLocalFsBlobStore()) {
LocalFileSystem blobFS = new LocalFileSystem();
blobFS.setRoot(new File(context.getHomeDir(), "blobs"));
blobFS.init();
blobStore = new BundleFsPersistenceManager.FSBlobStore(blobFS);
} else {
blobStore = new BundleFsPersistenceManager.FSBlobStore(itemFs);
}
// load namespaces
binding = new BundleBinding(errorHandling, blobStore, getNsIndex(), getNameIndex(), context.getDataStore());
binding.setMinBlobSize(minBlobSize);
initialized = true;
}
use of org.apache.jackrabbit.core.fs.BasedFileSystem in project jackrabbit by apache.
the class XMLPersistenceManager method init.
//---------------------------------------------------< PersistenceManager >
/**
* {@inheritDoc}
*/
public void init(PMContext context) throws Exception {
if (initialized) {
throw new IllegalStateException("already initialized");
}
itemStateFS = new BasedFileSystem(context.getFileSystem(), "/data");
/**
* store BLOB data in local file system in a sub directory
* of the workspace home directory
*/
LocalFileSystem blobFS = new LocalFileSystem();
blobFS.setRoot(new File(context.getHomeDir(), "blobs"));
blobFS.init();
this.blobFS = blobFS;
blobStore = new FileSystemBLOBStore(blobFS);
initialized = true;
}
Aggregations