org.entityfs.impl
Class AbstractFileSystemDelegateProxy

java.lang.Object
  extended by org.entityfs.support.lang.ObjectProxySupport<FileSystemDelegate>
      extended by org.entityfs.impl.AbstractFileSystemDelegateProxy
All Implemented Interfaces:
FileSystemDelegate
Direct Known Subclasses:
AbstractEntityAttributesEnablingFileSystemDelegate, CompressionEnablingFileSystemDelegate, SymbolicLinkEnablingFileSystemDelegateProxy

public abstract class AbstractFileSystemDelegateProxy
extends ObjectProxySupport<FileSystemDelegate>
implements FileSystemDelegate

This is an abstract stub implementation of a file system delegate proxy. It forwards all method calls to the proxied delegate. This can be used as a starting point for custom implementations.

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

Constructor Summary
protected AbstractFileSystemDelegateProxy(FileSystemDelegate proxied)
           
 
Method Summary
 void close()
          Close the file system.
 FileSystemAdapter getFileSystemAdapter()
          Get the adapter to the backend implementation.
 FileSystemImplementation getOwner()
          Get the file system object that owns this delegate.
 void init()
          This calls init on the proxied delegate.
 void setOwner(FileSystemImplementation fs)
          This is called when the owning file system object has been created.
 String toString()
          Delegate the call to toString to the proxied object.
 void validateEntityName(String name, EntityType et)
          Validate that the entity name is valid in this file system.
 
Methods inherited from class org.entityfs.support.lang.ObjectProxySupport
equals, getProxied, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.entityfs.impl.FileSystemDelegate
getCapabilityForEntityOrNull, getCapabilityOrNull, getSupportedCapabilities, getSupportedEntityCapabilities, supportsCapability, supportsCapabilityForEntity, supportsCapabilityForEntityType
 

Constructor Detail

AbstractFileSystemDelegateProxy

protected AbstractFileSystemDelegateProxy(FileSystemDelegate proxied)
Method Detail

init

public void init()
This calls init on the proxied delegate. Be sure to call super.init() if this is overridden.

Specified by:
init in interface FileSystemDelegate

setOwner

public void setOwner(FileSystemImplementation fs)
Description copied from interface: FileSystemDelegate
This is called when the owning file system object has been created.

Specified by:
setOwner in interface FileSystemDelegate
Parameters:
fs - The file system object.

getOwner

public FileSystemImplementation getOwner()
Description copied from interface: FileSystemDelegate
Get the file system object that owns this delegate.

Specified by:
getOwner in interface FileSystemDelegate
Returns:
The file system.

getFileSystemAdapter

public FileSystemAdapter getFileSystemAdapter()
Description copied from interface: FileSystemDelegate
Get the adapter to the backend implementation. This should only be used by delegate proxies.

Specified by:
getFileSystemAdapter in interface FileSystemDelegate
Returns:
The file system adapter.

validateEntityName

public void validateEntityName(String name,
                               EntityType et)
                        throws IllegalArgumentException
Description copied from interface: FileSystemDelegate
Validate that the entity name is valid in this file system.

Specified by:
validateEntityName in interface FileSystemDelegate
Parameters:
name - The entity name.
et - The entity type.
Throws:
IllegalArgumentException - If the entity name is invalid.

close

public void close()
Description copied from interface: FileSystemDelegate
Close the file system. This method is responsible for calling close on either its proxied file system delegate or on the file system adapter if it is not a proxy.

Specified by:
close in interface FileSystemDelegate

toString

public String toString()
Description copied from class: ObjectProxySupport
Delegate the call to toString to the proxied object.

Overrides:
toString in class ObjectProxySupport<FileSystemDelegate>
Returns:
The result from the proxied object.