Package org.apache.jackrabbit.core
Class ItemData
- java.lang.Object
-
- org.apache.jackrabbit.core.ItemData
-
- Direct Known Subclasses:
AbstractNodeData,PropertyData
public abstract class ItemData extends Object
Data object referenced by differentItemImplinstances that all represent the same item, i.e. items having the sameItemId.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedItemData(ItemId id)Create a new instance of this class.protectedItemData(ItemState state, ItemManager itemMgr)Create a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemDefinitiongetDefinition()Return the associated item definition.ItemIdgetId()Return the id associated with this item.NodeIdgetParentId()Return the parent id of this item.ItemStategetState()Return the associated item state.intgetStatus()Return the status.booleanisNode()Return a flag indicating whether item is a node.protected voidsetDefinition(ItemDefinition definition)Set the associated item definition.protected voidsetState(ItemState state)Set the associated item state.protected voidsetStatus(int status)Set the status.StringtoString()
-
-
-
Constructor Detail
-
ItemData
protected ItemData(ItemState state, ItemManager itemMgr)
Create a new instance of this class.- Parameters:
state- item stateitemMgr- item manager
-
ItemData
protected ItemData(ItemId id)
Create a new instance of this class.- Parameters:
id- item id
-
-
Method Detail
-
getState
public ItemState getState()
Return the associated item state.- Returns:
- item state
-
setState
protected void setState(ItemState state)
Set the associated item state.- Parameters:
state- item state
-
getDefinition
public ItemDefinition getDefinition() throws RepositoryException
Return the associated item definition.- Returns:
- item definition
- Throws:
RepositoryException- if the definition cannot be retrieved.
-
setDefinition
protected void setDefinition(ItemDefinition definition)
Set the associated item definition.- Parameters:
definition- item definition
-
getStatus
public int getStatus()
Return the status.- Returns:
- status
-
setStatus
protected void setStatus(int status)
Set the status.- Parameters:
status-
-
isNode
public boolean isNode()
Return a flag indicating whether item is a node.- Returns:
trueif this item is a node;falseotherwise.
-
getId
public ItemId getId()
Return the id associated with this item.- Returns:
- item id
-
getParentId
public NodeId getParentId()
Return the parent id of this item.- Returns:
- parent id
-
-