public class ZipExportProcessor extends BaseExportProcessor
Modifier and Type | Field and Description |
---|---|
protected ExportManifest |
exportManifest |
protected List<String> |
localeExportList |
protected String |
path |
protected boolean |
withManifest |
EXPORT_INFO_DATE_FORMAT, EXPORT_INFO_TIME_FORMAT, EXPORT_MANIFEST_FILENAME, EXPORT_TEMP_FILENAME_EXT, EXPORT_TEMP_FILENAME_PREFIX, LOCALE_EXT
Constructor and Description |
---|
ZipExportProcessor(String path,
org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository,
boolean withManifest)
Encapsulates the logic of registering import handlers, generating the manifest, and performing the export
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToManifest(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile)
create an entry in the export manifest for this file or folder
|
protected void |
createLocales(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile,
String filePath,
boolean isFolder,
OutputStream outputStream)
for each locale stored in in Jcr create a .locale file with the stored node properties
|
void |
exportDirectory(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryDir,
OutputStream outputStream,
String filePath) |
void |
exportFile(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile,
OutputStream outputStream,
String filePath) |
ExportManifest |
getExportManifest() |
protected String |
getFixedZipEntryName(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile,
String filePath)
Take repository file path and local file path and return computed zip entry path
|
List<String> |
getLocaleExportList()
get the list of files we are interested in supporting locale from Spring
|
protected org.pentaho.platform.api.engine.IPentahoSession |
getSession() |
protected String |
getZipEntryName(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile,
String filePath) |
protected boolean |
isExportCandidate(String path) |
File |
performExport(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile)
Performs the export process, returns a zip File object
|
void |
setExportManifest(ExportManifest exportManifest) |
void |
setLocaleExportList(List<String> localeExportList) |
addExportHandler, getPath, getUnifiedRepository, setPath, setUnifiedRepository
protected String path
protected ExportManifest exportManifest
protected boolean withManifest
public ZipExportProcessor(String path, org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository, boolean withManifest)
protected org.pentaho.platform.api.engine.IPentahoSession getSession()
public File performExport(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile) throws ExportException, IOException
performExport
in class BaseExportProcessor
ExportException
- indicates an error in import processingIOException
public void exportFile(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile, OutputStream outputStream, String filePath) throws ExportException, IOException
exportFile
in class BaseExportProcessor
repositoryFile
- outputStream
- filePath
- ExportManifestFormatException
ExportException
IOException
protected void addToManifest(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile) throws ExportException
repositoryFile
- ExportException
public void exportDirectory(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryDir, OutputStream outputStream, String filePath) throws ExportException, IOException
exportDirectory
in class BaseExportProcessor
repositoryDir
- outputStream
- ExportException
IOException
protected boolean isExportCandidate(String path)
protected String getFixedZipEntryName(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile, String filePath)
repositoryFile
- filePath
- protected String getZipEntryName(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile, String filePath)
protected void createLocales(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile, String filePath, boolean isFolder, OutputStream outputStream) throws IOException
repositoryFile
- filePath
- isFolder
- outputStream
- IOException
public List<String> getLocaleExportList()
public ExportManifest getExportManifest()
public void setExportManifest(ExportManifest exportManifest)
Copyright © 2019 Hitachi Vantara. All rights reserved.