|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.entityfs.impl.impl.AbstractFileSystem
public abstract class AbstractFileSystem
This is an abstract base class for FileSystem implementations.
| Constructor Summary | |
|---|---|
protected |
AbstractFileSystem(String name,
SupportObjects fso,
FileSystemDelegate fsd)
|
| Method Summary | ||
|---|---|---|
void |
addObserver(EntityObserver obs)
Add an observer. |
|
void |
close()
Delegates to the FileSystemAdapter. |
|
int |
countObservers()
Count the number of currently listening observers. |
|
void |
deleteObserver(EntityObserver obs)
Deregister the observer. |
|
void |
deleteObservers()
Deregisters all observers. |
|
protected void |
finalize()
|
|
AccessController |
getAccessController()
Get the file system's access controller. |
|
int |
getBufferSize()
Get the buffer size configured when creating the file system. |
|
|
getCapability(FileSystemCapabilityType<T> t)
Get a supported FileSystemCapability. |
|
|
getCapabilityForEntity(EntityView ev,
EntityCapabilityType<T> type)
Get a supported EntityCapability for an Entity (or an
entity viewed by an EntityView. |
|
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. |
|
LockAcquiringStrategy |
getLockAcquiringStrategy()
Get the file system's lock acquiring strategy object. |
|
EntityLockAdapterFactory |
getLockAdapterFactory()
Get the file system's lock adapter factory. |
|
LockCommandExecutor |
getLockCommandExecutor()
Get the file system's lock command executor. |
|
LogAdapter |
getLogAdapter()
Convenient alternative to calling getLogAdapterHolder().getLogAdapter(). |
|
LogAdapterHolder |
getLogAdapterHolder()
Get the file system's current LogAdapterHolder. |
|
String |
getName()
Get the file system's name. |
|
List<EntityObserver> |
getObserverList()
Get the list of EntityObserver:s that are registered for this
file system object. |
|
Directory |
getRootDirectory()
Get the file system's root directory. |
|
Set<FileSystemCapabilityType<?>> |
getSupportedCapabilities()
Get the set of all supported file system capability types for this file system. |
|
Set<EntityCapabilityType<?>> |
getSupportedEntityCapabilities()
Get the set of all supported entity capability types for this file system. |
|
SupportObjects |
getSupportObjects()
Get this file system's support objects. |
|
Directory |
getTemporaryFilesDirectory()
Get the directory where this file system keeps its temporary files. |
|
void |
init()
This method calls init on the file system delegate. |
|
boolean |
isAccessControlling()
Does the file system use any kind of access controls? |
|
void |
setLogAdapter(LogAdapter logAdapter)
|
|
void |
setRootDirectory(DirectoryImplementation di)
Set the file system's root directory. |
|
void |
setTemporaryFilesDirectory(Directory d)
Set the directory where this file system keeps its temporary files. |
|
boolean |
supportsCapability(FileSystemCapabilityType<?> cap)
Check if the file system supports a specific FileSystemCapability
. |
|
boolean |
supportsCapabilityForEntity(EntityView ev,
EntityCapabilityType<?> type)
Check if an Entity (or an entity viewed by an EntityView
supports a specific EntityCapability. |
|
boolean |
supportsCapabilityForEntityType(EntityType et,
EntityCapabilityType<?> type)
Check if a entity type supports a capability type in this file system. |
|
String |
toString()
This method delegates to ... |
|
void |
validateEntityName(String name,
EntityType et)
Default validation implementation. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.entityfs.FileSystem |
|---|
isLocking, isReadOnly, setReadOnly |
| Constructor Detail |
|---|
protected AbstractFileSystem(String name,
SupportObjects fso,
FileSystemDelegate fsd)
| Method Detail |
|---|
public void init()
init on the file system delegate. Be sure to
call super.init() if overriding this method.
init in interface FileSystemImplementationpublic void setRootDirectory(DirectoryImplementation di)
FileSystemImplementation
setRootDirectory in interface FileSystemImplementationdi - The root directory.public void setTemporaryFilesDirectory(Directory d)
FileSystem
setTemporaryFilesDirectory in interface FileSystemd - The Directory for temporary files. The directory must be
in this file system.FileSystem.getTemporaryFilesDirectory()public Directory getTemporaryFilesDirectory()
FileSystemFileSystem.setTemporaryFilesDirectory(Directory) before calling this
method.
getTemporaryFilesDirectory in interface FileSystemnull if it has not
been set.public FileSystemDelegate getDelegate()
FileSystemImplementation
getDelegate in interface FileSystemImplementationpublic FileSystemAdapter getFileSystemAdapter()
FileSystemImplementation
getFileSystemAdapter in interface FileSystemImplementationpublic void addObserver(EntityObserver obs)
Observable
addObserver in interface Observableobs - The new observer.public void deleteObserver(EntityObserver obs)
Observable
deleteObserver in interface Observableobs - The observer to deregister. If the observer is not listening
to this observable, this method does nothing.public void deleteObservers()
Observable
deleteObservers in interface Observablepublic int countObservers()
Observable
countObservers in interface Observablepublic List<EntityObserver> getObserverList()
FileSystemImplementationEntityObserver:s that are registered for this
file system object. The returned list should be immutable.
getObserverList in interface FileSystemImplementationEntityObserver:s.public String getName()
FileSystem
getName in interface FileSystempublic boolean isAccessControlling()
FileSystem
isAccessControlling in interface FileSystemtrue if the file system is access controlling, false if not.public LogAdapterHolder getLogAdapterHolder()
FileSystemLogAdapterHolder.
getLogAdapterHolder in interface FileSystemLogAdapterHolder.FileSystem.getLogAdapter()public EntityLockAdapterFactory getLockAdapterFactory()
FileSystemLockAdapter:s for their own locking.
getLockAdapterFactory in interface FileSystempublic LockAcquiringStrategy getLockAcquiringStrategy()
FileSystem
getLockAcquiringStrategy in interface FileSystempublic SupportObjects getSupportObjects()
FileSystemImplementation
getSupportObjects in interface FileSystemImplementationpublic LogAdapter getLogAdapter()
FileSystemgetLogAdapterHolder().getLogAdapter().
The LogAdapter returned from this method should not be saved by
the client. (Not for a long time, anyway.) Save the file system's
LogAdapterHolder instead or let the client call getLogAdapter() every time it wants to log.
getLogAdapter in interface FileSystemLogAdapter.FileSystem.getLogAdapterHolder()public AccessController getAccessController()
FileSystem
getAccessController in interface FileSystemDisabledAccessController.INSTANCE if access controls are
disabled.public LockCommandExecutor getLockCommandExecutor()
FileSystemThis is used, for instance, by utility classes to acquire locks required for access control checks and other operations.
The default LockCommandExecutor implementation is
LockCommandExecutorImpl. Some
AccessController:s may require other implementations.
getLockCommandExecutor in interface FileSystempublic EventManager getEventManager()
FileSystemImplementation
getEventManager in interface FileSystemImplementationpublic int getBufferSize()
FileSystem
getBufferSize in interface FileSystempublic Directory getRootDirectory()
FileSystem
getRootDirectory in interface FileSystempublic void setLogAdapter(LogAdapter logAdapter)
public boolean supportsCapability(FileSystemCapabilityType<?> cap)
FileSystemFileSystemCapability
. Capabilities are either supported directly by file system
implementations or by CapabilityProvider:s given to the file
system at creation time.
supportsCapability in interface FileSystemcap - The capability's FileSystemCapabilityType.
true if the file system supports the capability, false if not.FileSystem.getCapability(FileSystemCapabilityType)public <T extends FileSystemCapability> T getCapability(FileSystemCapabilityType<T> t)
FileSystemFileSystemCapability.
getCapability in interface FileSystemt - The capability's FileSystemCapabilityType.
FileSystem.supportsCapability(FileSystemCapabilityType)public Set<FileSystemCapabilityType<?>> getSupportedCapabilities()
FileSystem
getSupportedCapabilities in interface FileSystem
public boolean supportsCapabilityForEntity(EntityView ev,
EntityCapabilityType<?> type)
FileSystemEntity (or an entity viewed by an EntityView
supports a specific EntityCapability. Capabilities are either
supported directly by file system implementations or by
CapabilityProvider:s given to the file system at creation time.
supportsCapabilityForEntity in interface FileSystemev - The EntityView to check for.type - The capability's EntityCapabilityType.
true if the entity supports the capability, false
if not.FileSystem.getCapabilityForEntity(EntityView, EntityCapabilityType),
FileSystem.supportsCapabilityForEntityType(EntityType, EntityCapabilityType),
EntityView.supportsCapability(EntityCapabilityType)
public boolean supportsCapabilityForEntityType(EntityType et,
EntityCapabilityType<?> type)
FileSystemCapabilityProvider:s given to the file system at creation
time.
There may be exceptions to the result returned by this method for certain
special entities (i.e. the root directory). For querying about
capabilities of existing entities, use the
EntityView.supportsCapability(EntityCapabilityType) method
instead.
supportsCapabilityForEntityType in interface FileSystemet - The entity type.type - The entity capability type.
true if the capability type is supported by the supplied
entity type in this file systems. (There may be exceptions to that rule,
however. See above.)FileSystem.supportsCapabilityForEntity(EntityView, EntityCapabilityType)
public <T extends EntityCapability> T getCapabilityForEntity(EntityView ev,
EntityCapabilityType<T> type)
FileSystemEntityCapability for an Entity (or an
entity viewed by an EntityView.
getCapabilityForEntity in interface FileSystemev - The EntityView to get the capability object for.type - The capability's EntityCapabilityType.
EntityCapability object for the Entity.FileSystem.supportsCapabilityForEntity(EntityView, EntityCapabilityType),
EntityView.getCapability(EntityCapabilityType)public Set<EntityCapabilityType<?>> getSupportedEntityCapabilities()
FileSystem
getSupportedEntityCapabilities in interface FileSystem
public void validateEntityName(String name,
EntityType et)
validateEntityName in interface FileSystemImplementationname - The name to validate.et - The type of the entity.public void close()
FileSystemAdapter.
close in interface FileSystempublic String toString()
toString in class Object
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||