Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18449

Add API to get all descendants of a page, based on the reference hierarchy

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 12.10.4
    • Fix Version/s: None
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Currently there is an API called getChildren() and getChildrenReferences() in com.xpn.xwiki.api.Document , and they both fetch children of the document based on the old parent child relation (not on the page references, the "nested spaces" hierarchy) - see more here https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/ContentOrganization/NestedPagesMigration/#HHistory .

      There should be an API, probably in com.xpn.xwiki.api.Document as well, allowing to fetch descendants of a page based on the hierarchy, potentially with various parameters / configuration: only direct children, all descendants, etc.

      The only alternative today is making a query in the database, after having understood the database model of XWiki.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response: