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 @NotNull String |
getName()
Get the name of this item
|
abstract @Nullable NodeDelegate |
getParent()
Get the parent of this item or
null . |
abstract @NotNull String |
getPath()
Get the path of this item
|
abstract @Nullable 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@NotNull public abstract @NotNull String getName()
@NotNull public abstract @NotNull String getPath()
@Nullable public abstract @Nullable NodeDelegate getParent()
null
.null
for root or if the parent
is not accessible.@Nullable public abstract @Nullable org.apache.jackrabbit.oak.api.Tree.Status getStatus()
Tree.Status
of this item or null
if not available.public abstract boolean isProtected() throws InvalidItemStateException
InvalidItemStateException
public 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 removedInvalidItemStateException
public void save() throws RepositoryException
RepositoryException
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.