Interface NodeUpdateVisitor

All Known Implementing Classes:
BaseNodeUpdateVisitor

public interface NodeUpdateVisitor
Visitor for updating repository content.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Allows cleanup of resources held by this updater.
    boolean
    doUpdate(Node node)
    Update the given node.
    void
    Allows initialization of this updater.
    boolean
    Revert the given node.
  • Method Details

    • initialize

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

      boolean doUpdate(Node node) throws RepositoryException
      Update the given node.
      Parameters:
      node - the Node to be updated
      Returns:
      true if the node was changed, false if not
      Throws:
      RepositoryException - if an exception occurred while updating the node
    • undoUpdate

      boolean undoUpdate(Node node) throws RepositoryException, UnsupportedOperationException
      Revert the given node. This method is intended to be the reverse of the doUpdate(javax.jcr.Node) method. It allows update runs to be reverted in case a problem arises due to the update. The method should throw an UnsupportedOperationException when it is not implemented.
      Parameters:
      node - the node to be reverted.
      Returns:
      true if the node was changed, false if not
      Throws:
      RepositoryException - if an exception occurred while reverting the node
      UnsupportedOperationException - if the method is not implemented
    • destroy

      void destroy()
      Allows cleanup of resources held by this updater. Called after an updater run was completed.