Class NodeInfoImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.ItemInfoImpl
-
- org.apache.jackrabbit.spi.commons.NodeInfoImpl
-
public class NodeInfoImpl extends ItemInfoImpl implements NodeInfo
NodeInfoImpl
implements a serializableNodeInfo
based on another node info.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NodeInfoImpl(NodeId parentId, Name name, Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, java.util.Iterator<PropertyId> references, java.util.Iterator<PropertyId> propertyIds, java.util.Iterator<ChildInfo> childInfos)
Deprecated.NodeInfoImpl(Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, java.util.Iterator<PropertyId> references, java.util.Iterator<PropertyId> propertyIds, java.util.Iterator<ChildInfo> childInfos)
Creates a new node info from the given parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NodeInfo
createSerializableNodeInfo(NodeInfo nodeInfo, IdFactory idFactory)
Creates a new serializableNodeInfo
for the givenNodeInfo
.java.util.Iterator<ChildInfo>
getChildInfos()
Return allChildInfo
s of the node represent by this info, an empty iterator if that node doesn't have any child nodes ornull
if the implementation is not able or for some internal reasons not willing to compute theChildInfo
iterator.NodeId
getId()
Returns theNodeId
for the node that is based on this info object.int
getIndex()
Index of the node.Name[]
getMixins()
Name
getNodetype()
java.util.Iterator<PropertyId>
getPropertyIds()
PropertyId[]
getReferences()
Return theId
s of the properties that are referencing the node based on this info object.-
Methods inherited from class org.apache.jackrabbit.spi.commons.ItemInfoImpl
denotesNode, getPath
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.spi.ItemInfo
denotesNode, getPath
-
-
-
-
Constructor Detail
-
NodeInfoImpl
public NodeInfoImpl(NodeId parentId, Name name, Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, java.util.Iterator<PropertyId> references, java.util.Iterator<PropertyId> propertyIds, java.util.Iterator<ChildInfo> childInfos)
Deprecated.UseNodeInfoImpl(Path, NodeId, int, Name, Name[], Iterator, Iterator, Iterator)
instead. The parentId is not used any more.Creates a new node info from the given parameters.- Parameters:
parentId
- the parent id.name
- the name of this item.path
- the path to this item.id
- the id of this item.index
- the index of this item.primaryTypeName
- the name of the primary node type.mixinNames
- the names of the assigned mixins.references
- the references to this node.propertyIds
- the properties of this node.childInfos
- the child infos of this node ornull
.
-
NodeInfoImpl
public NodeInfoImpl(Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, java.util.Iterator<PropertyId> references, java.util.Iterator<PropertyId> propertyIds, java.util.Iterator<ChildInfo> childInfos)
Creates a new node info from the given parameters.- Parameters:
path
- the path to this item.id
- the id of this item.index
- the index of this item.primaryTypeName
- the name of the primary node type.mixinNames
- the names of the assigned mixins.references
- the references to this node.propertyIds
- the properties of this node.
-
-
Method Detail
-
createSerializableNodeInfo
public static NodeInfo createSerializableNodeInfo(NodeInfo nodeInfo, IdFactory idFactory)
Creates a new serializableNodeInfo
for the givenNodeInfo
.- Parameters:
nodeInfo
-
-
getId
public NodeId getId()
Returns theNodeId
for the node that is based on this info object.- Specified by:
getId
in interfaceItemInfo
- Specified by:
getId
in interfaceNodeInfo
- Returns:
- identifier for the item that is based on this info object. the id can either be an absolute path or a uniqueID (+ relative path).
- See Also:
RepositoryService.getNodeInfo(SessionInfo, NodeId)
-
getIndex
public int getIndex()
Index of the node.
-
getNodetype
public Name getNodetype()
- Specified by:
getNodetype
in interfaceNodeInfo
- Returns:
Name
representing the name of the primary nodetype.
-
getMixins
public Name[] getMixins()
- Specified by:
getMixins
in interfaceNodeInfo
- Returns:
- Array of
Name
s representing the names of mixin nodetypes. This includes only explicitly assigned mixin nodetypes. It does not include mixin types inherited through the addition of supertypes to the primary type hierarchy. If there are no mixin node types assigned an empty array will be returned.
-
getReferences
public PropertyId[] getReferences()
Return theId
s of the properties that are referencing the node based on this info object.- Specified by:
getReferences
in interfaceNodeInfo
- Returns:
Id
s of the properties that are referencing the node based on this info object or an empty array if the node is not referenceable or no references exist.- See Also:
PropertyInfo.getId()
-
getPropertyIds
public java.util.Iterator<PropertyId> getPropertyIds()
- Specified by:
getPropertyIds
in interfaceNodeInfo
- Returns:
Id
s of children properties- See Also:
PropertyInfo.getId()
-
getChildInfos
public java.util.Iterator<ChildInfo> getChildInfos()
Return allChildInfo
s of the node represent by this info, an empty iterator if that node doesn't have any child nodes ornull
if the implementation is not able or for some internal reasons not willing to compute theChildInfo
iterator. In the latter case the user of this API must callRepositoryService.getChildInfos(SessionInfo, NodeId)
in order to determine the existence and identity of the child nodes.- Specified by:
getChildInfos
in interfaceNodeInfo
- Returns:
- An iterator of
ChildInfo
s ornull
if the implementation is not able or willing to compute the set ofChildInfo
s (e.g. an implementation may choose to returnnull
if there is a huge amount of child nodes). In this caseRepositoryService.getChildInfos(SessionInfo, NodeId)
will be used to load theChildInfo
s.
-
-