org.entityfs.impl
Interface FileSystemImplementation

All Superinterfaces:
FileSystem, Observable
All Known Implementing Classes:
AbstractFileSystem, ROFileSystemImpl, RWFileSystemImpl

public interface FileSystemImplementation
extends FileSystem

This is the interface for a FileSystem implementation. It contains methods that are only used by file system implementations; not by file system clients. A FileSystem object can always be cast to a FileSystemImplementation object.

A file system implementation's SupportObjects is an immutable collection of support objects that file system, entity and capability implementations occasionally need.

Capabilities may proxy FileSystem objects. The consequences are discussed in the Developer's guide.

The methods in this interface should only be used by file system and capability implementations.

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

Method Summary
 FileSystemDelegate getDelegate()
          Get the file system delegate.
 EventManager getEventManager()
          Get this file system's event manager.
 FileSystemAdapter getFileSystemAdapter()
          Get the backend adapter for this file system.
 List<EntityObserver> getObserverList()
          Get the list of EntityObserver:s that are registered for this file system object.
 SupportObjects getSupportObjects()
          Get this file system's support objects.
 void init()
          This is called after the file system object has been created but before it is published.
 void setRootDirectory(DirectoryImplementation di)
          Set the file system's root directory.
 void validateEntityName(String name, EntityType et)
          Validate that the entity name is valid in this file system implementation.
 
Methods inherited from interface org.entityfs.FileSystem
close, getAccessController, getBufferSize, getCapability, getCapabilityForEntity, getLockAcquiringStrategy, getLockAdapterFactory, getLockCommandExecutor, getLogAdapter, getLogAdapterHolder, getName, getRootDirectory, getSupportedCapabilities, getSupportedEntityCapabilities, getTemporaryFilesDirectory, isAccessControlling, isLocking, isReadOnly, setReadOnly, setTemporaryFilesDirectory, supportsCapability, supportsCapabilityForEntity, supportsCapabilityForEntityType
 
Methods inherited from interface org.entityfs.event.Observable
addObserver, countObservers, deleteObserver, deleteObservers
 

Method Detail

init

void init()
This is called after the file system object has been created but before it is published. init has not been called yet on the root directory when this method is called.

This method is responsible for calling init on the FileSystemDelegate.


getDelegate

FileSystemDelegate getDelegate()
Get the file system delegate.

Returns:
The file system delegate.

getFileSystemAdapter

FileSystemAdapter getFileSystemAdapter()
Get the backend adapter for this file system. This should only be used by those wanting to short circuit the file system delegates and knows what adapter implementation that they can expect here. (I.e. other file system delegates and perhaps some capability providers.) Use on own risk...

Returns:
The file system adapter.

getObserverList

List<EntityObserver> getObserverList()
Get the list of EntityObserver:s that are registered for this file system object. The returned list should be immutable.

Returns:
The list of registered EntityObserver:s.

getSupportObjects

SupportObjects getSupportObjects()
Get this file system's support objects.

Returns:
This file system's support objects.

getEventManager

EventManager getEventManager()
Get this file system's event manager. This is used by entity implementations to fire events.

Returns:
This file system's event manager.

validateEntityName

void validateEntityName(String name,
                        EntityType et)
                        throws IllegalArgumentException
Validate that the entity name is valid in this file system implementation.

Parameters:
name - The name to validate.
et - The type of the entity.
Throws:
IllegalArgumentException - If the entity name is invalid.

setRootDirectory

void setRootDirectory(DirectoryImplementation di)
Set the file system's root directory. This is called when the file system is created.

Parameters:
di - The root directory.