public interface InstallPackageProviderServices extends ProviderServices
Modifier and Type | Method and Description |
---|---|
void |
compressPackage(java.io.File folder,
java.io.OutputStream os)
Compress a plugin folder using the plugin's name as a package.
|
void |
compressPackageIndex(java.io.File folder,
java.io.OutputStream os)
Compress a plugin folder using the plugin's name as a package, only with
the files needed by the package index.
|
void |
compressPackageSet(java.io.File folder,
java.lang.String fileName,
java.io.OutputStream os)
Compress a folder as a zipped package set in the given outputstream with
a concrete name.
|
void |
decompress(java.io.InputStream is,
java.io.File outputDirectory)
It decompress an input stream and write it on a directory.
|
java.util.List<java.lang.String> |
getDefaultSelectedPackagesIDs() |
java.util.Properties |
getProperties() |
PackageInfo |
readCompressedPackageInfo(java.io.InputStream is)
It reads a compressed file and retrieve the package information.
|
void |
readPackageInfo(java.io.File directory,
PackageInfo installerInfo)
Reads the package.info file from a directory a fills the the properties
of the
PackageInfo object. |
void |
readPackageInfo(java.io.InputStream is,
java.util.List<PackageInfo> packageInfos,
java.util.Map<PackageInfo,java.lang.String> zipEntriesMap,
java.lang.String name,
SimpleTaskStatus taskStatus)
Reads the package.info file from a bundle fills the the properties of the
PackageInfo objects. |
void |
readPackageSetInfo(java.io.InputStream is,
java.util.List<PackageInfo> packageInfos,
java.util.Map<PackageInfo,java.lang.String> zipEntriesMap,
SimpleTaskStatus taskStatus)
Reads the package.info file from a package set and fills the the
properties of the
PackageInfo objects. |
java.io.InputStream |
searchPackage(java.io.InputStream is,
java.lang.String zipEntry)
It search a package inside an installer file by the zip name and returns
the stream in this position ready to decompres.
|
void |
writePackageInfo(java.io.File directory,
PackageInfo packageInfo)
Writes the package.info file in a concrete directory.
|
void |
writePackageInfoForIndex(java.io.File directory,
PackageInfo packageInfo)
Writes the package.info file in a concrete directory to be used in a
package index.
|
getParameters, getService
void decompress(java.io.InputStream is, java.io.File outputDirectory) throws InstallPackageServiceException
is
- The input stream to decompressoutputDirectory
- . The output directory.InstallPackageServiceException
- If there is a problem decompressing the stream.void compressPackageSet(java.io.File folder, java.lang.String fileName, java.io.OutputStream os) throws MakePluginPackageServiceException
folder
- the folder to compress.fileName
- name of the zip entry that has the output file. The name that
have to haveos
- output stream to write the output.MakePluginPackageServiceException
- if there is any problem compressing.void compressPackage(java.io.File folder, java.io.OutputStream os) throws MakePluginPackageServiceException
folder
- the directory to compress.os
- output stream to write the output.MakePluginPackageServiceException
- if there is any problem compressing.void compressPackageIndex(java.io.File folder, java.io.OutputStream os) throws MakePluginPackageServiceException
folder
- the directory to compress.os
- output stream to write the output.MakePluginPackageServiceException
- if there is any problem compressing.void readPackageInfo(java.io.File directory, PackageInfo installerInfo) throws InstallerInfoFileException
PackageInfo
object.directory
- the root directory that contains the installinfo fileinstallInfo
- the installinfo file that has to be filled.InstallerInfoFileException.
- if there is any problem reading the
fileInstallerInfoFileException
void readPackageSetInfo(java.io.InputStream is, java.util.List<PackageInfo> packageInfos, java.util.Map<PackageInfo,java.lang.String> zipEntriesMap, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
PackageInfo
objects.is
- the input stream of a bundle.packageInfos
- a list of the information of the packages to install.zipEntriesMap
- a map to retrieve the zipEntry for every package. This
information is necessary to select the plugin to decompress.InstallPackageServiceException
- if there is a problem reading the bundle.void readPackageInfo(java.io.InputStream is, java.util.List<PackageInfo> packageInfos, java.util.Map<PackageInfo,java.lang.String> zipEntriesMap, java.lang.String name, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
PackageInfo
objects.is
- the input stream of a bundle.packageInfos
- a list of the information of the packages to install.zipEntriesMap
- a map to retrieve the zipEntry for every package. This
information is necessary to select the plugin to decompress.InstallPackageServiceException
- if there is a problem reading the bundle.void writePackageInfo(java.io.File directory, PackageInfo packageInfo) throws InstallerInfoFileException
directory
- the directory.packageInfo
- the information to write.InstallerInfoFileException
- if there is any problem writing the package.info file.void writePackageInfoForIndex(java.io.File directory, PackageInfo packageInfo) throws InstallerInfoFileException
directory
- the directory.packageInfo
- the information to write.InstallerInfoFileException
- if there is any problem writing the package.info file.java.io.InputStream searchPackage(java.io.InputStream is, java.lang.String zipEntry) throws InstallPackageServiceException
is
- the input stream of a bundle.zipEntry
- the name of the zip entry.InstallPackageServiceException
- if there is a problem reading the streamPackageInfo readCompressedPackageInfo(java.io.InputStream is) throws InstallPackageServiceException
is
- the compressed fileInstallPackageServiceException
- if there is a problem decompressing the file.java.util.List<java.lang.String> getDefaultSelectedPackagesIDs()
java.util.Properties getProperties()