|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeEntry
NodeEntry
...
Method Summary | |
---|---|
NodeState |
addNewNodeEntry(Name nodeName,
String uniqueID,
Name primaryNodeType,
QNodeDefinition definition)
Adds a new, transient child NodeEntry |
PropertyState |
addNewPropertyEntry(Name propName,
QPropertyDefinition definition)
Add a new, transient PropertyEntry to this NodeEntry
and return the PropertyState associated with the new entry. |
NodeEntry |
addNodeEntry(Name nodeName,
String uniqueID,
int index)
Adds a new child NodeEntry to this entry. |
void |
addPropertyEntries(Collection propNames)
Adds property entries for the given Name s. |
PropertyEntry |
addPropertyEntry(Name propName)
Add an existing PropertyEntry with the given name. |
HierarchyEntry |
getDeepEntry(Path path)
Traverse the tree below this entry and return the child entry matching the given path. |
NodeId |
getId()
|
int |
getIndex()
|
Iterator |
getNodeEntries()
Returns a unmodifiable iterator of NodeEntry objects
denoting the the valid child NodeEntries present on this NodeEntry . |
List |
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()
|
Iterator |
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 |
setUniqueID(String uniqueID)
|
Methods inherited from interface org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry |
---|
collectStates, denotesNode, getItemState, getName, getParent, getPath, getStatus, getWorkspacePath, invalidate, isAvailable, reload, remove, revert, setItemState, transientRemove |
Method Detail |
---|
NodeId getId()
NodeId
of this child node entry.NodeId getWorkspaceId()
getId()
unless this entry or any of its ancestors has been
transiently moved.
getId()
String getUniqueID()
null
if the node state cannot be
identified with a unique ID.void setUniqueID(String uniqueID)
uniqueID
- int getIndex()
Path.INDEX_UNDEFINED
is returned.NodeState getNodeState() throws ItemNotFoundException, RepositoryException
NodeState
.
ItemNotFoundException
- if the NodeState
does not
exist.
RepositoryException
- If an error occurs while retrieving the
NodeState
.HierarchyEntry getDeepEntry(Path path) throws PathNotFoundException, RepositoryException
path
-
PathNotFoundException
RepositoryException
HierarchyEntry lookupDeepEntry(Path workspacePath)
null
is return.
workspacePath
-
null
.boolean hasNodeEntry(Name nodeName)
NodeEntry
with the
specified nodeName
.
nodeName
- Name
object specifying a node name
true
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 getNodeEntries() throws RepositoryException
NodeEntry
objects
denoting the the valid child NodeEntries present on this NodeEntry
.
NodeEntry
objects
RepositoryException
- If an unexpected error occurs.List getNodeEntries(Name nodeName) throws RepositoryException
NodeEntry
s with the
specified name.
nodeName
- name of the child node entries that should be returned
NodeEntry
objects
RepositoryException
- If an unexpected error occurs.NodeEntry addNodeEntry(Name nodeName, String uniqueID, int index) throws RepositoryException
nodeName
- uniqueID
-
NodeEntry
RepositoryException
- If an unexpected error occurs.NodeState 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 name
true
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 getPropertyEntries()
PropertyEntry addPropertyEntry(Name propName) throws ItemExistsException, RepositoryException
PropertyEntry
with the given name.
Please note the difference to addNewPropertyEntry(Name, QPropertyDefinition)
which adds a new, transient entry.
propName
-
PropertyEntry
ItemExistsException
- if a child item exists with the given name
RepositoryException
- if an unexpected error occurs.void addPropertyEntries(Collection 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.PropertyState addNewPropertyEntry(Name propName, QPropertyDefinition definition) throws ItemExistsException, RepositoryException
PropertyEntry
to this NodeEntry
and return the PropertyState
associated with the new entry.
propName
-
ItemExistsException
RepositoryException
- if an unexpected error occurs.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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |