org.apache.jackrabbit.api.jsr283
Interface Node

All Superinterfaces:
Item, Node

public interface Node
extends Node

This interface holds extensions made in JCR 2.0 while work is in progress implementing JCR 2.0.

Since:
JCR 2.0

Method Summary
 NodeIterator getSharedSet()
          Returns an iterator over all nodes that are in the shared set of this node.
 void removeShare()
          A special kind of remove() that removes this node, but does not remove any other node in the shared set of this node.
 void removeSharedSet()
          A special kind of remove() that removes this node and every other node in the shared set of this node.
 
Methods inherited from interface javax.jcr.Node
addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, getBaseVersion, getCorrespondingNodePath, getDefinition, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperty, getReferences, getUUID, getVersionHistory, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, merge, orderBefore, removeMixin, restore, restore, restore, restoreByLabel, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, update
 
Methods inherited from interface javax.jcr.Item
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save
 

Method Detail

getSharedSet

NodeIterator getSharedSet()
                          throws RepositoryException
Returns an iterator over all nodes that are in the shared set of this node. If this node is not shared then the returned iterator contains only this node.

Returns:
a NodeIterator
Throws:
RepositoryException - if an error occurs.
Since:
JCR 2.0

removeShare

void removeShare()
                 throws VersionException,
                        LockException,
                        ConstraintViolationException,
                        RepositoryException
A special kind of remove() that removes this node, but does not remove any other node in the shared set of this node.

All of the exceptions defined for remove() apply to this function. In addition, a RepositoryException is thrown if this node cannot be removed without removing another node in the shared set of this node.

If this node is not shared this method removes only this node.

Throws:
VersionException - if the parent node of this item is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the removal of this item and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if removing the specified item would violate a node type or implementation-specific constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
Since:
JCR 2.0
See Also:
removeSharedSet(), Item#remove(), javax.jcr.Workspace#removeItem

removeSharedSet

void removeSharedSet()
                     throws VersionException,
                            LockException,
                            ConstraintViolationException,
                            RepositoryException
A special kind of remove() that removes this node and every other node in the shared set of this node.

This removal must be done atomically, i.e., if one of the nodes cannot be removed, the function throws the exception remove() would have thrown in that case, and none of the nodes are removed.

If this node is not shared this method removes only this node.

Throws:
VersionException - if the parent node of this item is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the removal of this item and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if removing the specified item would violate a node type or implementation-specific constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.@throws VersionException if
Since:
JCR 2.0
See Also:
removeShare(), Item#remove(), javax.jcr.Workspace#removeItem


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.