|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HierarchyEntry
HierarchyEntry
...
Method Summary | |
---|---|
void |
complete(Operation transientOperation)
Clean up this entry upon Operation.undo() or Operation.persisted() . |
boolean |
denotesNode()
True if this HierarchyEntry would resolve to a NodeState . |
ItemState |
getItemState()
If this HierarchyEntry has already been resolved before
(see isAvailable() ), that ItemState is returned. |
Name |
getName()
|
NodeEntry |
getParent()
Returns the NodeEntry being parent to this
HierarchyEntry . |
Path |
getPath()
|
int |
getStatus()
Unless this HierarchyEntry has been resolved this method
returns Status._UNDEFINED_ otherwise it returns the status of
the underlying ItemState. |
Path |
getWorkspacePath()
|
void |
invalidate(boolean recursive)
Invalidates the underlying ItemState if available and if it
is not transiently modified. |
boolean |
isAvailable()
Returns true if the referenced ItemState is
available. |
void |
reload(boolean recursive)
Reloads this hierarchy entry and the corresponding ItemState, if this entry has already been resolved. |
void |
remove()
Removes this HierarchyEntry from its parent and sets the
status of the underlying ItemState to Status.REMOVED or to
Status.STALE_DESTROYED , respectively. |
void |
revert()
Traverses the hierarchy and reverts all transient modifications such as adding, modifying or removing item states. |
void |
setItemState(ItemState state)
Set the ItemState this hierarchyEntry will be resolved to. |
void |
transientRemove()
Traverses the hierarchy and marks all available item states as transiently removed. |
Method Detail |
---|
boolean denotesNode()
HierarchyEntry
would resolve to a NodeState
.
Name getName()
Path getPath() throws RepositoryException
RepositoryException
Path getWorkspacePath() throws RepositoryException
getPath()
. In case of moved items this method return the
original path as it is present on the persistent layer.
RepositoryException
NodeEntry getParent()
NodeEntry
being parent to this
HierarchyEntry
.
HierarchyEntry
int getStatus()
HierarchyEntry
has been resolved this method
returns Status._UNDEFINED_
otherwise it returns the status of
the underlying ItemState.
Status._UNDEFINED_
if this
entry has not been resolved yet.ItemState.getStatus()
boolean isAvailable()
true
if the referenced ItemState
is
available. That is, the referenced ItemState
has already
been resolved.
true
if the ItemState
is available;
otherwise false
.getItemState()
ItemState getItemState() throws ItemNotFoundException, RepositoryException
HierarchyEntry
has already been resolved before
(see isAvailable()
), that ItemState
is returned.
Note however, that the validity of the State is not asserted.ItemState
or if the corresponding state has been removed in the mean time.
ItemState
.
ItemNotFoundException
- if the ItemState
does not
exist anymore.
RepositoryException
- If an error occurs while retrieving the
ItemState
.void setItemState(ItemState state)
state
- void invalidate(boolean recursive)
ItemState
if available and if it
is not transiently modified. If the recursive
flag is true,
the hierarchy is traverses and invalidate(boolean)
is called on
all child entries.reload(boolean)
this method only sets the status of this item state to Status.INVALIDATED
and does not acutally update it with the persistent
state in the repository.
void revert() throws RepositoryException
Status.EXISTING
.
RepositoryException
- if an error occurs.void reload(boolean recursive)
recursive
' the complete
hierarchy below this entry is reloaded as well.
recursive
- void transientRemove() throws InvalidItemStateException, RepositoryException
Status.EXISTING_REMOVED
if
the item is existing in the persistent storage or Status.REMOVED
if the item has been transiently added before. In the latter case, the
corresponding HierarchyEntries can be removed as well from their parent.
InvalidItemStateException
- if this entry has been removed in the
mean time.
RepositoryException
- if an error occurs while removing any of the item
states e.g. an item state is not valid anymore.void remove()
HierarchyEntry
from its parent and sets the
status of the underlying ItemState to Status.REMOVED
or to
Status.STALE_DESTROYED
, respectively. If this entry is a
NodeEntry all descending ItemStates must get their status changed as well.
void complete(Operation transientOperation) throws RepositoryException
Operation.undo()
or Operation.persisted()
.
transientOperation
-
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |