|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.version.NodeStateEx
public class NodeStateEx
This Class provides some basic node operations directly on the node state.
| Constructor Summary | |
|---|---|
NodeStateEx(UpdatableItemStateManager stateMgr,
NodeTypeRegistry ntReg,
NodeState nodeState,
Name name)
Creates a new persistent node |
|
| Method Summary | |
|---|---|
NodeStateEx |
addNode(Name nodeName,
Name nodeTypeName,
NodeId id,
boolean referenceable)
Adds a new child node with the given name |
void |
copyFrom(PropertyImpl prop)
copies a property |
NodeStateEx[] |
getChildNodes()
returns all child nodes |
EffectiveNodeType |
getEffectiveNodeType()
Returns the effective (i.e. |
Name |
getName()
returns the name of this node |
NodeStateEx |
getNode(Name name,
int index)
retrieves the child node with the given name and 1-base index or null if the node does not exist. |
NodeId |
getNodeId()
Returns the id of this node. |
NodeId |
getParentId()
Returns the parent id of this node |
PropertyState[] |
getProperties()
Returns the properties of this node |
InternalValue |
getPropertyValue(Name name)
Returns the value of the given property or null |
InternalValue[] |
getPropertyValues(Name name)
Returns the values of the given property of null |
NodeState |
getState()
Returns the underlaying node state. |
boolean |
hasNode(Name name)
checks if the given child node exists. |
boolean |
hasProperty(Name name)
Checks if the given property exists |
void |
reload()
reloads the persistent state recursively |
boolean |
removeNode(Name name)
removes the (first) child node with the given name. |
boolean |
removeNode(Name name,
int index)
removes the child node with the given name and 1-based index |
boolean |
removeProperty(Name name)
removes the property with the given name |
void |
setPropertyValue(Name name,
InternalValue value)
Sets the property value |
void |
setPropertyValues(Name name,
int type,
InternalValue[] values)
Sets the property values |
void |
setPropertyValues(Name name,
int type,
InternalValue[] values,
boolean multiple)
Sets the property values |
void |
store()
stores the persistent state recursively |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeStateEx(UpdatableItemStateManager stateMgr,
NodeTypeRegistry ntReg,
NodeState nodeState,
Name name)
stateMgr - nodeState - | Method Detail |
|---|
public Name getName()
public NodeId getNodeId()
public NodeId getParentId()
public NodeState getState()
public PropertyState[] getProperties()
throws ItemStateException
ItemStateExceptionpublic boolean hasProperty(Name name)
name -
true if the given property exists.public InternalValue[] getPropertyValues(Name name)
null
name -
public InternalValue getPropertyValue(Name name)
null
name -
public void setPropertyValue(Name name,
InternalValue value)
throws javax.jcr.RepositoryException
name - value -
javax.jcr.RepositoryException
public void setPropertyValues(Name name,
int type,
InternalValue[] values)
throws javax.jcr.RepositoryException
name - type - values -
javax.jcr.RepositoryException
public void setPropertyValues(Name name,
int type,
InternalValue[] values,
boolean multiple)
throws javax.jcr.RepositoryException
name - type - values -
javax.jcr.RepositoryException
public EffectiveNodeType getEffectiveNodeType()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic boolean hasNode(Name name)
name -
true if the given child exists.
public boolean removeNode(Name name)
throws javax.jcr.RepositoryException
name -
true if the child was removed
javax.jcr.RepositoryException
public boolean removeNode(Name name,
int index)
throws javax.jcr.RepositoryException
name - index -
true if the child was removed.
javax.jcr.RepositoryException
public boolean removeProperty(Name name)
throws javax.jcr.RepositoryException
name -
true if the property was removed.
javax.jcr.RepositoryException
public NodeStateEx getNode(Name name,
int index)
throws javax.jcr.RepositoryException
null if the node does not exist.
name - index -
javax.jcr.RepositoryException
public NodeStateEx addNode(Name nodeName,
Name nodeTypeName,
NodeId id,
boolean referenceable)
throws javax.jcr.nodetype.NoSuchNodeTypeException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.RepositoryException
nodeName - nodeTypeName -
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public NodeStateEx[] getChildNodes()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void store()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void reload()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void copyFrom(PropertyImpl prop)
throws javax.jcr.RepositoryException
prop -
javax.jcr.RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||