Class JcrRepositoryDumpToFile
- java.lang.Object
-
- org.pentaho.platform.repository2.unified.jcr.JcrRepositoryDumpToFile
-
public class JcrRepositoryDumpToFile extends Object
Creates an export of the JCR in various formats.To use:
- Add the following to the end of
systemListeners.xml
:<bean id="dumpToFilePentahoSystemListener" class="org.pentaho.platform.repository2.unified.jcr.DumpToFilePentahoSystemListener" />
- Add one of the following system properties on the command line:
-Dpentaho.repository.dumpToFile=/tmp/repodump
or-Dpentaho.repository.dumpToFile.systemView=/tmp/repodump
or-Dpentaho.repository.dumpToFile.documentView=/tmp/repodump
Uses PentahoSystem instead of Spring injection since its collaborators are not yet instantiated when this class is instantiated.
- Author:
- mlowery
- Add the following to the end of
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JcrRepositoryDumpToFile.DumpToFileTraversingItemVisitor
static class
JcrRepositoryDumpToFile.Mode
-
Field Summary
Fields Modifier and Type Field Description static String
PROP_DUMP_TO_FILE
Exports the repository using a custom TraversingItemVisitor.static String
PROP_DUMP_TO_FILE_DOCUMENT_VIEW
Exports the repository using Document View.static String
PROP_DUMP_TO_FILE_SYSTEM_VIEW
Exports the repository using System View.
-
Constructor Summary
Constructors Constructor Description JcrRepositoryDumpToFile(org.springframework.extensions.jcr.JcrTemplate jcrTemplate, org.springframework.transaction.support.TransactionTemplate txnTemplate, String repositoryAdminUsername, String filename, JcrRepositoryDumpToFile.Mode mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.pentaho.platform.api.engine.IPentahoSession
createRepositoryAdminPentahoSession(String repositoryAdminUsername)
void
execute()
-
-
-
Field Detail
-
PROP_DUMP_TO_FILE
public static final String PROP_DUMP_TO_FILE
Exports the repository using a custom TraversingItemVisitor. (It is human-readable output that is not meant to be parsed.)- See Also:
- Constant Field Values
-
PROP_DUMP_TO_FILE_SYSTEM_VIEW
public static final String PROP_DUMP_TO_FILE_SYSTEM_VIEW
Exports the repository using System View.- See Also:
- Constant Field Values
-
PROP_DUMP_TO_FILE_DOCUMENT_VIEW
public static final String PROP_DUMP_TO_FILE_DOCUMENT_VIEW
Exports the repository using Document View.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JcrRepositoryDumpToFile
public JcrRepositoryDumpToFile(org.springframework.extensions.jcr.JcrTemplate jcrTemplate, org.springframework.transaction.support.TransactionTemplate txnTemplate, String repositoryAdminUsername, String filename, JcrRepositoryDumpToFile.Mode mode)
-
-
Method Detail
-
execute
public void execute()
-
createRepositoryAdminPentahoSession
protected org.pentaho.platform.api.engine.IPentahoSession createRepositoryAdminPentahoSession(String repositoryAdminUsername)
-
-