|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.virtual.AbstractVISProvider
public abstract class 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 | |
|---|---|
void |
addListener(ItemStateListener listener)
Add an ItemStateListener |
protected NodeState |
cache(NodeState state)
adds the node state to the cache |
VirtualNodeState |
createNodeState(VirtualNodeState parent,
Name name,
NodeId id,
Name nodeTypeName)
Creates a new virtual node state |
VirtualPropertyState |
createPropertyState(VirtualNodeState parent,
Name 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 QNodeDefinition |
getApplicableChildNodeDef(NodeState parent,
Name nodeName,
Name nodeTypeName)
Retrieves the node definition for the given contraints. |
protected QPropertyDefinition |
getApplicablePropertyDef(NodeState parent,
Name 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(NodeId 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. |
NodeId[] |
getVirtualRootIds()
Returns the ids of the root nodes of the virtual tree. |
boolean |
hasItemState(ItemId id)
Return a flag indicating whether an item state for a given item id exists. |
boolean |
hasNodeReferences(NodeId 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 |
removeListener(ItemStateListener listener)
Remove an ItemStateListener |
void |
stateCreated(ItemState created)
Called when an ItemState has successfully
been created (i.e. |
void |
stateDestroyed(ItemState destroyed)
Called when an ItemState has successfully been
removed (i.e. |
void |
stateDiscarded(ItemState discarded)
Called when an ItemState has been discarded (i.e. |
void |
stateModified(ItemState modified)
Called when an ItemState has successfully
been modified (i.e. |
| 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(NodeId id)
throws NoSuchItemStateException,
ItemStateException
getNodeReferences in interface ItemStateManagerid - target id
NoSuchItemStateException - if the item does not exist
ItemStateException - if an error occurspublic boolean hasNodeReferences(NodeId 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 VirtualItemStateProvidertrue if it is the rootpublic NodeId getVirtualRootId()
getVirtualRootId in interface VirtualItemStateProviderpublic NodeId[] getVirtualRootIds()
getVirtualRootIds in interface VirtualItemStateProvider
public NodeState getRootState()
throws ItemStateException
ItemStateException - If the root node state does not exist and its
creation fails.protected 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,
Name name,
int type,
boolean multiValued)
throws RepositoryException
createPropertyState in interface VirtualItemStateProviderRepositoryException
public VirtualNodeState createNodeState(VirtualNodeState parent,
Name name,
NodeId id,
Name nodeTypeName)
throws RepositoryException
createNodeState in interface VirtualItemStateProviderRepositoryExceptionpublic void addListener(ItemStateListener listener)
ItemStateListener
addListener in interface VirtualItemStateProviderlistener - the new listener to be informed on modificationspublic void removeListener(ItemStateListener listener)
ItemStateListener
removeListener in interface VirtualItemStateProviderlistener - an existing listenerprotected NodeTypeRegistry getNodeTypeRegistry()
protected NodeState cache(NodeState state)
state -
protected void evict(NodeId id)
id -
public void invalidateItem(ItemId id,
boolean recursive)
id - recursive -
protected QPropertyDefinition getApplicablePropertyDef(NodeState parent,
Name propertyName,
int type,
boolean multiValued)
throws RepositoryException
parent - The parent node state.propertyName - The name of the property.type - multiValued -
RepositoryException
protected QNodeDefinition getApplicableChildNodeDef(NodeState parent,
Name nodeName,
Name nodeTypeName)
throws RepositoryException
parent - The parent state.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 | |||||||||