public class BusinessArchiveFactory extends Object
BusinessArchive
from/to file systemConstructor and Description |
---|
BusinessArchiveFactory() |
Modifier and Type | Method and Description |
---|---|
static String |
businessArchiveFolderToFile(File destFile,
String folderPath)
Save the uncompressed business archive folder to a compressed file.
|
protected String |
businessArchiveFolderToFile(File destFile,
String folderPath,
List<BusinessArchiveContribution> contributions) |
static BusinessArchive |
readBusinessArchive(File barOrFolder)
Create a business archive from a valid file or folder
|
protected BusinessArchive |
readBusinessArchive(File barOrFolder,
List<BusinessArchiveContribution> contributions) |
static BusinessArchive |
readBusinessArchive(InputStream inputStream)
Create a business archive from an
InputStream |
protected BusinessArchive |
readBusinessArchive(InputStream inputStream,
List<BusinessArchiveContribution> contributions) |
static void |
writeBusinessArchiveToFile(BusinessArchive businessArchive,
File businessArchiveFile)
Write the
BusinessArchive to the .bar file given in parameter. |
protected void |
writeBusinessArchiveToFile(BusinessArchive businessArchive,
File businessArchiveFile,
List<BusinessArchiveContribution> contributions) |
static void |
writeBusinessArchiveToFolder(BusinessArchive businessArchive,
File folderPath)
Write the
BusinessArchive to the folder given in parameter |
protected void |
writeBusinessArchiveToFolder(BusinessArchive businessArchive,
File folderPath,
List<BusinessArchiveContribution> contributions) |
public static BusinessArchive readBusinessArchive(InputStream inputStream) throws IOException, InvalidBusinessArchiveFormatException
InputStream
inputStream
- IOException
- in case of issue reading/writing on file systemInvalidBusinessArchiveFormatException
- if the input stream does not contains a valid business archivepublic static BusinessArchive readBusinessArchive(File barOrFolder) throws InvalidBusinessArchiveFormatException, IOException
barOrFolder
- the folder or file that contains the business archive to readIOException
- in case of issue reading/writing on file systemInvalidBusinessArchiveFormatException
- if the input stream does not contains a valid business archivepublic static void writeBusinessArchiveToFolder(BusinessArchive businessArchive, File folderPath) throws IOException
BusinessArchive
to the folder given in parameter
the written business archive the uncompressed version of
writeBusinessArchiveToFile(BusinessArchive, File)
businessArchive
- the BusinessArchive
to writefolderPath
- the folder into the business archive must be writtenIOException
public static void writeBusinessArchiveToFile(BusinessArchive businessArchive, File businessArchiveFile) throws IOException
BusinessArchive
to the .bar file given in parameter.
this file can then be read using readBusinessArchive(File)
businessArchive
- the BusinessArchive
to writebusinessArchiveFile
- the folder into the business archive must be writtenIOException
public static String businessArchiveFolderToFile(File destFile, String folderPath) throws IOException
this file can then be read using readBusinessArchive(File)
destFile
- folderPath
- IOException
protected BusinessArchive readBusinessArchive(InputStream inputStream, List<BusinessArchiveContribution> contributions) throws IOException, InvalidBusinessArchiveFormatException
protected BusinessArchive readBusinessArchive(File barOrFolder, List<BusinessArchiveContribution> contributions) throws InvalidBusinessArchiveFormatException, IOException
protected void writeBusinessArchiveToFolder(BusinessArchive businessArchive, File folderPath, List<BusinessArchiveContribution> contributions) throws IOException
IOException
protected void writeBusinessArchiveToFile(BusinessArchive businessArchive, File businessArchiveFile, List<BusinessArchiveContribution> contributions) throws IOException
IOException
protected String businessArchiveFolderToFile(File destFile, String folderPath, List<BusinessArchiveContribution> contributions) throws IOException
IOException
Copyright © 2020 Bonitasoft S.A. All rights reserved.