public class ACPExportPackageHandler extends Object implements ExportPackageHandler
Modifier and Type | Field and Description |
---|---|
static String |
ACP_EXTENSION
ACP File Extension
|
protected File |
contentDir |
protected File |
dataFile |
protected boolean |
exportAsFolders |
protected int |
iFileCnt |
protected org.alfresco.service.cmr.repository.MimetypeService |
mimetypeService |
protected org.alfresco.service.cmr.repository.NodeService |
nodeService |
protected OutputStream |
outputStream |
protected File |
tempDataFile |
protected OutputStream |
tempDataFileStream |
protected org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream |
zipStream |
Constructor and Description |
---|
ACPExportPackageHandler(File destDir,
File zipFile,
File dataFile,
File contentDir,
boolean overwrite,
org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Construct
|
ACPExportPackageHandler(OutputStream outputStream,
File dataFile,
File contentDir,
org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Construct
|
Modifier and Type | Method and Description |
---|---|
OutputStream |
createDataStream()
Create a stream for accepting the package data
|
void |
endExport()
End the Export
|
org.alfresco.service.cmr.repository.ContentData |
exportContent(InputStream content,
org.alfresco.service.cmr.repository.ContentData contentData)
Call-back for handling the export of content stream.
|
protected void |
log(String message)
Log Export Message
|
void |
setExportAsFolders(boolean exportAsFolders)
Export content into folder structure of nodes
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
startExport()
Start the Export
|
public static final String ACP_EXTENSION
protected org.alfresco.service.cmr.repository.MimetypeService mimetypeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
protected OutputStream outputStream
protected File dataFile
protected File contentDir
protected File tempDataFile
protected OutputStream tempDataFileStream
protected org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream zipStream
protected int iFileCnt
protected boolean exportAsFolders
public ACPExportPackageHandler(File destDir, File zipFile, File dataFile, File contentDir, boolean overwrite, org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
destDir
- FilezipFile
- FiledataFile
- FilecontentDir
- Fileoverwrite
- booleanmimetypeService
- MimetypeServicepublic ACPExportPackageHandler(OutputStream outputStream, File dataFile, File contentDir, org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
outputStream
- OutputStreamdataFile
- FilecontentDir
- FilemimetypeService
- MimetypeServicepublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- NodeServicepublic void setExportAsFolders(boolean exportAsFolders)
exportAsFolders
- booleanpublic void startExport()
ExportPackageHandler
startExport
in interface ExportPackageHandler
public OutputStream createDataStream()
ExportPackageHandler
createDataStream
in interface ExportPackageHandler
public org.alfresco.service.cmr.repository.ContentData exportContent(InputStream content, org.alfresco.service.cmr.repository.ContentData contentData)
ExportPackageHandler
exportContent
in interface ExportPackageHandler
content
- content to exportcontentData
- content descriptorpublic void endExport()
ExportPackageHandler
endExport
in interface ExportPackageHandler
protected void log(String message)
message
- message to logCopyright © 2005–2017 Alfresco Software. All rights reserved.