Package org.hippoecm.repository.api
Interface HippoNode
Any
Node
instance returned by any method of a Hippo Repostitory may be cast to the HippoNode interface to expose additional functionality.-
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
Modifier and TypeMethodDescriptionGet the most accurate and complete version available of the information represented in the current node.Obtain a display name for this node.boolean
Whether this is a virtual node or not.Conveniance method forpendingChanges("nt:base", false)
pendingChanges
(String nodeType) Conveniance method forpendingChanges(nodeType,false)
pendingChanges
(String nodeType, boolean prune) Obtains an iterator over the set of nodes that potentially contain changes, starting (and not including) this node.boolean
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 Details
-
getDisplayName
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:
RepositoryException
-
getCanonicalNode
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:
ItemNotFoundException
- indicates the canonical node is no longer availableRepositoryException
- indicates a generic unspecified repository error
-
pendingChanges
NodeIterator pendingChanges(String nodeType, boolean prune) throws NamespaceException, NoSuchNodeTypeException, 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:
NamespaceException
- indicates an invalid nodeType parameterNoSuchNodeTypeException
- indicates an invalid nodeType parameterRepositoryException
- indicates a generic unspecified repository error- See Also:
-
pendingChanges
NodeIterator pendingChanges(String nodeType) throws NamespaceException, NoSuchNodeTypeException, 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:
NamespaceException
- indicates an invalid nodeType parameterRepositoryException
- indicates a generic unspecified repository errorNoSuchNodeTypeException
- indicates an invalid nodeType parameter- See Also:
-
pendingChanges
Conveniance method forpendingChanges("nt:base", false)
- Returns:
- A NodeIterator instance which iterates over all modified nodes, not including the passed node
- Throws:
RepositoryException
- indicates a generic unspecified repository error- See Also:
-
isVirtual
Whether this is a virtual node or not.- Returns:
- whether this is a virtual node or not.
- Throws:
RepositoryException
-
recomputeDerivedData
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:
RepositoryException
-