Class PersistenceCopier
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.PersistenceCopier
-
public class PersistenceCopier extends Object
Tool for copying item states from one persistence manager to another. Used for backing up or migrating repository content.- Since:
- Apache Jackrabbit 1.6
-
-
Constructor Summary
Constructors Constructor Description PersistenceCopier(PersistenceManager source, PersistenceManager target, DataStore store)
Creates a tool for copying content from one persistence manager to another.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copy(NodeId id)
Recursively copies the identified node and all its descendants.void
excludeNode(NodeId id)
Explicitly exclude the identified node from being copied.
-
-
-
Constructor Detail
-
PersistenceCopier
public PersistenceCopier(PersistenceManager source, PersistenceManager target, DataStore store)
Creates a tool for copying content from one persistence manager to another.- Parameters:
source
- source persistence managertarget
- target persistence managerstore
- target data store
-
-
Method Detail
-
excludeNode
public void excludeNode(NodeId id)
Explicitly exclude the identified node from being copied. Used for excluding virtual nodes like "/jcr:system" from the copy process.- Parameters:
id
- identifier of the node to be excluded
-
copy
public void copy(NodeId id) throws RepositoryException
Recursively copies the identified node and all its descendants. Explicitly excluded nodes and nodes that have already been copied are automatically skipped.- Parameters:
id
- identifier of the node to be copied- Throws:
RepositoryException
- if the copy operation fails
-
-