Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-11036

[UpdaterEditor] Provide support for custom node selection/navigation

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.2.0, 5.1.1
    • None
    • None
    • Pulsar
    • Platform 173, Platform 174

    Description

      This provides the CMS UI support for REPO-1920 [UpdaterExecutor]

      When a NodeUpdateVisitor script extends the new BaseNodeUpdateVisitor class, it can provide the nodes to visit itself (see REPO-1920).

      The adminstrator Updater Editor panel therefore will be extended to select "Updater" as option for selecting which node to visit, and the default UpdaterTemplate.groovy script will be updated to provide the extra overridable methods when creating a new script:

      package org.hippoecm.frontend.plugins.cms.admin.updater
      
      import org.onehippo.repository.update.BaseNodeUpdateVisitor
      import javax.jcr.Node
      import javax.jcr.RepositoryException
      import javax.jcr.Session
      
      class UpdaterTemplate extends BaseNodeUpdateVisitor {
      
        boolean logSkippedNodePaths() {
          return false // don't log skipped node paths
        }
      
        boolean skipCheckoutNodes() {
          return false // return true for readonly visitors and/or updates unrelated to versioned content
        }
      
        Node firstNode(final Session session) throws RepositoryException {
          return null // implement when using custom node selection/navigation
        }
      
        Node nextNode() throws RepositoryException {
          return null // implement when using custom node selection/navigation
        }
      
        boolean doUpdate(Node node) {
          log.debug "Updating node ${node.path}"
          return false
        }
      
        boolean undoUpdate(Node node) {
          throw new UnsupportedOperationException('Updater does not implement undoUpdate method')
        }
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adouma Ate Douma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: