|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jackrabbit.core.virtual.AbstractVISProvider
This Class implements a virtual item state provider, in order to expose the versions to the version storage.
| Field Summary | |
protected NodeTypeRegistry |
ntReg
the node type registry |
protected NodeId |
rootNodeId
the root node id |
| Constructor Summary | |
AbstractVISProvider(NodeTypeRegistry ntReg,
NodeId rootNodeId)
Creates an abstract virtual item state provider |
|
| Method Summary | |
protected NodeState |
cache(NodeState state)
adds the node state to the cache |
VirtualNodeState |
createNodeState(VirtualNodeState parent,
QName name,
NodeId id,
QName nodeTypeName)
Creates a new virtual node state |
VirtualPropertyState |
createPropertyState(VirtualNodeState parent,
QName name,
int type,
boolean multiValued)
Creats a new virtual property state |
protected abstract VirtualNodeState |
createRootNodeState()
Creates the root node state. |
protected void |
evict(NodeId id)
removes the node state from the cache |
protected NodeDef |
getApplicableChildNodeDef(NodeState parent,
QName nodeName,
QName nodeTypeName)
Retrieves the node definition for the given contraints. |
protected PropDef |
getApplicablePropertyDef(NodeState parent,
QName propertyName,
int type,
boolean multiValued)
retrieves the property definition for the given contraints |
protected EffectiveNodeType |
getEffectiveNodeType(NodeState parent)
Returns the effective (i.e. |
ItemState |
getItemState(ItemId id)
Return an item state, given its item id. |
NodeReferences |
getNodeReferences(NodeReferencesId id)
Return a node references object, given its target id |
protected NodeTypeRegistry |
getNodeTypeRegistry()
returns the node type manager |
NodeState |
getRootState()
Returns the root state |
NodeId |
getVirtualRootId()
Returns the id of the root node of the virtual tree. |
boolean |
hasItemState(ItemId id)
Return a flag indicating whether an item state for a given item id exists. |
boolean |
hasNodeReferences(NodeReferencesId id)
Return a flag indicating whether a node references object for a given target id exists. |
protected abstract VirtualNodeState |
internalGetNodeState(NodeId id)
Retrieves the node state with the given node id |
protected VirtualPropertyState |
internalGetPropertyState(PropertyId id)
Retrieces the property state for the given id |
protected abstract boolean |
internalHasNodeState(NodeId id)
Checks if this provide has the node state of the given node id |
protected boolean |
internalHasPropertyState(PropertyId id)
Checks if this provider has the property state of the given id. |
void |
invalidateItem(ItemId id,
boolean recursive)
invalidates the item |
boolean |
isVirtualRoot(ItemId id)
Checks if the id refers to the root of a virtual tree. |
void |
stateCreated(ItemState created)
Called when an ItemState has successfully
been created (i.e. its underlying persistent state was created). |
void |
stateDestroyed(ItemState destroyed)
Called when an ItemState has successfully been
removed (i.e. its underlying persistent state has been destroyed). |
void |
stateDiscarded(ItemState discarded)
Called when an ItemState has been discarded (i.e. it has
been rendered 'invalid'). |
void |
stateModified(ItemState modified)
Called when an ItemState has successfully
been modified (i.e. its underlying persistent state has changed). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jackrabbit.core.virtual.VirtualItemStateProvider |
setNodeReferences |
| Field Detail |
protected final NodeId rootNodeId
protected final NodeTypeRegistry ntReg
| Constructor Detail |
public AbstractVISProvider(NodeTypeRegistry ntReg,
NodeId rootNodeId)
ntReg - rootNodeId - | Method Detail |
protected abstract VirtualNodeState createRootNodeState()
throws RepositoryException
RepositoryExceptionpublic boolean hasItemState(ItemId id)
hasItemState in interface ItemStateManagerid - item id
true if an item state exists,
otherwise false
public ItemState getItemState(ItemId id)
throws NoSuchItemStateException,
ItemStateException
getItemState in interface ItemStateManagerid - item id
NoSuchItemStateException - if the item does not exist
ItemStateException - if an error occurs
public NodeReferences getNodeReferences(NodeReferencesId id)
throws NoSuchItemStateException,
ItemStateException
getNodeReferences in interface ItemStateManagerid - target id
ItemStateException - if an error occurs
NoSuchItemStateException - if the item does not existpublic boolean hasNodeReferences(NodeReferencesId id)
hasNodeReferences in interface ItemStateManagerid - target id
true if a node reference object exists for the given
id, otherwise false.public boolean isVirtualRoot(ItemId id)
isVirtualRoot in interface VirtualItemStateProviderid -
true if it is the rootpublic NodeId getVirtualRootId()
getVirtualRootId in interface VirtualItemStateProvider
public NodeState getRootState()
throws ItemStateException
ItemStateExceptionprotected abstract boolean internalHasNodeState(NodeId id)
id -
true if it has the node state
protected abstract VirtualNodeState internalGetNodeState(NodeId id)
throws NoSuchItemStateException,
ItemStateException
id -
NoSuchItemStateException
ItemStateExceptionprotected boolean internalHasPropertyState(PropertyId id)
id -
true if it has the property state
protected VirtualPropertyState internalGetPropertyState(PropertyId id)
throws NoSuchItemStateException,
ItemStateException
id -
NoSuchItemStateException
ItemStateException
public VirtualPropertyState createPropertyState(VirtualNodeState parent,
QName name,
int type,
boolean multiValued)
throws RepositoryException
createPropertyState in interface VirtualItemStateProviderparent - name - type - multiValued -
RepositoryException
public VirtualNodeState createNodeState(VirtualNodeState parent,
QName name,
NodeId id,
QName nodeTypeName)
throws RepositoryException
createNodeState in interface VirtualItemStateProviderparent - name - id - nodeTypeName -
RepositoryExceptionprotected NodeTypeRegistry getNodeTypeRegistry()
protected NodeState cache(NodeState state)
state - protected void evict(NodeId id)
id -
public void invalidateItem(ItemId id,
boolean recursive)
id -
protected PropDef getApplicablePropertyDef(NodeState parent,
QName propertyName,
int type,
boolean multiValued)
throws RepositoryException
propertyName - type - multiValued -
RepositoryException
protected NodeDef getApplicableChildNodeDef(NodeState parent,
QName nodeName,
QName nodeTypeName)
throws RepositoryException
nodeName - nodeTypeName -
RepositoryException
protected EffectiveNodeType getEffectiveNodeType(NodeState parent)
throws RepositoryException
RepositoryExceptionpublic void stateCreated(ItemState created)
ItemState has successfully
been created (i.e. its underlying persistent state was created).
stateCreated in interface ItemStateListenercreated - the ItemState that has been 'created'public void stateModified(ItemState modified)
ItemState has successfully
been modified (i.e. its underlying persistent state has changed).
stateModified in interface ItemStateListenermodified - the ItemState that has been 'modified'public void stateDestroyed(ItemState destroyed)
ItemState has successfully been
removed (i.e. its underlying persistent state has been destroyed).
stateDestroyed in interface ItemStateListenerdestroyed - the ItemState that has been 'destroyed'public void stateDiscarded(ItemState discarded)
ItemState has been discarded (i.e. it has
been rendered 'invalid').
stateDiscarded in interface ItemStateListenerdiscarded - the ItemState that has been discardedItemState.discard()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||