Package org.apache.jackrabbit.api
Interface JackrabbitNode
-
- All Known Implementing Classes:
NodeImpl,VersionHistoryImpl,VersionImpl
@ProviderType public interface JackrabbitNode extends Node
The Jackrabbit Node interface. This interface contains the Jackrabbit-specific extensions to the JCRNodeinterface.
-
-
Field Summary
-
Fields inherited from interface javax.jcr.Node
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @Nullable JackrabbitNodegetNodeOrNull(@NotNull String relPath)Returns the node atrelPathrelative tothisnode ornullif no such node exists.default @Nullable NodegetParentOrNull()Same asItem.getParent(), but instead of throwing an ItemNotFoundException or AccessDeniedException just returnnull.default @Nullable PropertygetPropertyOrNull(@NotNull String relPath)Returns the property atrelPathrelative tothisnode ornullif no such property exists.voidrename(String newName)voidsetMixins(String[] mixinNames)-
Methods inherited from interface javax.jcr.Item
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save
-
Methods inherited from interface javax.jcr.Node
addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getBaseVersion, getCorrespondingNodePath, getDefinition, getIdentifier, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getProperty, getReferences, getReferences, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, merge, orderBefore, removeMixin, removeShare, removeSharedSet, restore, restore, restore, restoreByLabel, setPrimaryType, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, update
-
-
-
-
Method Detail
-
rename
void rename(String newName) throws RepositoryException
- Parameters:
newName-- Throws:
RepositoryException
-
setMixins
void setMixins(String[] mixinNames) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
- Parameters:
mixinNames-- Throws:
NoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryException
-
getNodeOrNull
@Nullable default @Nullable JackrabbitNode getNodeOrNull(@NotNull @NotNull String relPath) throws RepositoryException
Returns the node atrelPathrelative tothisnode ornullif no such node exists. The same reacquisition semantics apply as withNode.getNode(String).- Parameters:
relPath- The relative path of the node to retrieve.- Returns:
- The node at
relPathornull - Throws:
RepositoryException- If an error occurs.
-
getPropertyOrNull
@Nullable default @Nullable Property getPropertyOrNull(@NotNull @NotNull String relPath) throws RepositoryException
Returns the property atrelPathrelative tothisnode ornullif no such property exists. The same reacquisition semantics apply as withNode.getNode(String).- Parameters:
relPath- The relative path of the property to retrieve.- Returns:
- The property at
relPathornull - Throws:
RepositoryException- If an error occurs.
-
getParentOrNull
@Nullable default @Nullable Node getParentOrNull() throws RepositoryException
Same asItem.getParent(), but instead of throwing an ItemNotFoundException or AccessDeniedException just returnnull.- Returns:
- the parent node, or
nullif there is no parent or the parent node is not accessible. - Throws:
RepositoryException- if an error occurs.
-
-