org.apache.jackrabbit.core.virtual
Class VirtualNodeState

java.lang.Object
  extended byorg.apache.jackrabbit.core.state.ItemState
      extended byorg.apache.jackrabbit.core.state.NodeState
          extended byorg.apache.jackrabbit.core.virtual.VirtualNodeState
All Implemented Interfaces:
ItemStateListener, Serializable

public class VirtualNodeState
extends NodeState

This Class implements a virtual node state

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.apache.jackrabbit.core.state.NodeState
NodeState.ChildNodeEntry
 
Field Summary
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_STALE_MODIFIED, STATUS_UNDEFINED
 
Constructor Summary
VirtualNodeState(AbstractVISProvider stateMgr, NodeId parentId, NodeId id, QName nodeTypeName, QName[] mixins)
          creates a new virtual node state
 
Method Summary
 void addStateReference(NodeState state)
          Adds a hard reference to another state
protected  VirtualPropertyState getOrCreatePropertyState(QName name, int type, boolean multiValued)
          Retrieves or creates a new property state as child property of this node
 VirtualPropertyState[] getProperties()
          Returns the properties of this node
 VirtualPropertyState getProperty(QName name)
          returns the property state of the given name
 InternalValue getPropertyValue(QName name)
          Returns the value of the given property or null
 InternalValue[] getPropertyValues(QName name)
          Returns the values of the given property of null
 void setMixinNodeTypes(QName[] mixins)
          sets the mixing node type and adds the respective property
 void setPropertyValue(QName name, InternalValue value)
          Sets the property value
 void setPropertyValues(QName name, int type, InternalValue[] values)
          Sets the property values
 void setPropertyValues(QName name, int type, InternalValue[] values, boolean multiple)
          Sets the property values
 
Methods inherited from class org.apache.jackrabbit.core.state.NodeState
addChildNodeEntry, addListener, addPropertyName, copy, getAddedChildNodeEntries, getAddedPropertyNames, getChildNodeEntries, getChildNodeEntries, getChildNodeEntry, getChildNodeEntry, getDefinitionId, getId, getMixinTypeNames, getNodeId, getNodeTypeName, getParentId, getPropertyNames, getRemovedChildNodeEntries, getRemovedPropertyNames, getReorderedChildNodeEntries, hasChildNodeEntries, hasChildNodeEntry, hasChildNodeEntry, hasChildNodeEntry, hasPropertyName, isNode, notifyNodeAdded, notifyNodeRemoved, notifyNodesReplaced, removeAllChildNodeEntries, removeAllPropertyNames, removeChildNodeEntry, removeChildNodeEntry, removeListener, removePropertyName, renameChildNodeEntry, setChildNodeEntries, setDefinitionId, setMixinTypeNames, setNodeTypeName, setParentId, setPropertyNames
 
Methods inherited from class org.apache.jackrabbit.core.state.ItemState
connect, discard, disconnect, getModCount, getOverlayedState, getStatus, hasOverlayedState, isStale, isTransient, notifyStateCreated, notifyStateDestroyed, notifyStateDiscarded, notifyStateUpdated, reconnect, setModCount, setStatus, stateCreated, stateDestroyed, stateDiscarded, stateModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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,
                        QName nodeTypeName,
                        QName[] 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(QName name)
                                  throws NoSuchItemStateException
Returns the values of the given property of null

Parameters:
name -
Returns:
the values
Throws:
NoSuchItemStateException

getPropertyValue

public InternalValue getPropertyValue(QName name)
                               throws NoSuchItemStateException
Returns the value of the given property or null

Parameters:
name -
Returns:
the value
Throws:
NoSuchItemStateException

getProperty

public VirtualPropertyState getProperty(QName name)
                                 throws NoSuchItemStateException
returns the property state of the given name

Parameters:
name -
Returns:
Throws:
NoSuchItemStateException

setPropertyValue

public void setPropertyValue(QName name,
                             InternalValue value)
                      throws RepositoryException
Sets the property value

Parameters:
name -
value -
Throws:
RepositoryException

setPropertyValues

public void setPropertyValues(QName name,
                              int type,
                              InternalValue[] values)
                       throws RepositoryException
Sets the property values

Parameters:
name -
type -
values -
Throws:
RepositoryException

setPropertyValues

public void setPropertyValues(QName name,
                              int type,
                              InternalValue[] values,
                              boolean multiple)
                       throws RepositoryException
Sets the property values

Parameters:
name -
type -
values -
Throws:
RepositoryException

getOrCreatePropertyState

protected VirtualPropertyState getOrCreatePropertyState(QName 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(QName[] 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 -


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