Class VirtualNodeState
- java.lang.Object
-
- org.apache.jackrabbit.core.state.ItemState
-
- org.apache.jackrabbit.core.state.NodeState
-
- org.apache.jackrabbit.core.virtual.VirtualNodeState
-
public class VirtualNodeState extends NodeState
This Class implements a virtual node state
-
-
Field Summary
Fields Modifier and Type Field Description protected VirtualItemStateProvider
stateMgr
The virtual item state provide that created this node state-
Fields inherited from class org.apache.jackrabbit.core.state.ItemState
overlayedState, status, STATUS_EXISTING, STATUS_EXISTING_MODIFIED, STATUS_EXISTING_REMOVED, STATUS_NEW, STATUS_STALE_DESTROYED, STATUS_UNDEFINED
-
-
Constructor Summary
Constructors Constructor Description VirtualNodeState(AbstractVISProvider stateMgr, NodeId parentId, NodeId id, Name nodeTypeName, Name[] mixins)
creates a new virtual node state
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStateReference(NodeState state)
Adds a hard reference to another stateprotected VirtualPropertyState
getOrCreatePropertyState(Name name, int type, boolean multiValued)
Retrieves or creates a new property state as child property of this nodeVirtualPropertyState[]
getProperties()
Returns the properties of this nodeVirtualPropertyState
getProperty(Name name)
returns the property state of the given nameInternalValue
getPropertyValue(Name name)
Returns the value of the given property ornull
InternalValue[]
getPropertyValues(Name name)
Returns the values of the given property ofnull
void
setMixinNodeTypes(Name[] mixins)
sets the mixing node type and adds the respective propertyvoid
setPropertyValue(Name name, InternalValue value)
Sets the property valuevoid
setPropertyValues(Name name, int type, InternalValue[] values)
Sets the property valuesvoid
setPropertyValues(Name name, int type, InternalValue[] values, boolean multiple)
Sets the property values-
Methods inherited from class org.apache.jackrabbit.core.state.NodeState
addChildNodeEntry, addPropertyName, addShare, calculateMemoryFootprint, containsShare, copy, getAddedChildNodeEntries, getAddedPropertyNames, getAddedShares, getChildNodeEntries, getChildNodeEntries, getChildNodeEntry, getChildNodeEntry, getId, getMixinTypeNames, getNodeId, getNodeTypeName, getParentId, getPropertyNames, getRemovedChildNodeEntries, getRemovedPropertyNames, getRemovedShares, getRenamedChildNodeEntries, getReorderedChildNodeEntries, getSharedSet, hasChildNodeEntries, hasChildNodeEntry, hasChildNodeEntry, hasChildNodeEntry, hasPropertyName, isNode, isShareable, notifyNodeAdded, notifyNodeRemoved, notifyNodesReplaced, removeAllChildNodeEntries, removeAllPropertyNames, removeChildNodeEntry, removeChildNodeEntry, removePropertyName, removeShare, renameChildNodeEntry, renameChildNodeEntry, replaceChildNodeEntry, setChildNodeEntries, setContainer, setMixinTypeNames, setNodeTypeName, setParentId, setPropertyNames, setSharedSet
-
Methods inherited from class org.apache.jackrabbit.core.state.ItemState
connect, discard, disconnect, getContainer, getModCount, getOverlayedState, getStatus, hasOverlayedState, isConnected, isStale, isTransient, notifyStateCreated, notifyStateDestroyed, notifyStateDiscarded, notifyStateUpdated, reconnect, setModCount, setStatus
-
-
-
-
Field Detail
-
stateMgr
protected final VirtualItemStateProvider stateMgr
The virtual item state provide that created this node state
-
-
Constructor Detail
-
VirtualNodeState
public VirtualNodeState(AbstractVISProvider stateMgr, NodeId parentId, NodeId id, Name nodeTypeName, Name[] mixins) throws RepositoryException
creates a new virtual node state- Parameters:
stateMgr
-parentId
-id
-nodeTypeName
-mixins
-- Throws:
RepositoryException
-
-
Method Detail
-
getProperties
public VirtualPropertyState[] getProperties()
Returns the properties of this node- Returns:
- the properties.
-
getPropertyValues
public InternalValue[] getPropertyValues(Name name) throws NoSuchItemStateException
Returns the values of the given property ofnull
- Parameters:
name
-- Returns:
- the values
- Throws:
NoSuchItemStateException
-
getPropertyValue
public InternalValue getPropertyValue(Name name) throws NoSuchItemStateException
Returns the value of the given property ornull
- Parameters:
name
-- Returns:
- the value
- Throws:
NoSuchItemStateException
-
getProperty
public VirtualPropertyState getProperty(Name name) throws NoSuchItemStateException
returns the property state of the given name- Parameters:
name
-- Returns:
- Throws:
NoSuchItemStateException
-
setPropertyValue
public void setPropertyValue(Name name, InternalValue value) throws RepositoryException
Sets the property value- Parameters:
name
-value
-- Throws:
RepositoryException
-
setPropertyValues
public void setPropertyValues(Name name, int type, InternalValue[] values) throws RepositoryException
Sets the property values- Parameters:
name
-type
-values
-- Throws:
RepositoryException
-
setPropertyValues
public void setPropertyValues(Name name, int type, InternalValue[] values, boolean multiple) throws RepositoryException
Sets the property values- Parameters:
name
-type
-values
-- Throws:
RepositoryException
-
getOrCreatePropertyState
protected VirtualPropertyState getOrCreatePropertyState(Name name, int type, boolean multiValued) throws RepositoryException
Retrieves or creates a new property state as child property of this node- Parameters:
name
-type
-multiValued
-- Returns:
- Throws:
RepositoryException
-
setMixinNodeTypes
public void setMixinNodeTypes(Name[] mixins) throws RepositoryException
sets the mixing node type and adds the respective property- Parameters:
mixins
-- Throws:
RepositoryException
-
addStateReference
public void addStateReference(NodeState state)
Adds a hard reference to another state- Parameters:
state
-
-
-