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

java.lang.Object
  extended byorg.apache.jackrabbit.core.virtual.AbstractVISProvider
      extended byorg.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.

currently we have no dynamic ones, we just recreate the entire nodetypes tree

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(QName ntName)
          {@inheritDoc}
 void onNodeTypeModified(QName ntName)
          {@inheritDoc}
 void onNodeTypeRemoved(QName ntName)
          {@inheritDoc}
 boolean setNodeReferences(NodeReferences refs)
          Informs this provider that the node references to one of its states has changed.
 
Methods inherited from class org.apache.jackrabbit.core.virtual.AbstractVISProvider
cache, createNodeState, createPropertyState, evict, getApplicableChildNodeDef, getApplicablePropertyDef, getEffectiveNodeType, getItemState, getNodeReferences, getNodeTypeRegistry, getRootState, getVirtualRootId, hasItemState, hasNodeReferences, internalGetPropertyState, internalHasPropertyState, invalidateItem, isVirtualRoot, 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:
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
Parameters:
id -
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
Parameters:
id -
Returns:
Throws:
NoSuchItemStateException
ItemStateException

onNodeTypeAdded

public void onNodeTypeAdded(QName ntName)
                     throws RepositoryException
{@inheritDoc}

Throws:
RepositoryException

onNodeTypeModified

public void onNodeTypeModified(QName ntName)
                        throws RepositoryException
{@inheritDoc}

Throws:
RepositoryException

onNodeTypeRemoved

public void onNodeTypeRemoved(QName ntName)
                       throws RepositoryException
{@inheritDoc}

Throws:
RepositoryException

setNodeReferences

public boolean setNodeReferences(NodeReferences refs)
Description copied from interface: VirtualItemStateProvider
Informs this provider that the node references to one of its states has changed.

Parameters:
refs -
Returns:
true if the reference target is one of its items.


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