Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9667

Check the existence of child nodes matching a pattern

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • jackrabbit-api
    • None

    Description

      Next to the existing Node.hasNodes() method of the JCR API a variant of it would be handy:

      JackrabbitNode.hasNodes(Pattern pattern)

      it would allow an application to implement their own understanding of "child nodes" and provide a pattern, which could exclude all child nodes from this calcuation, which are implementation details of Jackrabbit/Oak (e.g. rep:policy nodes, jcr:content nodes). Today it is possible to implement this logic by getting the NodeIterator and filter manually, but getting the NodeIterator can be quite slow when the child node list is large and the backend non-local (e.g. Mongo).

      Also a version of getNodes() should be provided which accepts such a pattern:

      JackrabbitNode.getNodes(Pattern pattern)

       

      (see https://lists.apache.org/thread/blw0y8wdhkpg0trymdo6hfz5g9j3cjsj for the discussion on oak-dev)

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            joerghoh Joerg Hoh

            Dates

              Created:
              Updated:

              Slack

                Issue deployment