org.apache.jackrabbit.core.persistence
Class PersistenceCopier

java.lang.Object
  extended by 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
PersistenceCopier(PersistenceManager source, PersistenceManager target, DataStore store)
          Creates a tool for copying content from one persistence manager to another.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.