Class VirtualNodeTypeStateProvider
- java.lang.Object
-
- org.apache.jackrabbit.core.virtual.AbstractVISProvider
-
- org.apache.jackrabbit.core.nodetype.virtual.VirtualNodeTypeStateProvider
-
- All Implemented Interfaces:
ItemStateListener,ItemStateManager,VirtualItemStateProvider
public class VirtualNodeTypeStateProvider extends AbstractVISProvider
This Class implements a virtual item state provider that exposes the registered nodetypes.
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.core.virtual.AbstractVISProvider
ntReg, rootNodeId
-
-
Constructor Summary
Constructors Constructor Description VirtualNodeTypeStateProvider(NodeTypeRegistry ntReg, NodeId rootNodeId, NodeId parentId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected VirtualNodeStatecreateRootNodeState()Creates the root node state.protected VirtualNodeStateinternalGetNodeState(NodeId id)Retrieves the node state with the given node idprotected booleaninternalHasNodeState(NodeId id)Checks if this provide has the node state of the given node idvoidonNodeTypeAdded(Name ntName)voidonNodeTypeModified(Name ntName)voidonNodeTypesRemoved(Collection<Name> names)booleansetNodeReferences(ChangeLog references)Informs this provider that the node references to some of its states have changed.-
Methods inherited from class org.apache.jackrabbit.core.virtual.AbstractVISProvider
addListener, cache, createNodeState, createPropertyState, discardAll, evict, getApplicableChildNodeDef, getApplicablePropertyDef, getEffectiveNodeType, getItemState, getNodeReferences, getNodeTypeRegistry, getRootState, getVirtualRootId, getVirtualRootIds, hasItemState, hasNodeReferences, internalGetPropertyState, internalHasPropertyState, invalidateItem, isVirtualRoot, removeListener, stateCreated, stateDestroyed, stateDiscarded, stateModified
-
-
-
-
Constructor Detail
-
VirtualNodeTypeStateProvider
public VirtualNodeTypeStateProvider(NodeTypeRegistry ntReg, NodeId rootNodeId, NodeId parentId)
- Parameters:
ntReg-rootNodeId-parentId-
-
-
Method Detail
-
createRootNodeState
protected VirtualNodeState createRootNodeState() throws RepositoryException
Creates the root node state.currently we have no dynamic ones, we just recreate the entire nodetypes tree
- Specified by:
createRootNodeStatein classAbstractVISProvider- Returns:
- The virtual root node state.
- Throws:
RepositoryException
-
internalHasNodeState
protected boolean internalHasNodeState(NodeId id)
Checks if this provide has the node state of the given node id- Specified by:
internalHasNodeStatein classAbstractVISProvider- Returns:
trueif it has the node state
-
internalGetNodeState
protected VirtualNodeState internalGetNodeState(NodeId id) throws NoSuchItemStateException, ItemStateException
Retrieves the node state with the given node id- Specified by:
internalGetNodeStatein classAbstractVISProvider- Returns:
- Throws:
NoSuchItemStateExceptionItemStateException
-
onNodeTypeAdded
public void onNodeTypeAdded(Name ntName)
-
onNodeTypeModified
public void onNodeTypeModified(Name ntName)
-
onNodeTypesRemoved
public void onNodeTypesRemoved(Collection<Name> names)
-
setNodeReferences
public boolean setNodeReferences(ChangeLog references)
Informs this provider that the node references to some of its states have changed.- Parameters:
references- collection ofNodeReferencesinstances- Returns:
trueif the reference target is one of its items.
-
-