|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.impl.AbstractFileSystemBuilder<T>
org.entityfs.impl.impl.AbstractFileSystemBuilderImpl<At4jZipFileSystemBuilder>
org.entityfs.at4jzip.At4jZipFileSystemBuilder
public final class At4jZipFileSystemBuilder
This is a builder class for building read only Zip file-backed file systems, based on the Zip implementation from the At4J project.
A Zip file system supports the FSCPersistent
,
FSCAt4jZipFileBacked
and FSCTRandomAccessFiles
capabilities. All
entities in the file system support the ECAt4jZipEntry
capability. Files that are
stored as uncompressed files in the Zip file also support the FCRandomAccess
capability.
The Zip file system must be closed when it is not needed anymore. If a file entity is used for the zip file, it is locked for reading by the Zip file system. The lock is released when the file system is closed.
org.entiyfs.zip.ZipFileSystemBuilder
Field Summary |
---|
Fields inherited from interface org.entityfs.FileSystemBuilder |
---|
DEFAULT_BUFFER_SIZE |
Constructor Summary | |
---|---|
At4jZipFileSystemBuilder()
Create a builder with default settings: LogAdapter : DefaultLogAdapter.DEFAULT_ADAPTER
EntityValidityControlStrategy : null (no one else
should have write access to the backend)
|
|
At4jZipFileSystemBuilder(LogAdapter logAdapter)
Create a builder with a custom log adapter. |
Method Summary | |
---|---|
protected AdapterFactory |
createAdapterFactory()
Subclasses implement this to create the right AdapterFactory
implementation. |
protected FileSystemImplementation |
createFileSystem(SupportObjects fso,
FileSystemDelegate fsd)
Subclasses implement this to return a new file system instance. |
protected FileSystemDelegate |
createFileSystemDelegate(FileSystemAdapter fsa)
This method is implemented by a subclass to create the file system delegate to use. |
boolean |
isLockingSupported()
Does the file system being built support locking? |
protected boolean |
isReadOnly()
Subclasses implement this method to tell if the file system they are about to create is read only. |
At4jZipFileSystemBuilder |
setZipFile(ZipFile zf)
Set the Zip file backing this file system. |
protected Collection<String> |
validate()
Validate that we can create a file system with the current properties. |
Methods inherited from class org.entityfs.impl.impl.AbstractFileSystemBuilderImpl |
---|
create, createDefaultChildEntityManagerFactory, enableEvents, getChildEntityManagerFactory, getEventManager, isFileSystemSupportedByAllCapabilities, setChildEntityManagerFactory, setEventManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public At4jZipFileSystemBuilder()
LogAdapter
: DefaultLogAdapter.DEFAULT_ADAPTER
EntityValidityControlStrategy
: null
(no one else
should have write access to the backend)
public At4jZipFileSystemBuilder(LogAdapter logAdapter)
EntityValidityControlStrategy
since no one should have write
access to the backing Zip file.
logAdapter
- The adapter to use for logging from the file system.Method Detail |
---|
public At4jZipFileSystemBuilder setZipFile(ZipFile zf)
When the file system created by this builder is closed, this Zip file will be closed.
this
public boolean isLockingSupported()
FileSystemBuilder
false
FileSystemBuilder.enableLocking()
protected Collection<String> validate()
AbstractFileSystemBuilder
super.validate()
).
validate
in class AbstractFileSystemBuilder<At4jZipFileSystemBuilder>
Collection
of error messages. Can be empty but never
null
.protected boolean isReadOnly()
AbstractFileSystemBuilderImpl
This method is called from AbstractFileSystemBuilderImpl.create()
.
isReadOnly
in class AbstractFileSystemBuilderImpl<At4jZipFileSystemBuilder>
true
, always.protected AdapterFactory createAdapterFactory()
AbstractFileSystemBuilderImpl
AdapterFactory
implementation.
This method is called from AbstractFileSystemBuilderImpl.create()
.
createAdapterFactory
in class AbstractFileSystemBuilderImpl<At4jZipFileSystemBuilder>
AdapterFactory
implementation.protected FileSystemDelegate createFileSystemDelegate(FileSystemAdapter fsa)
AbstractFileSystemBuilderImpl
This method is called from AbstractFileSystemBuilderImpl.create()
.
createFileSystemDelegate
in class AbstractFileSystemBuilderImpl<At4jZipFileSystemBuilder>
fsa
- The file system adapter.
protected FileSystemImplementation createFileSystem(SupportObjects fso, FileSystemDelegate fsd)
AbstractFileSystemBuilderImpl
This method is called from AbstractFileSystemBuilderImpl.create()
.
createFileSystem
in class AbstractFileSystemBuilderImpl<At4jZipFileSystemBuilder>
fso
- A collection of support objects.fsd
- The file system delegate.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |