Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4314

Improve support rendering versioned documents

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.6.0
    • None
    • None

    Description

      1. Check whether the hippo:handle is of nodetype hippo:versionInfo,if not, go to original flow.
      2. It checks the handle node whether the requested label has been present for the document. If not, go to original flow, if it is was, go to 3
      3. Check whether the document variant has property that matches the label L1. If it matches, go to original flow (variant is correct one). If not, got to 4
      4. If there is a property on the hippo:handle pointing to the version history node, fetch this node by the HST preview or live user, and check the version labels below that node, and find whether the right version label is present. If it isn’t present, return original flow, otherwise go to 5 with the FrozenNode we found. Unfortunately we cannot use javax.jcr.version.VersionHistory and for example javax.jcr.version.VersionHistory#hasVersionLabel(java.lang.String) because the liveuser cannot access the version history. This does mean we inspect version history nodes ourselves in HST and implement #hasVersionLabel ourselves instead of using the JCR spec. This is unfortunate but preferable above using a previewuser session in live requests.
      5. Return a proxy around the FrozenNode making it
        • A HippoNode instance (frozen nodes from Repository are not decorated)
        • A node behaving as-if it was located in the workspace
      6. Return a HippoBean object for the proxy node returned from 6

      Note that above step 1, 2 and 3 are essential performance optimizations: We do not want to check version history for every document if, say, the Christmas Campaign is running: It doesn’t make sense to do that for, say, 10.000 of old news articles.

      Note for this issue also integration tests that really mimic an HST request with liveuser and one for previewuser must be added

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: