|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.impl.impl.adapter.AbstractRWEntityAdapter<RamFileSystemAdapter,RamDirectoryAdapter>
org.entityfs.ram.AbstractRamEntityAdapter
public abstract class AbstractRamEntityAdapter
This is an abstract base class for entity adapters in a RAM file system.
Constructor Summary | |
---|---|
protected |
AbstractRamEntityAdapter(RamFileSystemAdapter fs,
RamDirectoryAdapter parent,
String name)
|
Method Summary | |
---|---|
boolean |
canRead()
Subclasses may override as needed. |
boolean |
canWrite()
Subclasses may override as needed. |
void |
create()
Create the backend representation for this entity adapter. |
void |
delete()
Delete the entity from the underlying file system. |
boolean |
exists()
Subclasses may override as needed. |
T |
getFileSystemAdapter()
Get the FileSystemAdapter for the file system where the entity
is. |
long |
getLastModified()
Get the last modification time for an entity. |
void |
init()
This implementation does nothing. |
void |
rename(String newName,
DirectoryAdapter newParent)
Move and/or rename the entity. |
void |
setLastModified(long time)
Set the entity's last modification time. |
Methods inherited from class org.entityfs.impl.impl.adapter.AbstractRWEntityAdapter |
---|
getName, getParent, setName, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.entityfs.impl.adapter.EntityAdapter |
---|
getEntityType |
Constructor Detail |
---|
protected AbstractRamEntityAdapter(RamFileSystemAdapter fs, RamDirectoryAdapter parent, String name)
Method Detail |
---|
public boolean exists()
exists
in interface EntityAdapter
true
if the entity exists.public boolean canRead()
canRead
in interface EntityAdapter
true
if the entity can be read.public boolean canWrite()
AbstractRWEntityAdapter
canWrite
in interface EntityAdapter
canWrite
in class AbstractRWEntityAdapter<RamFileSystemAdapter,RamDirectoryAdapter>
true
if the entity can be written to.public long getLastModified()
EntityAdapter
public void setLastModified(long time)
EntityAdapter
time
- The new last modification time.public void delete()
EntityAdapter
This method is also responsible for calling
ChildRegisteringDirectoryAdapter.unregisterChild(EntityAdapter)
on its parent directory.
public void rename(String newName, DirectoryAdapter newParent)
EntityAdapter
newName
- The entity's new name.newParent
- The entity adapter's new parent. This is the same as the
old parent if the entity is only renamed.public void create()
EntityAdapter
public void init()
init
in interface EntityAdapter
public T getFileSystemAdapter()
EntityAdapter
FileSystemAdapter
for the file system where the entity
is.
getFileSystemAdapter
in interface EntityAdapter
FileSystemAdapter
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |