Package org.hippoecm.repository.api
Interface HippoNode
-
-
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 Modifier and Type Method Description 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.NodeIterator
pendingChanges()
Conveniance method forpendingChanges("nt:base", false)
NodeIterator
pendingChanges(String nodeType)
Conveniance method forpendingChanges(nodeType,false)
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 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:
RepositoryException
-
getCanonicalNode
Node getCanonicalNode() throws ItemNotFoundException, 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:
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:
HippoSession.pendingChanges(Node,String,boolean)
-
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(String,boolean)
-
pendingChanges
NodeIterator pendingChanges() throws RepositoryException
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:
pendingChanges(String,boolean)
-
isVirtual
boolean isVirtual() throws RepositoryException
Whether this is a virtual node or not.- Returns:
- whether this is a virtual node or not.
- Throws:
RepositoryException
-
recomputeDerivedData
boolean recomputeDerivedData() throws 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:
RepositoryException
-
-