|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FileSystemDelegate
The file system delegate is EntityFS' mechanism for a extensible file system
implementation without having an extensible file system object. The default
FileSystem implementation delegates all call that might involve
implementation-dependent logic to a FileSystemDelegate.
A file system's FileSystemDelegate implementation is mostly used for
introducing new FileSystemCapability:s. Calls to
other methods are commonly forwarded to the file system's
FileSystemAdapter. The abstract implementation in
AbstractFileSystemDelegate contain default
implementations of most methods in this interface.
Capability providers may proxy a file system's FileSystemDelegate to
introduce new FileSystemCapability:s. A default
proxy implementation exists in AbstractFileSystemDelegateProxy.
File system objects use their delegate's Object.toString() method.
EntityDelegate| Method Summary | ||
|---|---|---|
void |
close()
Close the file system. |
|
|
getCapabilityForEntityOrNull(EntityImplementation ei,
EntityCapabilityType<T> ect)
Get the entity capability object for the requested capability. |
|
|
getCapabilityOrNull(FileSystemCapabilityType<T> fsct)
Get the file system capability object for the requested capability. |
|
FileSystemAdapter |
getFileSystemAdapter()
Get the adapter to the backend implementation. |
|
FileSystemImplementation |
getOwner()
Get the file system object that owns this delegate. |
|
Set<FileSystemCapabilityType<?>> |
getSupportedCapabilities()
Get the set of supported file system capability types for the file system. |
|
Set<EntityCapabilityType<?>> |
getSupportedEntityCapabilities()
Get the set of supported entity capability types for this file system. |
|
void |
init()
This is called by the file system implementation after the object has been created but before the file system object is published. |
|
void |
setOwner(FileSystemImplementation fs)
This is called when the owning file system object has been created. |
|
TriState |
supportsCapability(FileSystemCapabilityType<?> fsct)
Does the file system support the specified capability? |
|
TriState |
supportsCapabilityForEntity(EntityImplementation ei,
EntityCapabilityType<?> ect)
Does the file system or capability provider support the requested entity capability for the supplied entity? |
|
TriState |
supportsCapabilityForEntityType(EntityType et,
EntityCapabilityType<?> ect)
Does the file system or capability provider support the requested entity capability for entities of the supplied type? |
|
void |
validateEntityName(String name,
EntityType et)
Validate that the entity name is valid in this file system. |
|
| Method Detail |
|---|
void init()
It is the responsibility of this method to call init on either
its proxied FileSystemDelegate or on the file system's
FileSystemAdapter.
void setOwner(FileSystemImplementation fs)
fs - The file system object.FileSystemImplementation getOwner()
FileSystemAdapter getFileSystemAdapter()
TriState supportsCapability(FileSystemCapabilityType<?> fsct)
fsct - The file system capability type identifier.
YES, NO or DONT_CARE
<T extends FileSystemCapability> T getCapabilityOrNull(FileSystemCapabilityType<T> fsct)
throws UnsupportedCapabilityException
null.
fsct - The file system capability type.
null if the file
system capability is not supported by this capability visitor.
UnsupportedCapabilityException - If a capability is explicitly
disabled by this visitor (supportsCapability returns NO).Set<FileSystemCapabilityType<?>> getSupportedCapabilities()
TriState supportsCapabilityForEntity(EntityImplementation ei,
EntityCapabilityType<?> ect)
ect - The entity capability type.ei - The entity.
YES, NO or DONT_CAREFileSystem.supportsCapabilityForEntity(org.entityfs.EntityView,
EntityCapabilityType)
TriState supportsCapabilityForEntityType(EntityType et,
EntityCapabilityType<?> ect)
This method should return true also if the file system supports
the capability for only some of the entities of the supplied type.
et - The entity type.ect - The entity capability type.
YES, NO or DONT_CARE.FileSystem.supportsCapabilityForEntityType(EntityType,
EntityCapabilityType)
<T extends EntityCapability> T getCapabilityForEntityOrNull(EntityImplementation ei,
EntityCapabilityType<T> ect)
throws UnsupportedCapabilityException
null.
ect - The entity capability type.ei - The entity.
null if the entity
capability is not supported by this capability visitor.
UnsupportedCapabilityException - If a capability is explicitly
disabled by this visitor (supportsCapabilityForEntity returns NO
).Set<EntityCapabilityType<?>> getSupportedEntityCapabilities()
void validateEntityName(String name,
EntityType et)
throws IllegalArgumentException
name - The entity name.et - The entity type.
IllegalArgumentException - If the entity name is invalid.void close()
close on either its proxied file system delegate or on the file system
adapter if it is not a proxy.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||