|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.jcr.cache.ChangedNodeInfo
@NotThreadSafe public class ChangedNodeInfo
The information that describes a node. This is the information that is kept in the cache.
Each instance maintains a reference to the original (usually immutable) NodeInfo representation that was probably read from the repository.
Constructor Summary | |
---|---|
ChangedNodeInfo(NodeInfo original)
Create an immutable NodeInfo instance. |
Method Summary | |
---|---|
ChildNode |
addChild(Name childName,
UUID childUuid,
PathFactory factory)
Add a child to the children. |
void |
addPeer(UUID peerUuid)
Adds a peer node to this change. |
Children |
getChildren()
Get the children for this node. |
NodeDefinitionId |
getDefinitionId()
|
List<Name> |
getMixinTypeNames()
Get the names of the mixin types for this node. |
NodeInfo |
getOriginal()
Return the original node information. |
Location |
getOriginalLocation()
|
UUID |
getParent()
|
Collection<UUID> |
getPeers()
Returns the peer nodes for this changed node. |
Name |
getPrimaryTypeName()
|
PropertyInfo |
getProperty(Name name)
Get this node's property that has the supplied name. |
int |
getPropertyCount()
Return the number of properties on this node. |
Set<Name> |
getPropertyNames()
Get the names of the properties that are owned by this node. |
Set<Name> |
getSingleMultiPropertyNames()
|
UUID |
getUuid()
|
Collection<UUID> |
getUuidsForRemovedChildren()
Get the UUIDs for the children for this node that have been removed since the node was last persisted. |
boolean |
hasProperties()
Return true of this node has at least one property. |
boolean |
isModified()
Indicates whether the node represented by this NodeInfo is modified (i.e., exists in the persistent repository with
different child items). |
boolean |
isNew()
Indicates whether the node represented by this NodeInfo is new (i.e., does not yet exist in the persistent
repository). |
ChildNode |
removeChild(UUID childUUID,
PathFactory factory)
Remove a child from the children. |
PropertyInfo |
removeProperty(Name name)
|
boolean |
removeSingleMultiProperty(Name name)
|
void |
setDefinitionId(NodeDefinitionId definitionId)
Set the identifier of the node definition for this node. |
UUID |
setParent(UUID parent)
Record that this node has been moved under a new parent. |
PropertyInfo |
setProperty(PropertyInfo newProperty,
ValueFactories factories)
|
boolean |
setSingleMultiProperty(Name name)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChangedNodeInfo(NodeInfo original)
original
- the original node information, may not be nullMethod Detail |
---|
public final Collection<UUID> getPeers()
Peer nodes are nodes that must be saved with this node (e.g., the other changed node in a
Session.move(String, String)
operation.
public void addPeer(UUID peerUuid)
Peer nodes are nodes that must be saved with this node (e.g., the other changed node in a
Session.move(String, String)
operation.
peerUuid
- the UUID of the peer nodepublic boolean setSingleMultiProperty(Name name)
public boolean removeSingleMultiProperty(Name name)
public Set<Name> getSingleMultiPropertyNames()
public NodeInfo getOriginal()
public Location getOriginalLocation()
getOriginalLocation
in interface NodeInfo
NodeInfo.getOriginalLocation()
public UUID getUuid()
getUuid
in interface NodeInfo
NodeInfo.getUuid()
public UUID getParent()
getParent
in interface NodeInfo
NodeInfo.getParent()
public UUID setParent(UUID parent)
parent
- the new parent, or null if the original's parent should be used
public Name getPrimaryTypeName()
getPrimaryTypeName
in interface NodeInfo
NodeInfo.getPrimaryTypeName()
public List<Name> getMixinTypeNames()
getMixinTypeNames
in interface NodeInfo
NodeInfo.getMixinTypeNames()
public NodeDefinitionId getDefinitionId()
getDefinitionId
in interface NodeInfo
NodeInfo.getDefinitionId()
public void setDefinitionId(NodeDefinitionId definitionId)
setting
the DnaIntLexicon.NODE_DEFINITON
property. However,
since that property is not always allowed, this method provides a way to set it locally (without requiring a property).
definitionId
- the new property definition identifier; may not be nullsetProperty(PropertyInfo, ValueFactories)
public Children getChildren()
getChildren
in interface NodeInfo
NodeInfo.getChildren()
public Collection<UUID> getUuidsForRemovedChildren()
public ChildNode addChild(Name childName, UUID childUuid, PathFactory factory)
childName
- the name of the child that is to be added; may not be nullchildUuid
- the UUID of the child that is to be added; may not be nullfactory
- the path factory that should be used to create a Path.Segment
for the new ChildNode
object
public ChildNode removeChild(UUID childUUID, PathFactory factory)
childUUID
- the UUID of the child that is to be removed; may not be nullfactory
- the path factory that should be used to create a Path.Segment
for replacement ChildNode
objects
for nodes with the same name that and higher same-name-sibiling indexes.
public boolean hasProperties()
hasProperties
in interface NodeInfo
NodeInfo.hasProperties()
public int getPropertyCount()
getPropertyCount
in interface NodeInfo
NodeInfo.getPropertyCount()
public Set<Name> getPropertyNames()
getPropertyNames
in interface NodeInfo
NodeInfo.getPropertyNames()
public PropertyInfo getProperty(Name name)
getProperty
in interface NodeInfo
name
- the property name; may not be null
NodeInfo.getProperty(org.jboss.dna.graph.property.Name)
public PropertyInfo setProperty(PropertyInfo newProperty, ValueFactories factories)
public PropertyInfo removeProperty(Name name)
public boolean isNew()
NodeInfo
is new (i.e., does not yet exist in the persistent
repository).
isNew
in interface NodeInfo
true
if the node represented by this NodeInfo
has not yet been saved to the persistent repository.NodeInfo.isNew()
public boolean isModified()
NodeInfo
is modified (i.e., exists in the persistent repository with
different child items).
isModified
in interface NodeInfo
true
if the immediate child items of the node represented by this NodeInfo
have been modified since
the last time the node was saved to the persistent repositoryNodeInfo.isModified()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |