org.entityfs.fs
Class AbstractFSFileSystemBuilder<T extends AbstractFSFileSystemBuilder<T>>

java.lang.Object
  extended by org.entityfs.impl.AbstractFileSystemBuilder<T>
      extended by org.entityfs.impl.impl.AbstractFileSystemBuilderImpl<T>
          extended by org.entityfs.fs.AbstractFSFileSystemBuilder<T>
Type Parameters:
T - The concrete implementation, returned from various getter methods.
All Implemented Interfaces:
FileSystemBuilder<T>, FSFileSystemBuilder<T>
Direct Known Subclasses:
FSROFileSystemBuilder, FSRWFileSystemBuilder

public abstract class AbstractFSFileSystemBuilder<T extends AbstractFSFileSystemBuilder<T>>
extends AbstractFileSystemBuilderImpl<T>
implements FSFileSystemBuilder<T>

Abstract base class for file-backed file system builders.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
entityfs-fsfs

Field Summary
 
Fields inherited from interface org.entityfs.FileSystemBuilder
DEFAULT_BUFFER_SIZE
 
Constructor Summary
protected AbstractFSFileSystemBuilder()
           
 
Method Summary
protected  AdapterFactory createAdapterFactory()
          Subclasses implement this to create the right AdapterFactory implementation.
 File getRoot()
          Get the root directory of the file system to create.
 T setRoot(File root)
          Set the root of the file system.
protected  Collection<String> validate()
          Override the inherited method to add more validation.
 
Methods inherited from class org.entityfs.impl.impl.AbstractFileSystemBuilderImpl
create, createDefaultChildEntityManagerFactory, createFileSystem, createFileSystemDelegate, enableEvents, getChildEntityManagerFactory, getEventManager, isFileSystemSupportedByAllCapabilities, isReadOnly, setChildEntityManagerFactory, setEventManager
 
Methods inherited from class org.entityfs.impl.AbstractFileSystemBuilder
addCapabilityProvider, addCapabilityProviders, disableAccessControls, disableEntityValidityControls, enableLocking, getAccessController, getBufferSize, getCapabilityProviders, getCapabilityProvidersInternal, getEntityValidityControlStrategy, getLockAcquiringStrategy, getLockAdapterFactory, getLockCommandExecutor, getLogAdapter, getName, getThis, setAccessController, setBufferSize, setEntityValidityControlStrategy, setLockAcquiringStrategy, setLockAdapterFactory, setLockCommandExecutor, setLogAdapter, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.entityfs.FileSystemBuilder
addCapabilityProvider, addCapabilityProviders, create, disableAccessControls, disableEntityValidityControls, enableEvents, enableLocking, getAccessController, getBufferSize, getCapabilityProviders, getEntityValidityControlStrategy, getLockAcquiringStrategy, getLockAdapterFactory, getLogAdapter, getName, isLockingSupported, setAccessController, setBufferSize, setEntityValidityControlStrategy, setLockAcquiringStrategy, setLockAdapterFactory, setLogAdapter, setName
 

Constructor Detail

AbstractFSFileSystemBuilder

protected AbstractFSFileSystemBuilder()
Method Detail

createAdapterFactory

protected AdapterFactory createAdapterFactory()
Description copied from class: AbstractFileSystemBuilderImpl
Subclasses implement this to create the right AdapterFactory implementation.

This method is called from AbstractFileSystemBuilderImpl.create().

Specified by:
createAdapterFactory in class AbstractFileSystemBuilderImpl<T extends AbstractFSFileSystemBuilder<T>>
Returns:
An AdapterFactory implementation.

setRoot

public T setRoot(File root)
Set the root of the file system. The File object must represent a directory.

This property must be set.

Specified by:
setRoot in interface FSFileSystemBuilder<T extends AbstractFSFileSystemBuilder<T>>
Parameters:
root - The root directory.
Returns:
The builder.

getRoot

public File getRoot()
Get the root directory of the file system to create.

Specified by:
getRoot in interface FSFileSystemBuilder<T extends AbstractFSFileSystemBuilder<T>>
Returns:
The root directory of the file system to create. The path to the directory is canonical.

validate

protected Collection<String> validate()
Override the inherited method to add more validation.

Overrides:
validate in class AbstractFileSystemBuilder<T extends AbstractFSFileSystemBuilder<T>>
Returns:
A Collection of error messages. Can be empty but never null.