Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fujitsu.iflow.common.wfapp
Class JarArchiveStrategy

    java.lang.Object
      com.fujitsu.iflow.common.wfapp.JarArchiveStrategy

All Implemented Interfaces:
  ArchiveStrategy

public class JarArchiveStrategy
extends java.lang.Object
implements ArchiveStrategy

JarArchiveStrategy is a Jar archiving utility class

Constructor Summary
`JarArchiveStrategy()`

Method Summary
`void` | `exportFiles(java.io.File archiveFile, java.util.Hashtable mappingTable)` This method exports files from the archive file
`java.lang.String` | `getFileSuffix()` This method return the file suffix handled by this strategy
`java.io.InputStream` | `getInputStream(java.io.File archiveFile, java.lang.String filePath)` This method returns the input stream of the specified file
`java.util.Hashtable` | `importFiles(java.io.File archiveFile, java.lang.String[] filePaths, java.util.Hashtable mappingTable)` This method imports files into the jar file
`void` | `packageIntoArchive(java.lang.String packageDir, java.io.File archiveFile)` This method packages the specified package directory into a jar file
`void` | `unpackage(java.io.File archiveFile, java.lang.String packageDir)` This method unpackages a jar file into the specified package directory
`void` | `updateFile(java.io.File archiveFile, java.io.InputStream inputStream, java.lang.String filePath)` This method updates the specified file with the input stream

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JarArchiveStrategy

    public JarArchiveStrategy()

Method Detail

### getFileSuffix

    public java.lang.String getFileSuffix()

  This method return the file suffix handled by this strategy

  Specified by:
    `getFileSuffix` in interface `ArchiveStrategy`
  Returns:
    the file suffix

### packageIntoArchive

    public void packageIntoArchive(java.lang.String packageDir,
                                   java.io.File archiveFile)
                            throws IflowException

  This method packages the specified package directory into a jar file

  Specified by:
    `packageIntoArchive` in interface `ArchiveStrategy`
  Parameters:
    `packageDir` - the package directory
    `archiveFile` - the archive jar file
  Throws:
    `IflowException` - This exception returns the archiving errors

### unpackage

    public void unpackage(java.io.File archiveFile,
                          java.lang.String packageDir)
                   throws IflowException

  This method unpackages a jar file into the specified package directory

  Specified by:
    `unpackage` in interface `ArchiveStrategy`
  Parameters:
    `archiveFile` - the archive jar file
    `packageDir` - the package directory
  Throws:
    `IflowException` - This exception returns the archiving errors

### importFiles

    public java.util.Hashtable importFiles(java.io.File archiveFile,
                                           java.lang.String[] filePaths,
                                           java.util.Hashtable mappingTable)
                                    throws IflowException

  This method imports files into the jar file

  Specified by:
    `importFiles` in interface `ArchiveStrategy`
  Parameters:
    `archiveFile` - archive jar file
    `filePaths` - files that will be sent into package
    `mappingTable` - the mapping between real folders and archived folder
  Returns:
    the hashtable that map real file paths into archived file paths
  Throws:
    `IflowException` - This exception returns the archiving errors

### exportFiles

    public void exportFiles(java.io.File archiveFile,
                            java.util.Hashtable mappingTable)
                     throws IflowException

  This method exports files from the archive file

  Specified by:
    `exportFiles` in interface `ArchiveStrategy`
  Parameters:
    `archiveFile` - archive file
    `mappingTable` - the mapping between real folders and archived folders
  Throws:
    `IflowException` - This exception returns the archiving errors

### getInputStream

    public java.io.InputStream getInputStream(java.io.File archiveFile,
                                              java.lang.String filePath)
                                       throws IflowException

  This method returns the input stream of the specified file

  Specified by:
    `getInputStream` in interface `ArchiveStrategy`
  Parameters:
    `archiveFile` - archive jar file
    `filePath` - the specified file path
  Returns:
    the input stream
  Throws:
    `IflowException` - This exception returns the archiving errors

### updateFile

    public void updateFile(java.io.File archiveFile,
                           java.io.InputStream inputStream,
                           java.lang.String filePath)
                    throws IflowException

  This method updates the specified file with the input stream

  Specified by:
    `updateFile` in interface `ArchiveStrategy`
  Parameters:
    `archiveFile` - archive file
    `inputStream` - the input stream
    `filePath` - the specified file path
  Throws:
    `IflowException` - This exception returns the archiving errors

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD