public abstract class ItemDelegate extends Object
NodeDelegate and PropertyDelegate| Modifier and Type | Field and Description |
|---|---|
protected SessionDelegate |
sessionDelegate |
| Modifier and Type | Method and Description |
|---|---|
void |
checkAlive()
Performs a sanity check on this item and the associated session.
|
protected boolean |
checkUpdate()
Checks whether the session has changed since this delegate instance
was last accessed, thus triggering an
update of the
internal state of this delegate. |
abstract boolean |
exists()
Determine whether the underlying item exists
|
abstract String |
getName()
Get the name of this item
|
abstract NodeDelegate |
getParent()
Get the parent of this item or
null. |
abstract String |
getPath()
Get the path of this item
|
abstract org.apache.jackrabbit.oak.api.Tree.Status |
getStatus()
Get the status of this item.
|
abstract boolean |
isProtected() |
abstract boolean |
remove()
Removes this item.
|
void |
save()
Save the subtree rooted at this item.
|
protected void |
update()
Called by
checkUpdate() to update the internal state of this
delegate. |
protected final SessionDelegate sessionDelegate
protected boolean checkUpdate()
update of the
internal state of this delegate.true if the session was recently updated,
false if notprotected void update()
checkUpdate() to update the internal state of this
delegate.public void checkAlive()
throws RepositoryException
RepositoryException - if this item has been rendered invalid
for some reason or the associated session
has been logged out@Nonnull public abstract String getName()
@Nonnull public abstract String getPath()
@CheckForNull public abstract NodeDelegate getParent()
null.null for root or if the parent
is not accessible.@CheckForNull public abstract org.apache.jackrabbit.oak.api.Tree.Status getStatus()
Tree.Status of this item or null if not available.public abstract boolean isProtected()
throws InvalidItemStateException
InvalidItemStateExceptionpublic abstract boolean exists()
true the underlying tree exists, false otherwise.public abstract boolean remove()
throws InvalidItemStateException
true if this item was removed;
or false if this is the root node that can't be removedInvalidItemStateExceptionpublic void save()
throws RepositoryException
RepositoryExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.