Class BaseExportProcessor
- java.lang.Object
-
- org.pentaho.platform.plugin.services.importexport.BaseExportProcessor
-
- Direct Known Subclasses:
SimpleExportProcessor
,ZipExportProcessor
public abstract class BaseExportProcessor extends Object
A BaseExportProcessor subclass should encapsulate all logic for creating and assembling export file. It should also handle the desired output format. Examples: SimpleExportProcessor - Export single file "as-is" ZipExportProcessor - Export single file or directory as .zip
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
EXPORT_INFO_DATE_FORMAT
protected static String
EXPORT_INFO_TIME_FORMAT
protected static String
EXPORT_MANIFEST_FILENAME
protected static String
EXPORT_TEMP_FILENAME_EXT
protected static String
EXPORT_TEMP_FILENAME_PREFIX
protected static String
LOCALE_EXT
-
Constructor Summary
Constructors Constructor Description BaseExportProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addExportHandler(ExportHandler exportHandler)
Adds anExportHandler
to the end of the list of Export Handlers.abstract void
exportDirectory(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryDir, OutputStream outputStream, String filePath)
abstract void
exportFile(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile, OutputStream outputStream, String filePath)
String
getPath()
org.pentaho.platform.api.repository2.unified.IUnifiedRepository
getUnifiedRepository()
abstract File
performExport(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile)
Performs the export process, returns a zip File objectvoid
setPath(String path)
void
setUnifiedRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository unifiedRepository)
-
-
-
Field Detail
-
EXPORT_MANIFEST_FILENAME
protected static final String EXPORT_MANIFEST_FILENAME
- See Also:
- Constant Field Values
-
EXPORT_INFO_DATE_FORMAT
protected static final String EXPORT_INFO_DATE_FORMAT
- See Also:
- Constant Field Values
-
EXPORT_INFO_TIME_FORMAT
protected static final String EXPORT_INFO_TIME_FORMAT
- See Also:
- Constant Field Values
-
EXPORT_TEMP_FILENAME_PREFIX
protected static final String EXPORT_TEMP_FILENAME_PREFIX
- See Also:
- Constant Field Values
-
EXPORT_TEMP_FILENAME_EXT
protected static final String EXPORT_TEMP_FILENAME_EXT
- See Also:
- Constant Field Values
-
LOCALE_EXT
protected static final String LOCALE_EXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
addExportHandler
public void addExportHandler(ExportHandler exportHandler)
Adds anExportHandler
to the end of the list of Export Handlers. The first ExportHandler added will be the first to get a chance to process the data- Parameters:
exportHandler
-
-
getPath
public String getPath()
- Returns:
-
setPath
public void setPath(String path)
- Parameters:
path
-
-
getUnifiedRepository
public org.pentaho.platform.api.repository2.unified.IUnifiedRepository getUnifiedRepository()
- Returns:
-
setUnifiedRepository
public void setUnifiedRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository unifiedRepository)
- Parameters:
unifiedRepository
-
-
performExport
public abstract File performExport(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile) throws ExportException, IOException
Performs the export process, returns a zip File object- Throws:
ExportException
- indicates an error in import processingIOException
-
exportDirectory
public abstract void exportDirectory(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryDir, OutputStream outputStream, String filePath) throws ExportException, IOException
- Parameters:
repositoryDir
-outputStream
-- Throws:
ExportException
IOException
-
exportFile
public abstract void exportFile(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile, OutputStream outputStream, String filePath) throws ExportException, IOException
- Parameters:
repositoryFile
-outputStream
-- Throws:
ExportException
IOException
-
-