Class DumpToFilePentahoSystemListener

  • All Implemented Interfaces:
    org.pentaho.platform.api.engine.IPentahoSystemListener

    public class DumpToFilePentahoSystemListener
    extends Object
    implements org.pentaho.platform.api.engine.IPentahoSystemListener
    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

      • DumpToFilePentahoSystemListener

        public DumpToFilePentahoSystemListener()
    • Method Detail

      • startup

        public boolean startup​(org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
        Specified by:
        startup in interface org.pentaho.platform.api.engine.IPentahoSystemListener
      • createRepositoryAdminPentahoSession

        protected org.pentaho.platform.api.engine.IPentahoSession createRepositoryAdminPentahoSession​(String repositoryAdminUsername)
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface org.pentaho.platform.api.engine.IPentahoSystemListener
      • getFileName

        public String getFileName()
      • setFileName

        public void setFileName​(String fileName)