org.apache.jackrabbit.core.nodetype.virtual
Class VirtualNodeTypeStateProvider

java.lang.Object
  extended by org.apache.jackrabbit.core.virtual.AbstractVISProvider
      extended by 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
VirtualNodeTypeStateProvider(NodeTypeRegistry ntReg, NodeId rootNodeId, NodeId parentId)
           
 
Method Summary
protected  VirtualNodeState createRootNodeState()
          Creates the root node state.
protected  VirtualNodeState internalGetNodeState(NodeId id)
          Retrieves the node state with the given node id
protected  boolean internalHasNodeState(NodeId id)
          Checks if this provide has the node state of the given node id
 void 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 class AbstractVISProvider
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 class AbstractVISProvider
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 class AbstractVISProvider
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)
Description copied from interface: VirtualItemStateProvider
Informs this provider that the node references to some of its states have changed.

Parameters:
references - collection of NodeReferences instances
Returns:
true if the reference target is one of its items.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.