org.alfresco.repo.importer
Class ACPImportPackageHandler

java.lang.Object
  extended by org.alfresco.repo.importer.ACPImportPackageHandler
All Implemented Interfaces:
ImportPackageHandler

public class ACPImportPackageHandler
extends java.lang.Object
implements ImportPackageHandler

Handler for importing Repository content from zip package file


Field Summary
protected  java.lang.String dataFileEncoding
           
static java.lang.String DEFAULT_ENCODING
           
protected  java.io.File file
           
protected  org.apache.commons.compress.archivers.zip.ZipFile zipFile
           
 
Constructor Summary
ACPImportPackageHandler(java.io.File zipFile, java.lang.String dataFileEncoding)
          Constuct Handler
 
Method Summary
 void endImport()
          End the Import
 java.io.Reader getDataStream()
          Get the package data stream
 java.io.InputStream importStream(java.lang.String content)
          Call-back for handling the import of content stream.
protected  void log(java.lang.String message)
          Log Import Message
 void startImport()
          Start the Import
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values

file

protected java.io.File file

zipFile

protected org.apache.commons.compress.archivers.zip.ZipFile zipFile

dataFileEncoding

protected java.lang.String dataFileEncoding
Constructor Detail

ACPImportPackageHandler

public ACPImportPackageHandler(java.io.File zipFile,
                               java.lang.String dataFileEncoding)
Constuct Handler

Parameters:
sourceDir - source directory
packageDir - relative directory within source to place exported content
Method Detail

startImport

public void startImport()
Description copied from interface: ImportPackageHandler
Start the Import

Specified by:
startImport in interface ImportPackageHandler

getDataStream

public java.io.Reader getDataStream()
Description copied from interface: ImportPackageHandler
Get the package data stream

Specified by:
getDataStream in interface ImportPackageHandler
Returns:
the reader

importStream

public java.io.InputStream importStream(java.lang.String content)
Description copied from interface: ImportPackageHandler
Call-back for handling the import of content stream.

Specified by:
importStream in interface ImportPackageHandler
Parameters:
content - content descriptor
Returns:
the input stream onto the content

endImport

public void endImport()
Description copied from interface: ImportPackageHandler
End the Import

Specified by:
endImport in interface ImportPackageHandler

log

protected void log(java.lang.String message)
Log Import Message

Parameters:
message - message to log


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.