|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChildEntityManager<T>
The child entity manager is used by DirectoryImplementation
:s to
manage their child entity objects. This is not the same as the child files
and directories themselves; those are handled by the
DirectoryAdapter
.
It is the child entity manager's responsibility that there will never be several entity objects for one entity.
Entity objects are created as needed. That means that a directory might contain children that its child entity manager does not have entity objects for.
Implementations do not have to be thread safe. Entity locking should make sure that the child entity manager is never accessed concurrently from different threads.
Method Summary | |
---|---|
void |
add(String name,
T entity)
Called when a child entity is added (created or moved into the directory). |
boolean |
contains(T ei)
Does this child entity manager contain the supplied entity? |
T |
getEntityOrNull(String name)
Get the named entity or null if it does not exist. |
void |
handleDisappeared(String name,
T entity)
Called whenever it is detected that a child entity has disappeared in an unnatural way. |
void |
remove(String name,
T entity)
This is called when an entity is removed (deleted or moved to another directory). |
Method Detail |
---|
void handleDisappeared(String name, T entity)
name
- The name of the disappeared entity.entity
- The disappeared entity.void remove(String name, T entity)
name
- The name of the removed entity.entity
- The removed entityvoid add(String name, T entity) throws EntityFoundException
name
- The entity's name.entity
- The added entity.
EntityFoundException
T getEntityOrNull(String name)
null
if it does not exist.
name
- The name of the entity.
null
.boolean contains(T ei)
ei
- The entity.
true
if the entity exists in this child entity manager.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |