|
||||||||||
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. merged and resolved) node type representation of this node's primary and mixin node types. |
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
ItemStateException
public 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 RepositoryException
name
- value
-
RepositoryException
public void setPropertyValues(Name name, int type, InternalValue[] values) throws RepositoryException
name
- type
- values
-
RepositoryException
public void setPropertyValues(Name name, int type, InternalValue[] values, boolean multiple) throws RepositoryException
name
- type
- values
-
RepositoryException
public EffectiveNodeType getEffectiveNodeType() throws RepositoryException
RepositoryException
public boolean hasNode(Name name)
name
-
true
if the given child exists.public boolean removeNode(Name name) throws RepositoryException
name
-
true
if the child was removed
RepositoryException
public boolean removeNode(Name name, int index) throws RepositoryException
name
- index
-
true
if the child was removed.
RepositoryException
public boolean removeProperty(Name name) throws RepositoryException
name
-
true
if the property was removed.
RepositoryException
public NodeStateEx getNode(Name name, int index) throws RepositoryException
null
if the node does not exist.
name
- index
-
RepositoryException
public NodeStateEx addNode(Name nodeName, Name nodeTypeName, NodeId id, boolean referenceable) throws NoSuchNodeTypeException, ConstraintViolationException, RepositoryException
nodeName
- nodeTypeName
-
NoSuchNodeTypeException
ConstraintViolationException
RepositoryException
public NodeStateEx[] getChildNodes() throws RepositoryException
RepositoryException
public void store() throws RepositoryException
RepositoryException
public void reload() throws RepositoryException
RepositoryException
public void copyFrom(PropertyImpl prop) throws RepositoryException
prop
-
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |