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 VirtualNodeState
createRootNodeState()
Creates the root node state.protected VirtualNodeState
internalGetNodeState(NodeId id)
Retrieves the node state with the given node idprotected boolean
internalHasNodeState(NodeId id)
Checks if this provide has the node state of the given node idvoid
onNodeTypeAdded(Name ntName)
void
onNodeTypeModified(Name ntName)
void
onNodeTypesRemoved(Collection<Name> names)
boolean
setNodeReferences(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:
createRootNodeState
in 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:
internalHasNodeState
in classAbstractVISProvider
- Returns:
true
if 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:
internalGetNodeState
in classAbstractVISProvider
- Returns:
- Throws:
NoSuchItemStateException
ItemStateException
-
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 ofNodeReferences
instances- Returns:
true
if the reference target is one of its items.
-
-