org.entityfs.impl.adapter
Interface FileSystemAdapter

All Known Implementing Classes:
AbstractFileSystemAdapter, RamFileSystemAdapter, ZipFileSystemAdapter

public interface FileSystemAdapter

This is the file system's backend adapter.

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

Unlike FileSystemDelegate:s, file system adapters must never be proxied. Clients should always be able to assume a specific implementation, if they have reason to know about it. For instance, a capability implementation that is specific for a file system implementation must always be able to cast a file system adapter to that file system's implementation of it.

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

Method Summary
 void close()
          The file system delegates to this method when it is closed.
 int getBufferSize()
          Get the default size of temporary memory buffers for the file system
 LogAdapter getLogAdapter()
          Get the file system's log adapter.
 void init()
          This method is called after the file system has been created but before it is published.
 boolean isCaseSensitive()
          Is the file system backend case sensitive?
 void validateEntityName(String name, EntityType et)
          Validate that the entity name is valid in this file system implementation.
 

Method Detail

init

void init()
This method is called after the file system has been created but before it is published.


getLogAdapter

LogAdapter getLogAdapter()
Get the file system's log adapter. File system adapter and entity adapter implementations use this for logging.

Returns:
The file system's log adapter.

isCaseSensitive

boolean isCaseSensitive()
Is the file system backend case sensitive?

Returns:
true if the file system is case sensitive.

close

void close()
The file system delegates to this method when it is closed. This method should release backend resources held by the file system.


validateEntityName

void validateEntityName(String name,
                        EntityType et)
                        throws IllegalArgumentException
Validate that the entity name is valid in this file system implementation. This method is called with the entity names that pass the validation in EntityLocations.validateEntityName(String).

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

getBufferSize

int getBufferSize()
Get the default size of temporary memory buffers for the file system

Returns:
The default size in bytes.