Interface TreeManager

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean getAutoSave()
      Whether to automatically save changes of the current session occurring from adding/removing nodes and properties.
      java.util.Set<java.lang.String> getIgnoredProperties()
      Properties to ignore.
      java.util.Comparator<java.lang.String> getOrder()
      Comparator used for establishing the order of the keys in the sequence.
      Node getRoot()  
      boolean isLeaf​(Node node)
      Determines whether the given node is a leaf.
      boolean isRoot​(Node node)
      Determined whether the given node is the root node of the JCR sub-tree.
      void join​(ItemSequence itemSequence, Node node, Node cause)
      After the node cause has been deleted from the sequence itemSequence, the implementation of this method may decide to join the parent node of cause with some other nodes.
      void join​(ItemSequence itemSequence, Node node, Property cause)
      After the property cause has been deleted from the sequence itemSequence, the implementation of this method may decide to join the parent node of cause with some other nodes.
      void split​(ItemSequence itemSequence, Node node, Node cause)
      After the node cause has been inserted into the sequence itemSequence, the implementation of this method may decide to split the parent node of cause into two or more new nodes.
      void split​(ItemSequence itemSequence, Node node, Property cause)
      After the property cause has been inserted into the sequence itemSequence, the implementation of this method may decide to split the parent node of cause into two or more new nodes.
    • Method Detail

      • getRoot

        Node getRoot()
        Returns:
        the root node of the JCR sub-tree where the items of the sequence are be mapped to.
      • isRoot

        boolean isRoot​(Node node)
                throws RepositoryException
        Determined whether the given node is the root node of the JCR sub-tree.
        Parameters:
        node - Node to test for root
        Returns:
        getRoot().isSame(node).
        Throws:
        RepositoryException
      • isLeaf

        boolean isLeaf​(Node node)
                throws RepositoryException
        Determines whether the given node is a leaf. Leaf nodes are the nodes which are actually part of a NodeSequence or the parents of the properties of a PropertySequence.
        Parameters:
        node - Node to test for leaf
        Returns:
        true if node is a leaf node, false otherwise.
        Throws:
        RepositoryException
      • getIgnoredProperties

        java.util.Set<java.lang.String> getIgnoredProperties()
        Properties to ignore.
        Returns:
      • getOrder

        java.util.Comparator<java.lang.String> getOrder()
        Comparator used for establishing the order of the keys in the sequence.
        Returns:
        a Comparator<String> instance
      • split

        void split​(ItemSequence itemSequence,
                   Node node,
                   Node cause)
            throws RepositoryException
        After the node cause has been inserted into the sequence itemSequence, the implementation of this method may decide to split the parent node of cause into two or more new nodes. Splitting must be done such that the overall order of the keys in this sequence obeys the order given by getOrder() as much as possible.
        Parameters:
        itemSequence - the ItemSequence where the new node cause has been inserted.
        node - the parent node of the newly inserted node
        cause - the newly inserted node or null if not known.
        Throws:
        RepositoryException
      • split

        void split​(ItemSequence itemSequence,
                   Node node,
                   Property cause)
            throws RepositoryException
        After the property cause has been inserted into the sequence itemSequence, the implementation of this method may decide to split the parent node of cause into two or more new nodes. Splitting must be done such that the overall order of the keys in this sequence obeys the order given by getOrder() as much as possible.
        Parameters:
        itemSequence - the ItemSequence where the new property cause has been inserted.
        node - the parent node of the newly inserted property
        cause - the newly inserted property or null if not known.
        Throws:
        RepositoryException
      • join

        void join​(ItemSequence itemSequence,
                  Node node,
                  Node cause)
           throws RepositoryException
        After the node cause has been deleted from the sequence itemSequence, the implementation of this method may decide to join the parent node of cause with some other nodes. Joining must be done such that the overall order of the keys in this sequence obeys the order given by getOrder() as much as possible.
        Parameters:
        itemSequence - the ItemSequence where the node cause has been deleted from.
        node - the parent node from which cause has been deleted.
        cause - the deleted node or null if not known. Note: cause might be stale.
        Throws:
        RepositoryException
      • join

        void join​(ItemSequence itemSequence,
                  Node node,
                  Property cause)
           throws RepositoryException
        After the property cause has been deleted from the sequence itemSequence, the implementation of this method may decide to join the parent node of cause with some other nodes. Joining must be done such that the overall order of the keys in this sequence obeys the order given by getOrder() as much as possible.
        Parameters:
        itemSequence - the ItemSequence where the property cause has been deleted from.
        node - the parent node from which cause has been deleted.
        cause - the deleted property or null if not known. Note: cause might be stale.
        Throws:
        RepositoryException
      • getAutoSave

        boolean getAutoSave()
        Whether to automatically save changes of the current session occurring from adding/removing nodes and properties.
        Returns:
        true if changes should be automatically saved, false otherwiese.