|
ModeShape Distribution 3.0.0.Alpha5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MutableCachedNode

| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.modeshape.jcr.cache.CachedNode |
|---|
CachedNode.ReferenceType |
| Method Summary | |
|---|---|
void |
addMixin(SessionCache cache,
Name mixinName)
Add the supplied mixin type if not already an explicitly referenced. |
void |
addReferrer(SessionCache cache,
NodeKey referrerKey,
CachedNode.ReferenceType type)
Adds to this node a reference with the given type from the node with the supplied key to this node. |
MutableCachedNode |
createChild(SessionCache cache,
NodeKey key,
Name name,
Iterable<Property> properties)
Create a new node as a child of this node with the supplied name and properties. |
MutableCachedNode |
createChild(SessionCache cache,
NodeKey key,
Name name,
Property firstProperty,
Property... additionalProperties)
Create a new node as a child of this node with the supplied name and properties. |
void |
deepClone(SessionCache cache,
CachedNode sourceNode,
SessionCache sourceCache)
Clones into this node all the properties and children (deep clone) from the given source node. |
Map<NodeKey,NodeKey> |
deepCopy(SessionCache cache,
CachedNode sourceNode,
SessionCache sourceCache)
Copies into this node all the properties and children (deep copy) from the given source node. |
Set<Name> |
getAddedMixins(SessionCache cache)
Get the set of mixin names that were added to this node but not yet saved. |
Set<NodeKey> |
getChangedReferrerNodes()
Returns a set with all the referencing nodes (nodes which are referring this node) which have changed. |
String |
getEtag(SessionCache cache)
Compute an ETag value for this node. |
boolean |
hasChangedPrimaryType()
Return whether the primary type for the node has changed. |
boolean |
hasChanges()
Return whether this node has changes. |
boolean |
isNew()
Return whether this node was created since last saved. |
boolean |
isPropertyModified(SessionCache cache,
Name propertyName)
Return whether the property with the supplied name was modified since the session was last saved. |
boolean |
isPropertyNew(SessionCache cache,
Name propertyName)
Return whether the property with the supplied name was created since the session was last saved. |
void |
linkChild(SessionCache cache,
NodeKey childKey,
Name name)
Link the existing node with the supplied key to be appended as a child of this node. |
void |
lock(boolean sessionScoped)
Lock this node. |
void |
moveChild(SessionCache cache,
NodeKey key,
MutableCachedNode newParent,
Name newName)
Remove the node from being a child of this node and append it as a child of the supplied node. |
void |
removeChild(SessionCache cache,
NodeKey key)
Remove the node from being a child of this node. |
Set<NodeKey> |
removedChildren()
Returns a set with the keys of the children which have been removed for this node. |
void |
removeMixin(SessionCache cache,
Name mixinName)
Remove the supplied mixin type if already an explicitly referenced. |
void |
removeProperty(SessionCache cache,
Name name)
Remove the property with the given name. |
void |
removeReferrer(SessionCache cache,
NodeKey referrerKey,
CachedNode.ReferenceType type)
Remove from this node a reference with the given type from the node with the supplied key to this node. |
void |
renameChild(SessionCache cache,
NodeKey key,
Name newName)
Renames the child node. |
void |
reorderChild(SessionCache cache,
NodeKey key,
NodeKey nextNode)
Remove the node from being a child of this node and append it as a child before the supplied node. |
void |
setProperties(SessionCache cache,
Iterable<Property> properties)
Set the properties on this node. |
void |
setProperty(SessionCache cache,
Property property)
Set the property with the given name. |
void |
setPropertyIfUnchanged(SessionCache cache,
Property property)
Set the given property only if it has not been set previously and therefore appear as changed. |
void |
unlock()
Unlock this node. |
| Methods inherited from interface org.modeshape.jcr.cache.CachedNode |
|---|
getAdditionalParentKeys, getChildReferences, getKey, getMixinTypes, getName, getParentKey, getPath, getPrimaryType, getProperties, getProperties, getProperty, getPropertyCount, getReferrers, getSegment, hasProperties, hasProperty |
| Method Detail |
|---|
boolean isNew()
boolean isPropertyNew(SessionCache cache,
Name propertyName)
true if isNew() returns true.
cache - the cache to which this node belongs; may not be nullpropertyName - the name of the property; may not be null
isPropertyModified(org.modeshape.jcr.cache.SessionCache, org.modeshape.jcr.value.Name),
isNew()
boolean isPropertyModified(SessionCache cache,
Name propertyName)
cache - the cache to which this node belongs; may not be nullpropertyName - the name of the property; may not be null
isPropertyNew(org.modeshape.jcr.cache.SessionCache, org.modeshape.jcr.value.Name)boolean hasChanges()
void lock(boolean sessionScoped)
sessionScoped - true if the lock should be limited in scope to the lifetime of the session, or false otherwisevoid unlock()
void setProperty(SessionCache cache,
Property property)
cache - the cache to which this node belongs; may not be nullproperty - the property; may not be null
NodeNotFoundException - if this node no longer exists
void setPropertyIfUnchanged(SessionCache cache,
Property property)
cache - the cache to which this node belongs; may not be nullproperty - the property; may not be null
NodeNotFoundException - if this node no longer exists
void setProperties(SessionCache cache,
Iterable<Property> properties)
cache - the cache to which this node belongs; may not be nullproperties - the properties to be set; may not be null
NodeNotFoundException - if this node no longer exists
void removeProperty(SessionCache cache,
Name name)
cache - the cache to which this node belongs; may not be nullname - the name of the property to be removed; may not be null
NodeNotFoundException - if this node no longer exists
void addMixin(SessionCache cache,
Name mixinName)
cache - the cache to which this node belongs; may not be nullmixinName - the name of the mixin to be removed; may not be null
void removeMixin(SessionCache cache,
Name mixinName)
cache - the cache to which this node belongs; may not be nullmixinName - the name of the mixin to be removed; may not be nullSet<Name> getAddedMixins(SessionCache cache)
cache - the cache to which this node belongs; may not be null
boolean hasChangedPrimaryType()
MutableCachedNode createChild(SessionCache cache,
NodeKey key,
Name name,
Property firstProperty,
Property... additionalProperties)
cache - the cache to which this node belongs; may not be nullkey - the key for the new node; may not be nullname - the name for the new node; may not be nullfirstProperty - the first property; may not be nulladditionalProperties - the properties that should be set on the node; may be null or empty, and any null property
references will be ignored
MutableCachedNode createChild(SessionCache cache,
NodeKey key,
Name name,
Iterable<Property> properties)
cache - the cache to which this node belongs; may not be nullkey - the key for the new node; may not be nullname - the name for the new node; may not be nullproperties - the properties that should be set on the node; may be null or empty, and any null property references
will be ignored
void removeChild(SessionCache cache,
NodeKey key)
cache - the cache to which this node belongs; may not be nullkey - the key for the child that is to be removed; may not be null
NodeNotFoundException - if the node does not exist as a child of this node
void moveChild(SessionCache cache,
NodeKey key,
MutableCachedNode newParent,
Name newName)
cache - the cache to which this node belongs; may not be nullkey - the key for the child that is to be removed; may not be nullnewParent - the new parent for the node; may not be null and may not be this nodenewName - the new name for the node, or null if the existing name is to be used
NodeNotFoundException - if the node does not exist as a child of this node
void linkChild(SessionCache cache,
NodeKey childKey,
Name name)
cache - the cache to which this node belongs; may not be nullchildKey - the key for the child that is to be removed; may not be nullname - the name for the (linked) node, or null if the existing name is to be used
NodeNotFoundException - if the node does not exist
void reorderChild(SessionCache cache,
NodeKey key,
NodeKey nextNode)
cache - the cache to which this node belongs; may not be nullkey - the key for the child that is to be removed; may not be nullnextNode - the key for the node before which the node should be moved; may be null if the node should be moved to the
end of the parents
NodeNotFoundException - if the node does not exist as a child of this node
void renameChild(SessionCache cache,
NodeKey key,
Name newName)
cache - the cache to which this node belongs; may not be nullkey - the key for the child that is to be removed; may not be nullnewName - the new name for the node; may not be null
NodeNotFoundException - if the node does not exist as a child of this node
void addReferrer(SessionCache cache,
NodeKey referrerKey,
CachedNode.ReferenceType type)
cache - the cache to which this node belongs; may not be nullreferrerKey - the key for the node that has a new reference to this node; may not be nulltype - the reference type; may not be null
void removeReferrer(SessionCache cache,
NodeKey referrerKey,
CachedNode.ReferenceType type)
cache - the cache to which this node belongs; may not be nullreferrerKey - the key for the node that no longer has a reference to this node; may not be nulltype - the reference type; may not be nullString getEtag(SessionCache cache)
cache - the cache to which this node belongs; may not be null
Map<NodeKey,NodeKey> deepCopy(SessionCache cache,
CachedNode sourceNode,
SessionCache sourceCache)
cache - the cache to which this node belongs; may not be nullsourceNode - the node from which to copy the properties and children; may not be nullsourceCache - the cache in which the source node belongs; may not be null
void deepClone(SessionCache cache,
CachedNode sourceNode,
SessionCache sourceCache)
cache - the cache to which this node belongs; may not be nullsourceNode - the node from which to copy the properties and children; may not be nullsourceCache - the cache in which the source node belongs; may not be nullSet<NodeKey> removedChildren()
Set<NodeKey>, never nullSet<NodeKey> getChangedReferrerNodes()
NodeKey instances, never null.
|
ModeShape Distribution 3.0.0.Alpha5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||