Class BaseNodeUpdateVisitor

java.lang.Object
org.onehippo.repository.update.BaseNodeUpdateVisitor
All Implemented Interfaces:
NodeUpdateVisitor

public abstract class BaseNodeUpdateVisitor extends Object implements NodeUpdateVisitor
Base NodeUpdateVisitor class adding support for logging.
  • Field Details

  • Constructor Details

    • BaseNodeUpdateVisitor

      public BaseNodeUpdateVisitor()
  • Method Details

    • setLogger

      public void setLogger(org.slf4j.Logger log)
    • setParametersMap

      public void setParametersMap(Map<String,Object> parametersMap)
    • setVisitorContext

      public void setVisitorContext(NodeUpdateVisitorContext visitorContext)
    • logSkippedNodePaths

      public boolean logSkippedNodePaths()
      Overridable boolean function to indicate if skipped node paths should be logged (default true)
      Returns:
      true if skipped node paths should be logged
    • skipCheckoutNodes

      public boolean skipCheckoutNodes()
      Overridable boolean function to indicate if node checkout can be skipped (default false)
      Returns:
      true if node checkout can be skipped (e.g. for readonly visitors and/or updates unrelated to versioned content)
    • initialize

      public void initialize(Session session) throws RepositoryException
      Description copied from interface: NodeUpdateVisitor
      Allows initialization of this updater. Called before any other method is called.
      Specified by:
      initialize in interface NodeUpdateVisitor
      Parameters:
      session - a JCR Session with system credentials
      Throws:
      RepositoryException - when thrown, the updater will not be run by the framework
    • firstNode

      public Node firstNode(Session session) throws RepositoryException
      Initiates the retrieval of the nodes when using custom, instead of path or xpath (query) based, node selection/navigation, returning the first node to visit. Intended to be overridden, default implementation returns null.
      Parameters:
      session -
      Returns:
      first node to visit, or null if none found
      Throws:
      RepositoryException
    • nextNode

      public Node nextNode() throws RepositoryException
      Return a following node, when using custom, instead of path or xpath (query) based, node selection/navigation. Intended to be overridden, default implementation returns null.
      Returns:
      next node to visit, or null if none left
      Throws:
      RepositoryException
    • destroy

      public void destroy()
      Description copied from interface: NodeUpdateVisitor
      Allows cleanup of resources held by this updater. Called after an updater run was completed.
      Specified by:
      destroy in interface NodeUpdateVisitor