org.alfresco.repo.importer
Class AVMZipImporter

java.lang.Object
  extended by org.alfresco.repo.importer.AVMZipImporter
All Implemented Interfaces:
AVMImporter

public class AVMZipImporter
extends java.lang.Object
implements AVMImporter

Importer which allows the loading of part of an AVM filesystem from a Zip file, typically called at boostrap time.


Constructor Summary
AVMZipImporter()
           
 
Method Summary
protected  void ensureDirectory(AVMStoreDescriptor store, java.lang.String name)
          Recursively creates directories in AVM as required
 void importNode(java.io.InputStream input, AVMNodeDescriptor node)
          Imports the given AVM node from the source data.
 void importNode(java.io.InputStream input, java.lang.String path)
          Imports the given path and version from the source data.
 void importNodes(org.apache.tools.zip.ZipFile zip, AVMStoreDescriptor avmStore, java.lang.String storePath)
          Imports all the entries in the Zip File into the AVM store.
 void importNodes(org.apache.tools.zip.ZipFile zip, java.lang.String storePath)
          Imports all the entries in the Zip File into the AVM store.
 void setAvmService(AVMService avmService)
          Sets the AVM Service to be used for importing to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVMZipImporter

public AVMZipImporter()
Method Detail

setAvmService

public void setAvmService(AVMService avmService)
Sets the AVM Service to be used for importing to

Parameters:
avmService - The AVM Service

importNodes

public void importNodes(org.apache.tools.zip.ZipFile zip,
                        java.lang.String storePath)
                 throws java.io.IOException,
                        java.util.zip.ZipException
Imports all the entries in the Zip File into the AVM store.

Parameters:
storePath - The full store path, eg stores:/alfresco/foo/
Throws:
java.io.IOException
java.util.zip.ZipException

importNodes

public void importNodes(org.apache.tools.zip.ZipFile zip,
                        AVMStoreDescriptor avmStore,
                        java.lang.String storePath)
                 throws java.io.IOException,
                        java.util.zip.ZipException
Imports all the entries in the Zip File into the AVM store.

Parameters:
avmStore - The AVM Store to import into
storePath - Where in the AVM store to unpack into
Throws:
java.io.IOException
java.util.zip.ZipException

ensureDirectory

protected void ensureDirectory(AVMStoreDescriptor store,
                               java.lang.String name)
Recursively creates directories in AVM as required


importNode

public void importNode(java.io.InputStream input,
                       java.lang.String path)
                throws java.io.IOException
Imports the given path and version from the source data.

Specified by:
importNode in interface AVMImporter
Parameters:
input - The stream to read from
path - The AVM path to import
Throws:
java.io.IOException

importNode

public void importNode(java.io.InputStream input,
                       AVMNodeDescriptor node)
                throws java.io.IOException
Imports the given AVM node from the source data.

Specified by:
importNode in interface AVMImporter
Parameters:
input - The stream to read from
node - The AVM node to import
Throws:
java.io.IOException


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