Package org.onehippo.repository.update
Class BaseNodeUpdateVisitor
java.lang.Object
org.onehippo.repository.update.BaseNodeUpdateVisitor
- All Implemented Interfaces:
NodeUpdateVisitor
Base
NodeUpdateVisitor
class adding support for logging.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Allows cleanup of resources held by this updater.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.void
initialize
(Session session) Allows initialization of this updater.boolean
Overridable boolean function to indicate if skipped node paths should be logged (default true)nextNode()
Return a following node, when using custom, instead of path or xpath (query) based, node selection/navigation.void
setLogger
(org.slf4j.Logger log) void
setParametersMap
(Map<String, Object> parametersMap) void
setVisitorContext
(NodeUpdateVisitorContext visitorContext) boolean
Overridable boolean function to indicate if node checkout can be skipped (default false)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.onehippo.repository.update.NodeUpdateVisitor
doUpdate, undoUpdate
-
Field Details
-
log
protected org.slf4j.Logger log -
parametersMap
-
visitorContext
-
-
Constructor Details
-
BaseNodeUpdateVisitor
public BaseNodeUpdateVisitor()
-
-
Method Details
-
setLogger
public void setLogger(org.slf4j.Logger log) -
setParametersMap
-
setVisitorContext
-
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
Description copied from interface:NodeUpdateVisitor
Allows initialization of this updater. Called before any other method is called.- Specified by:
initialize
in interfaceNodeUpdateVisitor
- Parameters:
session
- a JCRSession
with system credentials- Throws:
RepositoryException
- when thrown, the updater will not be run by the framework
-
firstNode
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
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 interfaceNodeUpdateVisitor
-