it.eng.spagobi.tools.importexport.transformers
Class TransformersUtilities

java.lang.Object
  extended by it.eng.spagobi.tools.importexport.transformers.TransformersUtilities

public class TransformersUtilities
extends java.lang.Object


Constructor Summary
TransformersUtilities()
           
 
Method Summary
static void compressFolder(java.lang.String pathExportFolder, java.lang.String pathFolder, java.util.zip.ZipOutputStream out)
          Compress contents of a folder into an output stream.
static byte[] createExportArchive(java.lang.String pathExportFolder, java.lang.String nameExportFile)
          Creates the compress export file.
static void decompressArchive(java.lang.String pathImpTmpFold, java.lang.String archiveName, byte[] archiveCont)
          Decompress archive.
static java.sql.Connection getConnectionToDatabase(java.lang.String pathImpTmpFolder, java.lang.String archiveName)
          Gets the connection to database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformersUtilities

public TransformersUtilities()
Method Detail

getConnectionToDatabase

public static java.sql.Connection getConnectionToDatabase(java.lang.String pathImpTmpFolder,
                                                          java.lang.String archiveName)
Gets the connection to database.

Parameters:
pathImpTmpFolder - the path imp tmp folder
archiveName - the archive name
Returns:
the connection to database

compressFolder

public static void compressFolder(java.lang.String pathExportFolder,
                                  java.lang.String pathFolder,
                                  java.util.zip.ZipOutputStream out)
                           throws it.eng.spago.error.EMFUserError
Compress contents of a folder into an output stream.

Parameters:
pathFolder - The path of the folder to compress
out - The Compress output stream
pathExportFolder - the path export folder
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

decompressArchive

public static void decompressArchive(java.lang.String pathImpTmpFold,
                                     java.lang.String archiveName,
                                     byte[] archiveCont)
                              throws java.lang.Exception
Decompress archive.

Parameters:
pathImpTmpFold - the path imp tmp fold
archiveName - the archive name
archiveCont - the archive cont
Throws:
java.lang.Exception - the exception

createExportArchive

public static byte[] createExportArchive(java.lang.String pathExportFolder,
                                         java.lang.String nameExportFile)
                                  throws it.eng.spago.error.EMFUserError
Creates the compress export file.

Parameters:
pathExportFolder - the path export folder
nameExportFile - the name export file
Returns:
The path of the exported compress file
Throws:
it.eng.spago.error.EMFUserError - the EMF user error