org.jboss.dna.jcr.cache
Interface NodeInfo

All Known Implementing Classes:
ChangedNodeInfo, ImmutableNodeInfo, NewNodeInfo

public interface NodeInfo

A representation of a node. This is the information that is kept in the cache.


Method Summary
 Children getChildren()
          Get the children for this node.
 NodeDefinitionId getDefinitionId()
           
 List<Name> getMixinTypeNames()
          Get the names of the mixin types for this node.
 Location getOriginalLocation()
           
 UUID getParent()
           
 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.
 UUID getUuid()
           
 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).
 

Method Detail

getOriginalLocation

Location getOriginalLocation()
Returns:
location

getUuid

UUID getUuid()
Returns:
uuid

getParent

UUID getParent()
Returns:
parent

getPrimaryTypeName

Name getPrimaryTypeName()
Returns:
primaryTypeName

getMixinTypeNames

List<Name> getMixinTypeNames()
Get the names of the mixin types for this node.

Returns:
the unmodifiable list of mixin type names; never null but possibly empty

getDefinitionId

NodeDefinitionId getDefinitionId()
Returns:
definition

getChildren

Children getChildren()
Get the children for this node. Generally, clients should not hold onto the returned object but instead should simply use it and discard the reference. This is because implementations are not required to return the same instance with each call (although immutable implementations are expected to always return the same instance).

Returns:
the immutable children; never null but possibly empty

hasProperties

boolean hasProperties()
Return true of this node has at least one property.

Returns:
true if there is at least one property, or false if there are none

getPropertyCount

int getPropertyCount()
Return the number of properties on this node.

Returns:
the number of properties; never negative

getPropertyNames

Set<Name> getPropertyNames()
Get the names of the properties that are owned by this node.

Returns:
the unmodifiable set of property names

getProperty

PropertyInfo getProperty(Name name)
Get this node's property that has the supplied name.

Parameters:
name - the property name; may not be null
Returns:
the property information, or null if this node has no property with the supplied name

isNew

boolean isNew()
Indicates whether the node represented by this NodeInfo is new (i.e., does not yet exist in the persistent repository).

Returns:
true if the node represented by this NodeInfo has not yet been saved to the persistent repository.
See Also:
Item.isNew()

isModified

boolean isModified()
Indicates whether the node represented by this NodeInfo is modified (i.e., exists in the persistent repository with different child items).

Returns:
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 repository
See Also:
Item.isModified()


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.