Class NodeInfoImpl
java.lang.Object
org.apache.jackrabbit.spi.commons.ItemInfoImpl
org.apache.jackrabbit.spi.commons.NodeInfoImpl
- All Implemented Interfaces:
Serializable,ItemInfo,NodeInfo
NodeInfoImpl implements a serializable NodeInfo
based on another node info.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNodeInfoImpl(NodeId parentId, Name name, Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, Iterator<PropertyId> references, Iterator<PropertyId> propertyIds, Iterator<ChildInfo> childInfos) Deprecated.NodeInfoImpl(Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, Iterator<PropertyId> references, Iterator<PropertyId> propertyIds, Iterator<ChildInfo> childInfos) Creates a new node info from the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeInfocreateSerializableNodeInfo(NodeInfo nodeInfo, IdFactory idFactory) Creates a new serializableNodeInfofor the givenNodeInfo.Return allChildInfos of the node represent by this info, an empty iterator if that node doesn't have any child nodes ornullif the implementation is not able or for some internal reasons not willing to compute theChildInfoiterator.getId()Returns theNodeIdfor the node that is based on this info object.intgetIndex()Index of the node.Name[]Return theIds of the properties that are referencing the node based on this info object.Methods inherited from class org.apache.jackrabbit.spi.commons.ItemInfoImpl
denotesNode, getPathMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jackrabbit.spi.ItemInfo
denotesNode, getPath
-
Constructor Details
-
NodeInfoImpl
public NodeInfoImpl(NodeId parentId, Name name, Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, Iterator<PropertyId> references, Iterator<PropertyId> propertyIds, 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, Iterator<PropertyId> references, Iterator<PropertyId> propertyIds, 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 Details
-
createSerializableNodeInfo
Creates a new serializableNodeInfofor the givenNodeInfo.- Parameters:
nodeInfo-
-
getId
Returns theNodeIdfor the node that is based on this info object. -
getIndex
public int getIndex()Index of the node. -
getNodetype
- Specified by:
getNodetypein interfaceNodeInfo- Returns:
Namerepresenting the name of the primary nodetype.
-
getMixins
- Specified by:
getMixinsin interfaceNodeInfo- Returns:
- Array of
Names 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
Return theIds of the properties that are referencing the node based on this info object.- Specified by:
getReferencesin interfaceNodeInfo- Returns:
Ids 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:
-
getPropertyIds
- Specified by:
getPropertyIdsin interfaceNodeInfo- Returns:
Ids of children properties- See Also:
-
getChildInfos
Return allChildInfos of the node represent by this info, an empty iterator if that node doesn't have any child nodes ornullif the implementation is not able or for some internal reasons not willing to compute theChildInfoiterator. 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:
getChildInfosin interfaceNodeInfo- Returns:
- An iterator of
ChildInfos ornullif the implementation is not able or willing to compute the set ofChildInfos (e.g. an implementation may choose to returnnullif there is a huge amount of child nodes). In this caseRepositoryService.getChildInfos(SessionInfo, NodeId)will be used to load theChildInfos.
-
NodeInfoImpl(Path, NodeId, int, Name, Name[], Iterator, Iterator, Iterator)instead.