Package org.hippoecm.repository.api
Interface HippoNode
-
- All Superinterfaces:
javax.jcr.Item
,javax.jcr.Node
public interface HippoNode extends javax.jcr.Node
AnyNode
instance returned by any method of a Hippo Repostitory may be cast to the HippoNode interface to expose additional functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.jcr.Node
getCanonicalNode()
Get the most accurate and complete version available of the information represented in the current node.String
getDisplayName()
Obtain a display name for this node.boolean
isVirtual()
Whether this is a virtual node or not.javax.jcr.NodeIterator
pendingChanges()
Conveniance method forpendingChanges("nt:base", false)
javax.jcr.NodeIterator
pendingChanges(String nodeType)
Conveniance method forpendingChanges(nodeType,false)
javax.jcr.NodeIterator
pendingChanges(String nodeType, boolean prune)
Obtains an iterator over the set of nodes that potentially contain changes, starting (and not including) this node.boolean
recomputeDerivedData()
Some operations may leave some nodes' derived data stale.-
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
-
getDisplayName
String getDisplayName() throws javax.jcr.RepositoryException
Obtain a display name for this node. If not available falls back onItem.getName()
. If display name is available the result is the same as callinggetProperty("hippo:name").getString()
. If this node does not have a display name but is a child node of a hippo:handle node having a display name, the display name of the parent handle node will be returned.- Returns:
- the display name for this node if available, otherwise the JCR name of this node.
- Throws:
javax.jcr.RepositoryException
-
getCanonicalNode
javax.jcr.Node getCanonicalNode() throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
Get the most accurate and complete version available of the information represented in the current node. Certain operations are only allowed on the most complete version of a node, rather than on any presentation of the node.- Returns:
- the node with the most accurate representation of this node, may be nonsense if there is no sensible canonical version available
- Throws:
javax.jcr.ItemNotFoundException
- indicates the canonical node is no longer availablejavax.jcr.RepositoryException
- indicates a generic unspecified repository error
-
pendingChanges
javax.jcr.NodeIterator pendingChanges(String nodeType, boolean prune) throws javax.jcr.NamespaceException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.RepositoryException
Obtains an iterator over the set of nodes that potentially contain changes, starting (and not including) this node. Only nodes for whichNode.isNodeType(nodeType)
returns true are included in the resulting set. If the prune boolean value is true, then the nodes matching in the hierarchy first are returned. If matching modified node exists beneath the nodes, these are not included.- Parameters:
nodeType
- Only nodes that are (derived) of this nodeType are included in the resultprune
- Whether only to return the first matching modified node in a subtree (true), or provide a depth search for all modified nodes (false)- Returns:
- A NodeIterator instance which iterates over all modified nodes, not including this node
- Throws:
javax.jcr.NamespaceException
- indicates an invalid nodeType parameterjavax.jcr.nodetype.NoSuchNodeTypeException
- indicates an invalid nodeType parameterjavax.jcr.RepositoryException
- indicates a generic unspecified repository error- See Also:
HippoSession.pendingChanges(Node,String,boolean)
-
pendingChanges
javax.jcr.NodeIterator pendingChanges(String nodeType) throws javax.jcr.NamespaceException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.RepositoryException
Conveniance method forpendingChanges(nodeType,false)
- Parameters:
nodeType
- Only nodes that are (derived) of this nodeType are included in the result- Returns:
- A NodeIterator instance which iterates over all modified nodes, not including the passed node
- Throws:
javax.jcr.NamespaceException
- indicates an invalid nodeType parameterjavax.jcr.RepositoryException
- indicates a generic unspecified repository errorjavax.jcr.nodetype.NoSuchNodeTypeException
- indicates an invalid nodeType parameter- See Also:
pendingChanges(String,boolean)
-
pendingChanges
javax.jcr.NodeIterator pendingChanges() throws javax.jcr.RepositoryException
Conveniance method forpendingChanges("nt:base", false)
- Returns:
- A NodeIterator instance which iterates over all modified nodes, not including the passed node
- Throws:
javax.jcr.RepositoryException
- indicates a generic unspecified repository error- See Also:
pendingChanges(String,boolean)
-
isVirtual
boolean isVirtual() throws javax.jcr.RepositoryException
Whether this is a virtual node or not.- Returns:
- whether this is a virtual node or not.
- Throws:
javax.jcr.RepositoryException
-
recomputeDerivedData
boolean recomputeDerivedData() throws javax.jcr.RepositoryException
Some operations may leave some nodes' derived data stale. With this method the derived data of a node is made up to date.- Returns:
- whether the node was changed during the recomputation
- Throws:
javax.jcr.RepositoryException
-
-