Class JcrRepositoryDumpToFile


  • public class JcrRepositoryDumpToFile
    extends Object
    Creates an export of the JCR in various formats.

    To use:

    1. Add the following to the end of systemListeners.xml:
       <bean id="dumpToFilePentahoSystemListener" 
         class="org.pentaho.platform.repository2.unified.jcr.DumpToFilePentahoSystemListener" />
       
    2. 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
    • 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)