public class FileExportPackageHandler extends Object implements ExportPackageHandler
Modifier and Type | Field and Description |
---|---|
protected File |
absContentDir |
protected File |
absDataFile |
protected OutputStream |
absDataStream |
protected File |
contentDir |
protected org.alfresco.service.cmr.repository.MimetypeService |
mimetypeService |
protected boolean |
overwrite |
Constructor and Description |
---|
FileExportPackageHandler(File destDir,
File dataFile,
File contentDir,
boolean overwrite,
org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Constuct Handler
|
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 |
startExport()
Start the Export
|
protected org.alfresco.service.cmr.repository.MimetypeService mimetypeService
protected File contentDir
protected File absContentDir
protected File absDataFile
protected boolean overwrite
protected OutputStream absDataStream
public FileExportPackageHandler(File destDir, File dataFile, File contentDir, boolean overwrite, org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
destDir
- destination directorydataFile
- filename of data file (relative to destDir)contentDir
- directory for content (relative to destDir)overwrite
- force overwrite of existing package directorymimetypeService
- (optional) mimetype servicepublic 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.