Class DumpToFilePentahoSystemListener
- java.lang.Object
-
- org.pentaho.platform.repository2.unified.jcr.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:
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DumpToFilePentahoSystemListener.DumpToFileTraversingItemVisitor
-
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 DumpToFilePentahoSystemListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.pentaho.platform.api.engine.IPentahoSession
createRepositoryAdminPentahoSession(String repositoryAdminUsername)
String
getFileName()
void
setFileName(String fileName)
void
shutdown()
boolean
startup(org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
-
-
-
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
-
-
Method Detail
-
startup
public boolean startup(org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
- Specified by:
startup
in interfaceorg.pentaho.platform.api.engine.IPentahoSystemListener
-
createRepositoryAdminPentahoSession
protected org.pentaho.platform.api.engine.IPentahoSession createRepositoryAdminPentahoSession(String repositoryAdminUsername)
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceorg.pentaho.platform.api.engine.IPentahoSystemListener
-
getFileName
public String getFileName()
-
setFileName
public void setFileName(String fileName)
-
-