Class 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 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 manager
        target - target persistence manager
        store - 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