Interface NodeEntry

    • Method Detail

      • getUniqueID

        String getUniqueID()
        Returns:
        the unique ID of the node state which is referenced by this child node entry or null if the node state cannot be identified with a unique ID.
      • setUniqueID

        void setUniqueID​(String uniqueID)
        Parameters:
        uniqueID -
      • getDeepNodeEntry

        NodeEntry getDeepNodeEntry​(Path path)
                            throws PathNotFoundException,
                                   RepositoryException
        Traverse the tree below this entry and return the child entry matching the given path. If that entry has not been loaded yet, try to do so. NOTE: In contrast to getNodeEntry, getNodeEntries this method may return invalid entries, i.e. entries connected to a removed or stale ItemState.
        Parameters:
        path -
        Returns:
        the entry at the given path.
        Throws:
        PathNotFoundException
        RepositoryException
      • getDeepPropertyEntry

        PropertyEntry getDeepPropertyEntry​(Path path)
                                    throws PathNotFoundException,
                                           RepositoryException
        Traverse the tree below this entry and return the child entry matching the given path. If that entry has not been loaded yet, try to do so. NOTE: In contrast to getPropertyEntry and getPropertyEntries this method may return invalid entries, i.e. entries connected to a removed or stale ItemState.
        Parameters:
        path -
        Returns:
        the property entry at the given path.
        Throws:
        PathNotFoundException
        RepositoryException
      • lookupDeepEntry

        HierarchyEntry lookupDeepEntry​(Path workspacePath)
        Traverse the tree below this entry and return the child entry matching the given 'workspacePath', i.e. transient modifications and new entries are ignored.

        If no matching entry can be found, null is return.

        Parameters:
        workspacePath -
        Returns:
        matching entry or null.
      • hasNodeEntry

        boolean hasNodeEntry​(Name nodeName)
        Determines if there is a valid NodeEntry with the specified nodeName.
        Parameters:
        nodeName - Name object specifying a node name
        Returns:
        true if there is a NodeEntry with the specified nodeName.
      • hasNodeEntry

        boolean hasNodeEntry​(Name nodeName,
                             int index)
        Determines if there is a valid NodeEntry with the specified name and index.
        Parameters:
        nodeName - Name object specifying a node name.
        index - 1-based index if there are same-name child node entries.
        Returns:
        true if there is a NodeEntry with the specified name and index.
      • getNodeEntry

        NodeEntry getNodeEntry​(Name nodeName,
                               int index)
                        throws RepositoryException
        Returns the valid NodeEntry with the specified name and index or null if there's no matching entry.
        Parameters:
        nodeName - Name object specifying a node name.
        index - 1-based index if there are same-name child node entries.
        Returns:
        The NodeEntry with the specified name and index or null if there's no matching entry.
        Throws:
        RepositoryException - If an unexpected error occurs.
      • getNodeEntry

        NodeEntry getNodeEntry​(Name nodeName,
                               int index,
                               boolean loadIfNotFound)
                        throws RepositoryException
        Returns the valid 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.
        Parameters:
        nodeName - Name object specifying a node name.
        index - 1-based index if there are same-name child node entries.
        loadIfNotFound -
        Returns:
        The NodeEntry with the specified name and index or null if there's no matching entry.
        Throws:
        RepositoryException - If an unexpected error occurs.
      • getNodeEntries

        Iterator<NodeEntry> getNodeEntries()
                                    throws RepositoryException
        Returns a unmodifiable iterator of NodeEntry objects denoting the the valid child NodeEntries present on this NodeEntry.
        Returns:
        iterator of NodeEntry objects
        Throws:
        RepositoryException - If an unexpected error occurs.
      • getNodeEntries

        List<NodeEntry> getNodeEntries​(Name nodeName)
                                throws RepositoryException
        Returns a unmodifiable List of NodeEntrys with the specified name.
        Parameters:
        nodeName - name of the child node entries that should be returned
        Returns:
        list of NodeEntry objects
        Throws:
        RepositoryException - If an unexpected error occurs.
      • getOrAddNodeEntry

        NodeEntry getOrAddNodeEntry​(Name nodeName,
                                    int index,
                                    String uniqueID)
                             throws RepositoryException
        Adds a child NodeEntry to this entry if it not yet present with this node entry.
        Parameters:
        nodeName -
        index -
        uniqueID -
        Returns:
        the NodeEntry.
        Throws:
        RepositoryException - If an unexpected error occurs.
      • hasPropertyEntry

        boolean hasPropertyEntry​(Name propName)
        Determines if there is a property entry with the specified Name.
        Parameters:
        propName - Name object specifying a property name
        Returns:
        true if there is a property entry with the specified Name.
      • getPropertyEntry

        PropertyEntry getPropertyEntry​(Name propName)
                                throws RepositoryException
        Returns the valid PropertyEntry with the specified name or null if no matching entry exists.
        Parameters:
        propName - Name object specifying a property name.
        Returns:
        The PropertyEntry with the specified name or null if no matching entry exists.
        Throws:
        RepositoryException - If an unexpected error occurs.
      • getPropertyEntry

        PropertyEntry getPropertyEntry​(Name propName,
                                       boolean loadIfNotFound)
                                throws RepositoryException
        Returns the valid 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.
        Parameters:
        propName - Name object specifying a property name.
        loadIfNotFound -
        Returns:
        The PropertyEntry with the specified name or null if no matching entry exists.
        Throws:
        RepositoryException - If an unexpected error occurs.
      • getPropertyEntries

        Iterator<PropertyEntry> getPropertyEntries()
        Returns an unmodifiable Iterator over those children that represent valid PropertyEntries.
        Returns:
        an unmodifiable Iterator over those children that represent valid PropertyEntries.
      • orderBefore

        void orderBefore​(NodeEntry beforeEntry)
                  throws RepositoryException
        Reorders this NodeEntry before the sibling entry specified by the given beforeEntry.
        Parameters:
        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.
        Throws:
        RepositoryException - If an unexpected error occurs.
      • move

        NodeEntry move​(Name newName,
                       NodeEntry newParent,
                       boolean transientMove)
                throws RepositoryException
        Moves this 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.
        Parameters:
        newName -
        newParent -
        Returns:
        the moved entry
        Throws:
        RepositoryException - If the entry to be moved is not a child of this NodeEntry or if an unexpected error occurs.
      • isTransientlyMoved

        boolean isTransientlyMoved()
        Returns:
        true if this NodeEntry is transiently moved.
      • refresh

        void refresh​(Event childEvent)
        The parent entry of a external event gets informed about the modification. Note, that Event.getParentId() of the given childEvent must point to this NodeEntry.
        Parameters:
        childEvent -