Interface NodeUpdateVisitor

  • All Known Implementing Classes:
    BaseNodeUpdateVisitor

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void destroy()
      Allows cleanup of resources held by this updater.
      boolean doUpdate​(javax.jcr.Node node)
      Update the given node.
      void initialize​(javax.jcr.Session session)
      Allows initialization of this updater.
      boolean undoUpdate​(javax.jcr.Node node)
      Revert the given node.
    • Method Detail

      • initialize

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

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

        boolean undoUpdate​(javax.jcr.Node node)
                    throws javax.jcr.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:
        javax.jcr.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.