|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.impl.impl.adapter.AbstractROEntityAdapter<ZipFileSystemAdapter,ZipDirectoryAdapter>
org.entityfs.zip.ZipDirectoryAdapter
public class ZipDirectoryAdapter
Constructor Summary | |
---|---|
ZipDirectoryAdapter(ZipFileSystemAdapter fs,
ZipDirectoryAdapter parent,
AbsoluteLocation loc,
ZipEntry ze,
org.entityfs.zip.ZipFileDirectoryNode myNode)
|
Method Summary | |
---|---|
void |
assertCanBeDeleted(Collection<String> c)
Check if the directory can be deleted provided that all the childEntitiesToDelete entities were deleted first. |
boolean |
canRead()
Subclasses may override as needed. |
boolean |
containsEntity(String name)
Check if the directory contains an entity with the given name (case sensitive or insensitive depending on the file system). |
String |
createTempFile(String prefix,
String suffix,
String suggestedName)
|
void |
deleteChild(String name)
Delete the named child. |
boolean |
exists()
Subclasses may override as needed. |
EntityType |
getChildEntityType(String name)
Get the type of the child entity with the given name, |
String[] |
getEntityNames()
Get an array with the names of all child entities. |
EntityType |
getEntityType()
Get the EntityType for this entity. |
T |
getFileSystemAdapter()
Get the FileSystemAdapter for the file system where the entity
is. |
long |
getLastModified()
Get the last modification time for an entity. |
ZipEntry |
getZipEntry()
|
void |
init()
This implementation does nothing. |
Methods inherited from class org.entityfs.impl.impl.adapter.AbstractROEntityAdapter |
---|
assertCanBeDeleted, canWrite, create, delete, getName, getParent, rename, setLastModified |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.entityfs.zip.ZipEntityAdapter |
---|
getZipEntry |
Methods inherited from interface org.entityfs.impl.adapter.EntityAdapter |
---|
canRead, canWrite, create, delete, exists, getFileSystemAdapter, getLastModified, getName, getParent, init, rename, setLastModified |
Constructor Detail |
---|
public ZipDirectoryAdapter(ZipFileSystemAdapter fs, ZipDirectoryAdapter parent, AbsoluteLocation loc, ZipEntry ze, org.entityfs.zip.ZipFileDirectoryNode myNode)
Method Detail |
---|
public EntityType getChildEntityType(String name)
DirectoryAdapter
getChildEntityType
in interface DirectoryAdapter
name
- The name of the entity.
EntityType
, or null
if no such entity exists.public boolean containsEntity(String name)
DirectoryAdapter
containsEntity
in interface DirectoryAdapter
name
- The name of the entity.
true
if the directory contains the named entity, false
otherwise.public String[] getEntityNames()
DirectoryAdapter
getEntityNames
in interface DirectoryAdapter
public String createTempFile(String prefix, String suffix, String suggestedName)
public EntityType getEntityType()
EntityAdapter
EntityType
for this entity.
getEntityType
in interface EntityAdapter
EntityType
for this entity.public void assertCanBeDeleted(Collection<String> c)
DirectoryAdapter
childEntitiesToDelete
entities were deleted first. be empty.
assertCanBeDeleted
in interface DirectoryAdapter
c
- The names of child entities to delete before
deleting the directory. This may be null
.public void deleteChild(String name)
DirectoryAdapter
If the named child entity does not exist, this method exits silently.
deleteChild
in interface DirectoryAdapter
name
- The name of the child to delete.public ZipEntry getZipEntry()
public long getLastModified()
EntityAdapter
getLastModified
in interface 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
.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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |