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,
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(RepositoryFile repositoryFile)
create an entry in the export manifest for this file or folder
|
protected void |
createLocales(RepositoryFile repositoryFile,
String filePath,
boolean isFolder,
OutputStream outputStrean)
for each locale stored in in Jcr create a .locale file with the stored node properties
|
void |
exportDirectory(RepositoryFile repositoryDir,
OutputStream outputStream,
String filePath) |
void |
exportFile(RepositoryFile repositoryFile,
OutputStream outputStream,
String filePath) |
ExportManifest |
getExportManifest() |
protected String |
getFixedZipEntryName(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 IPentahoSession |
getSession() |
protected String |
getZipEntryName(RepositoryFile repositoryFile,
String filePath) |
protected boolean |
isExportCandidate(String path) |
File |
performExport(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, IUnifiedRepository repository, boolean withManifest)
protected IPentahoSession getSession()
public File performExport(RepositoryFile exportRepositoryFile) throws ExportException, IOException
performExport
in class BaseExportProcessor
ExportException
- indicates an error in import processingIOException
public void exportFile(RepositoryFile repositoryFile, OutputStream outputStream, String filePath) throws ExportException, IOException
exportFile
in class BaseExportProcessor
repositoryFile
- outputStream
- ExportManifestFormatException
ExportException
IOException
protected void addToManifest(RepositoryFile repositoryFile) throws ExportException
repositoryFile
- ExportException
public void exportDirectory(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(RepositoryFile repositoryFile, String filePath)
repositoryFile
- filePath
- protected String getZipEntryName(RepositoryFile repositoryFile, String filePath)
protected void createLocales(RepositoryFile repositoryFile, String filePath, boolean isFolder, OutputStream outputStrean) throws IOException
zos
- repositoryFile
- filePath
- IOException
public List<String> getLocaleExportList()
public ExportManifest getExportManifest()
public void setExportManifest(ExportManifest exportManifest)
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.