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 InvalidItemStateException, RepositoryException
NodeId
of this child node entry.InvalidItemStateException
RepositoryException
NodeId getWorkspaceId() throws InvalidItemStateException, RepositoryException
getId()
unless this entry or any of its ancestors has been
transiently moved.InvalidItemStateException
RepositoryException
getId()
String getUniqueID()
null
if the node state cannot be
identified with a unique ID.void setUniqueID(String uniqueID)
uniqueID
- int getIndex() throws InvalidItemStateException, RepositoryException
Path.INDEX_UNDEFINED
is returned.InvalidItemStateException
RepositoryException
NodeState getNodeState() throws ItemNotFoundException, RepositoryException
NodeState
.ItemNotFoundException
- if the NodeState
does not
exist.RepositoryException
- If an error occurs while retrieving the
NodeState
.NodeEntry getDeepNodeEntry(Path path) throws PathNotFoundException, RepositoryException
path
- PathNotFoundException
RepositoryException
PropertyEntry getDeepPropertyEntry(Path path) throws PathNotFoundException, RepositoryException
path
- PathNotFoundException
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 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.RepositoryException
- If an unexpected error occurs.NodeEntry getNodeEntry(Name nodeName, int index, boolean loadIfNotFound) throws 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.RepositoryException
- If an unexpected error occurs.Iterator<NodeEntry> getNodeEntries() throws RepositoryException
NodeEntry
objects
denoting the the valid child NodeEntries present on this NodeEntry
.NodeEntry
objectsRepositoryException
- If an unexpected error occurs.List<NodeEntry> getNodeEntries(Name nodeName) throws RepositoryException
NodeEntry
s with the
specified name.nodeName
- name of the child node entries that should be returnedNodeEntry
objectsRepositoryException
- If an unexpected error occurs.void setNodeEntries(Iterator<ChildInfo> childInfos) throws RepositoryException
ChildNodeEntries
of this node.childInfos
- RepositoryException
NodeEntry getOrAddNodeEntry(Name nodeName, int index, String uniqueID) throws RepositoryException
nodeName
- index
- uniqueID
- NodeEntry
.RepositoryException
- If an unexpected error occurs.NodeEntry addNewNodeEntry(Name nodeName, String uniqueID, Name primaryNodeType, QNodeDefinition definition) throws RepositoryException
NodeEntry
nodeName
- uniqueID
- primaryNodeType
- definition
- 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 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.RepositoryException
- If an unexpected error occurs.PropertyEntry getPropertyEntry(Name propName, boolean loadIfNotFound) throws 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.RepositoryException
- If an unexpected error occurs.Iterator<PropertyEntry> getPropertyEntries()
PropertyEntry getOrAddPropertyEntry(Name propName) throws ItemExistsException, 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
ItemExistsException
- if a child item exists with the given nameRepositoryException
- if an unexpected error occurs.void setPropertyEntries(Collection<Name> propNames) throws ItemExistsException, 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
- ItemExistsException
RepositoryException
- if an unexpected error occurs.PropertyEntry addNewPropertyEntry(Name propName, QPropertyDefinition definition, QValue[] values, int propertyType) throws ItemExistsException, RepositoryException
PropertyEntry
to this NodeEntry
and return the PropertyState
associated with the new entry.propName
- definition
- values
- propertyType
- ItemExistsException
RepositoryException
void orderBefore(NodeEntry beforeEntry) throws 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.RepositoryException
- If an unexpected error occurs.NodeEntry move(Name newName, NodeEntry newParent, boolean transientMove) throws 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
- 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–2021 The Apache Software Foundation. All rights reserved.