Package org.onehippo.repository.update
Interface NodeUpdateVisitor
- All Known Implementing Classes:
BaseNodeUpdateVisitor
public interface NodeUpdateVisitor
Visitor for updating repository content.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Allows cleanup of resources held by this updater.boolean
Update the given node.void
initialize
(Session session) Allows initialization of this updater.boolean
undoUpdate
(Node node) Revert the given node.
-
Method Details
-
initialize
Allows initialization of this updater. Called before any other method is called.- Parameters:
session
- a JCRSession
with system credentials- Throws:
RepositoryException
- when thrown, the updater will not be run by the framework
-
doUpdate
Update the given node.- Parameters:
node
- theNode
to be updated- Returns:
true
if the node was changed,false
if not- Throws:
RepositoryException
- if an exception occurred while updating the node
-
undoUpdate
Revert the given node. This method is intended to be the reverse of thedoUpdate(javax.jcr.Node)
method. It allows update runs to be reverted in case a problem arises due to the update. The method should throw anUnsupportedOperationException
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 nodeUnsupportedOperationException
- if the method is not implemented
-
destroy
void destroy()Allows cleanup of resources held by this updater. Called after an updater run was completed.
-