public interface NodeEntry extends HierarchyEntry
NodeEntry
...Modifier and Type | Method and Description |
---|---|
NodeEntry |
addNewNodeEntry(Name nodeName,
String uniqueID,
Name primaryNodeType,
QNodeDefinition definition)
Adds a new, transient child
NodeEntry |
PropertyEntry |
addNewPropertyEntry(Name propName,
QPropertyDefinition definition,
QValue[] values,
int propertyType)
Add a new, transient
PropertyEntry to this NodeEntry
and return the PropertyState associated with the new entry. |
NodeEntry |
getDeepNodeEntry(Path path)
Traverse the tree below this entry and return the child entry matching
the given path.
|
PropertyEntry |
getDeepPropertyEntry(Path path)
Traverse the tree below this entry and return the child entry matching
the given path.
|
NodeId |
getId() |
int |
getIndex() |
Iterator<NodeEntry> |
getNodeEntries()
Returns a unmodifiable iterator of
NodeEntry objects
denoting the the valid child NodeEntries present on this NodeEntry . |
List<NodeEntry> |
getNodeEntries(Name nodeName)
Returns a unmodifiable List of
NodeEntry s with the
specified name. |
NodeEntry |
getNodeEntry(Name nodeName,
int index)
Returns the valid
NodeEntry with the specified name
and index or null if there's no matching entry. |
NodeEntry |
getNodeEntry(Name nodeName,
int index,
boolean loadIfNotFound)
Returns the valid
NodeEntry with the specified name
and index or null if there's no matching entry. |
NodeState |
getNodeState() |
NodeEntry |
getOrAddNodeEntry(Name nodeName,
int index,
String uniqueID)
Adds a child NodeEntry to this entry if it not yet present with this
node entry.
|
PropertyEntry |
getOrAddPropertyEntry(Name propName)
Add an existing
PropertyEntry with the given name if it is
not yet contained in this NodeEntry . |
Iterator<PropertyEntry> |
getPropertyEntries()
Returns an unmodifiable Iterator over those children that represent valid
PropertyEntries.
|
PropertyEntry |
getPropertyEntry(Name propName)
Returns the valid
PropertyEntry with the specified name
or null if no matching entry exists. |
PropertyEntry |
getPropertyEntry(Name propName,
boolean loadIfNotFound)
Returns the valid
PropertyEntry with the specified name
or null if no matching entry exists. |
String |
getUniqueID() |
NodeId |
getWorkspaceId()
Returns the ID that must be used for resolving this entry OR loading its
children entries from the persistent layer.
|
boolean |
hasNodeEntry(Name nodeName)
Determines if there is a valid
NodeEntry with the
specified nodeName . |
boolean |
hasNodeEntry(Name nodeName,
int index)
Determines if there is a valid
NodeEntry with the
specified name and index . |
boolean |
hasPropertyEntry(Name propName)
Determines if there is a property entry with the specified
Name . |
boolean |
isTransientlyMoved() |
HierarchyEntry |
lookupDeepEntry(Path workspacePath)
Traverse the tree below this entry and return the child entry matching
the given 'workspacePath', i.e.
|
NodeEntry |
move(Name newName,
NodeEntry newParent,
boolean transientMove)
Moves this
NodeEntry as new child entry of the
NodeEntry identified by newParent and/or renames
it to newName . |
void |
orderBefore(NodeEntry beforeEntry)
Reorders this NodeEntry before the sibling entry specified by the given
beforeEntry . |
void |
refresh(Event childEvent)
The parent entry of a external event gets informed about the modification.
|
void |
setNodeEntries(Iterator<ChildInfo> childInfos)
Creates or updates the
ChildNodeEntries of this node. |
void |
setPropertyEntries(Collection<Name> propNames)
Adds property entries for the given
Name s. |
void |
setUniqueID(String uniqueID) |
calculateStatus, complete, denotesNode, getGeneration, getItemState, getName, getParent, getPath, getStatus, getWorkspacePath, invalidate, isAvailable, reload, remove, revert, setItemState, transientRemove
NodeId getId() throws javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
NodeId
of this child node entry.javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
NodeId getWorkspaceId() throws javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
getId()
unless this entry or any of its ancestors has been
transiently moved.javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
getId()
String getUniqueID()
null
if the node state cannot be
identified with a unique ID.void setUniqueID(String uniqueID)
uniqueID
- int getIndex() throws javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
Path.INDEX_UNDEFINED
is returned.javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
NodeState getNodeState() throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
NodeState
.javax.jcr.ItemNotFoundException
- if the NodeState
does not
exist.javax.jcr.RepositoryException
- If an error occurs while retrieving the
NodeState
.NodeEntry getDeepNodeEntry(Path path) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
path
- javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
PropertyEntry getDeepPropertyEntry(Path path) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
path
- javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
HierarchyEntry lookupDeepEntry(Path workspacePath)
If no matching entry can be found, null
is return.
workspacePath
- null
.boolean hasNodeEntry(Name nodeName)
NodeEntry
with the
specified nodeName
.nodeName
- Name
object specifying a node nametrue
if there is a NodeEntry
with
the specified nodeName
.boolean hasNodeEntry(Name nodeName, int index)
NodeEntry
with the
specified name
and index
.nodeName
- Name
object specifying a node name.index
- 1-based index if there are same-name child node entries.true
if there is a NodeEntry
with
the specified name
and index
.NodeEntry getNodeEntry(Name nodeName, int index) throws javax.jcr.RepositoryException
NodeEntry
with the specified name
and index or null
if there's no matching entry.nodeName
- Name
object specifying a node name.index
- 1-based index if there are same-name child node entries.NodeEntry
with the specified name and index
or null
if there's no matching entry.javax.jcr.RepositoryException
- If an unexpected error occurs.NodeEntry getNodeEntry(Name nodeName, int index, boolean loadIfNotFound) throws javax.jcr.RepositoryException
NodeEntry
with the specified name
and index or null
if there's no matching entry. If
loadIfNotFound
is true, the implementation must make
sure, that it's list of child entries is up to date and eventually
try to load the node entry.nodeName
- Name
object specifying a node name.index
- 1-based index if there are same-name child node entries.loadIfNotFound
- NodeEntry
with the specified name and index
or null
if there's no matching entry.javax.jcr.RepositoryException
- If an unexpected error occurs.Iterator<NodeEntry> getNodeEntries() throws javax.jcr.RepositoryException
NodeEntry
objects
denoting the the valid child NodeEntries present on this NodeEntry
.NodeEntry
objectsjavax.jcr.RepositoryException
- If an unexpected error occurs.List<NodeEntry> getNodeEntries(Name nodeName) throws javax.jcr.RepositoryException
NodeEntry
s with the
specified name.nodeName
- name of the child node entries that should be returnedNodeEntry
objectsjavax.jcr.RepositoryException
- If an unexpected error occurs.void setNodeEntries(Iterator<ChildInfo> childInfos) throws javax.jcr.RepositoryException
ChildNodeEntries
of this node.childInfos
- javax.jcr.RepositoryException
NodeEntry getOrAddNodeEntry(Name nodeName, int index, String uniqueID) throws javax.jcr.RepositoryException
nodeName
- index
- uniqueID
- NodeEntry
.javax.jcr.RepositoryException
- If an unexpected error occurs.NodeEntry addNewNodeEntry(Name nodeName, String uniqueID, Name primaryNodeType, QNodeDefinition definition) throws javax.jcr.RepositoryException
NodeEntry
nodeName
- uniqueID
- primaryNodeType
- definition
- javax.jcr.RepositoryException
- If an error occurs.boolean hasPropertyEntry(Name propName)
Name
.propName
- Name
object specifying a property nametrue
if there is a property entry with the specified
Name
.PropertyEntry getPropertyEntry(Name propName) throws javax.jcr.RepositoryException
PropertyEntry
with the specified name
or null
if no matching entry exists.propName
- Name
object specifying a property name.PropertyEntry
with the specified name or
null
if no matching entry exists.javax.jcr.RepositoryException
- If an unexpected error occurs.PropertyEntry getPropertyEntry(Name propName, boolean loadIfNotFound) throws javax.jcr.RepositoryException
PropertyEntry
with the specified name
or null
if no matching entry exists. If
loadIfNotFound
is true, the implementation must make
sure, that it's list of property entries is up to date and eventually
try to load the property entry with the given name.propName
- Name
object specifying a property name.loadIfNotFound
- PropertyEntry
with the specified name or
null
if no matching entry exists.javax.jcr.RepositoryException
- If an unexpected error occurs.Iterator<PropertyEntry> getPropertyEntries()
PropertyEntry getOrAddPropertyEntry(Name propName) throws javax.jcr.ItemExistsException, javax.jcr.RepositoryException
PropertyEntry
with the given name if it is
not yet contained in this NodeEntry
.
Please note the difference to addNewPropertyEntry(Name, QPropertyDefinition, QValue[], int)
which adds a new, transient entry.propName
- PropertyEntry
javax.jcr.ItemExistsException
- if a child item exists with the given namejavax.jcr.RepositoryException
- if an unexpected error occurs.void setPropertyEntries(Collection<Name> propNames) throws javax.jcr.ItemExistsException, javax.jcr.RepositoryException
Name
s. It depends on
the status of this NodeEntry
, how conflicts are resolved
and whether or not existing entries that are missing in the iterator
get removed.propNames
- javax.jcr.ItemExistsException
javax.jcr.RepositoryException
- if an unexpected error occurs.PropertyEntry addNewPropertyEntry(Name propName, QPropertyDefinition definition, QValue[] values, int propertyType) throws javax.jcr.ItemExistsException, javax.jcr.RepositoryException
PropertyEntry
to this NodeEntry
and return the PropertyState
associated with the new entry.propName
- definition
- values
- propertyType
- javax.jcr.ItemExistsException
javax.jcr.RepositoryException
void orderBefore(NodeEntry beforeEntry) throws javax.jcr.RepositoryException
beforeEntry
.beforeEntry
- the child node where to insert the node before. If
null
this entry is moved to the end of its parents child node entries.javax.jcr.RepositoryException
- If an unexpected error occurs.NodeEntry move(Name newName, NodeEntry newParent, boolean transientMove) throws javax.jcr.RepositoryException
NodeEntry
as new child entry of the
NodeEntry
identified by newParent
and/or renames
it to newName
. If transientMove
is true, an
implementation must make sure, that reverting this modification by calling
HierarchyEntry.revert()
on the common ancestor of both parents
moves this NodeEntry back and resets the name to its original value.newName
- newParent
- javax.jcr.RepositoryException
- If the entry to be moved is not a child of this
NodeEntry or if an unexpected error occurs.boolean isTransientlyMoved()
NodeEntry
is transiently moved.void refresh(Event childEvent)
Event.getParentId()
of the given childEvent must point
to this NodeEntry
.childEvent
- Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.