org.entityfs.impl.cap
Interface CapabilityProviderImplementation

All Superinterfaces:
CapabilityProvider
All Known Implementing Classes:
FileBasedDirectoryMetadataCapabilityProvider, FileBasedMetadataCapabilityProvider, GZipCompressionCapabilityProvider, MetadataCustomAttributesCapabilityProvider, MetadataCustomAttributesCapabilityProvider, MetadataNtfsAttributesCapabilityProvider, MetadataNtfsAttributesCapabilityProvider, MetadataUnixAttributesCapabilityProvider, MetadataUnixAttributesCapabilityProvider, RamSymbolicLinkCapabilityProvider

public interface CapabilityProviderImplementation
extends CapabilityProvider

This is implemented by capability providers.

After the file system that a capability provider adds capabilities to is created, the capability provider implementation object is not used anymore. Setting new values using setter methods do not modify the file system's behavior.

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

Method Summary
 boolean isReadOnlyFileSystemSupported()
           
 boolean isReadWriteFileSystemSupported()
           
 AdapterFactory proxyAdapterFactory(AdapterFactory af, LogAdapterHolder lah)
          This is called to let the capability provider proxy the file system's adapter factory before the file system is created.
 FileSystemDelegate proxyFileSystemDelegate(FileSystemDelegate fsd, SupportObjects so, boolean readOnly)
          This is used when creating the file system to let the capability provider proxy the file system delegate.
 DirectoryDelegate proxyRootDirectoryDelegate(FileSystemImplementation fs, FileSystemDelegate fsd, DirectoryDelegate dd, LogAdapterHolder lah)
          This is used when creating a file system to let the capability provider proxy the root directory delegate.
 

Method Detail

proxyAdapterFactory

AdapterFactory proxyAdapterFactory(AdapterFactory af,
                                   LogAdapterHolder lah)
                                   throws FileSystemConfigurationException
This is called to let the capability provider proxy the file system's adapter factory before the file system is created.

Parameters:
af - The adapter factory.
lah - The (future) file system's log adapter holder.
Returns:
The (future) file system's adapter factory, possibly proxied. If the adapter factory should not be proxied, return the supplied factory, never return null.
Throws:
FileSystemConfigurationException - On configuration errors.

proxyFileSystemDelegate

FileSystemDelegate proxyFileSystemDelegate(FileSystemDelegate fsd,
                                           SupportObjects so,
                                           boolean readOnly)
                                           throws FileSystemConfigurationException
This is used when creating the file system to let the capability provider proxy the file system delegate.

This method can check that all capabilities that the capability provider require in order to work are present in the FileSystemDelegate to proxy. If not, the method throws an FileSystemConfigurationException.

When this method is called, no owning FileSystemImplementation is created yet, so a call to FileSystemDelegate.getOwner() will return null.

Parameters:
fsd - The file system delegate to proxy.
so - The file system's support objects. Maybe useful for implementations of this method, maybe not.
readOnly - Is the file system read only?
Returns:
A file system delegate. Either a proxy of fsd or fsd itself. Never null.
Throws:
FileSystemConfigurationException - On configuration errors.

proxyRootDirectoryDelegate

DirectoryDelegate proxyRootDirectoryDelegate(FileSystemImplementation fs,
                                             FileSystemDelegate fsd,
                                             DirectoryDelegate dd,
                                             LogAdapterHolder lah)
                                             throws FileSystemConfigurationException
This is used when creating a file system to let the capability provider proxy the root directory delegate. Most capability providers do this.

Parameters:
fs - The file system object.
fsd - The file system delegate created by proxyFileSystemDelegate(FileSystemDelegate, SupportObjects, boolean) .
dd - The root directory delegate.
Returns:
A directory delegate. Either a proxy of dd or dd itself. Never null.
Throws:
FileSystemConfigurationException - On configuration errors.

isReadOnlyFileSystemSupported

boolean isReadOnlyFileSystemSupported()
Returns:
true if this capability provider supports read only file systems.

isReadWriteFileSystemSupported

boolean isReadWriteFileSystemSupported()
Returns:
true if this capability provider supports read/write file systems.