|
|||||||||
| 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 DirectoryAdaptername - The name of the entity.
EntityType, or null if no such entity exists.public boolean containsEntity(String name)
DirectoryAdapter
containsEntity in interface DirectoryAdaptername - 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()
EntityAdapterEntityType for this entity.
getEntityType in interface EntityAdapterEntityType for this entity.public void assertCanBeDeleted(Collection<String> c)
DirectoryAdapterchildEntitiesToDelete entities were deleted first. be empty.
assertCanBeDeleted in interface DirectoryAdapterc - The names of child entities to delete before
deleting the directory. This may be null.public void deleteChild(String name)
DirectoryAdapterIf the named child entity does not exist, this method exits silently.
deleteChild in interface DirectoryAdaptername - The name of the child to delete.public ZipEntry getZipEntry()
public long getLastModified()
EntityAdapter
getLastModified in interface EntityAdapterpublic void init()
init in interface EntityAdapterpublic T getFileSystemAdapter()
EntityAdapterFileSystemAdapter for the file system where the entity
is.
getFileSystemAdapter in interface EntityAdapterFileSystemAdapter.public boolean exists()
exists in interface EntityAdaptertrue if the entity exists.public boolean canRead()
canRead in interface EntityAdaptertrue if the entity can be read.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||