Package org.apache.jackrabbit.core
Class AbstractNodeData
- java.lang.Object
-
- org.apache.jackrabbit.core.ItemData
-
- org.apache.jackrabbit.core.AbstractNodeData
-
public abstract class AbstractNodeData extends ItemData
Data object representing a node.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNodeData(ItemId id)
Create a new instance of this class.protected
AbstractNodeData(NodeState state, ItemManager itemMgr)
Create a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeDefinition
getNodeDefinition()
Return the associated node definition.NodeState
getNodeState()
Return the associated node state.NodeId
getParentId()
Return the parent id of this node.NodeId
getPrimaryParentId()
Return the primary parent id of this node.boolean
isNode()
Return a flag indicating whether item is a node.void
setNodeDefinition(NodeDefinition definition)
Sets the associated node definition.protected void
setPrimaryParentId(NodeId primaryParentId)
Set the primary parent id of this node.-
Methods inherited from class org.apache.jackrabbit.core.ItemData
getDefinition, getId, getState, getStatus, setDefinition, setState, setStatus, toString
-
-
-
-
Constructor Detail
-
AbstractNodeData
protected AbstractNodeData(NodeState state, ItemManager itemMgr)
Create a new instance of this class.- Parameters:
state
- node stateitemMgr
- item manager
-
AbstractNodeData
protected AbstractNodeData(ItemId id)
Create a new instance of this class.- Parameters:
id
- item id
-
-
Method Detail
-
getNodeState
public NodeState getNodeState()
Return the associated node state.- Returns:
- node state
-
getNodeDefinition
public NodeDefinition getNodeDefinition() throws RepositoryException
Return the associated node definition.- Returns:
- node definition
- Throws:
RepositoryException
- if the definition cannot be retrieved.
-
setNodeDefinition
public void setNodeDefinition(NodeDefinition definition)
Sets the associated node definition.- Parameters:
definition
- new node definition
-
getParentId
public NodeId getParentId()
Return the parent id of this node. Every shareable node in a shared set has a different parent.- Overrides:
getParentId
in classItemData
- Returns:
- parent id
-
getPrimaryParentId
public NodeId getPrimaryParentId()
Return the primary parent id of this node. Every shareable node in a shared set has a different primary parent. Returnsnull
for nodes that are not shareable.- Returns:
- primary parent id or
null
-
setPrimaryParentId
protected void setPrimaryParentId(NodeId primaryParentId)
Set the primary parent id of this node.- Parameters:
primaryParentId
- primary parent id
-
-