org.apache.jackrabbit.core
Class AbstractNodeData

java.lang.Object
  extended by org.apache.jackrabbit.core.ItemData
      extended by org.apache.jackrabbit.core.AbstractNodeData

public abstract class AbstractNodeData
extends ItemData

Data object representing a node.


Constructor Summary
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
 NodeDefinition getNodeDefinition()
          Return the associated node defintion.
 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 defintion.
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractNodeData

protected AbstractNodeData(NodeState state,
                           ItemManager itemMgr)
Create a new instance of this class.

Parameters:
state - node state
itemMgr - 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 defintion.

Returns:
node definition
Throws:
RepositoryException - if the definition cannot be retrieved.

setNodeDefinition

public void setNodeDefinition(NodeDefinition definition)
Sets the associated node defintion.

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 class ItemData
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. Returns null 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

isNode

public boolean isNode()
Return a flag indicating whether item is a node.

Overrides:
isNode in class ItemData
Returns:
true if this item is a node; false otherwise.


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