public class DefaultInstallerProviderServices extends AbstractProviderServices implements InstallPackageProviderServices
Modifier and Type | Class and Description |
---|---|
class |
DefaultInstallerProviderServices.ReadPackageException |
Constructor and Description |
---|
DefaultInstallerProviderServices() |
Modifier and Type | Method and Description |
---|---|
void |
compressPackage(File folder,
OutputStream os)
Compress a plugin folder using the plugin's name as a package.
|
void |
compressPackageIndex(File folder,
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(File folder,
String fileName,
OutputStream os)
Compress a folder as a zipped package set in the given outputstream with
a concrete name.
|
void |
decompress(InputStream is,
File outputDirectory)
It decompress an input stream and write it on a directory.
|
List<String> |
getDefaultSelectedPackagesIDs() |
PackageInfo |
readCompressedPackageInfo(InputStream is)
It reads a compressed file and retrieve the package information.
|
void |
readPackageInfo(File directory,
PackageInfo installerInfo)
Reads the package.info file from a directory a fills the the properties
of the
PackageInfo object. |
void |
readPackageInfo(InputStream is,
List<PackageInfo> installerInfos,
Map<PackageInfo,String> zipEntriesMap,
String name)
Reads the package.info file from a bundle fills the the properties of the
PackageInfo objects. |
void |
readPackageSetInfo(InputStream is,
List<PackageInfo> installerInfos,
Map<PackageInfo,String> zipEntriesMap)
Reads the package.info file from a package set and fills the the
properties of the
PackageInfo objects. |
InputStream |
searchPackage(InputStream is,
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(File directory,
PackageInfo packageInfo)
Writes the package.info file in a concrete directory.
|
void |
writePackageInfoForIndex(File directory,
PackageInfo packageInfo)
Writes the package.info file in a concrete directory to be used in a
package index.
|
getParameters, getService, setService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameters, getService
public void decompress(InputStream is, File outputDirectory) throws InstallPackageServiceException
InstallPackageProviderServices
decompress
in interface InstallPackageProviderServices
is
- The input stream to decompressoutputDirectory
- . The output directory.InstallPackageServiceException
- If there is a problem decompressing the stream.public PackageInfo readCompressedPackageInfo(InputStream is) throws InstallPackageServiceException
InstallPackageProviderServices
readCompressedPackageInfo
in interface InstallPackageProviderServices
is
- the compressed fileInstallPackageServiceException
- if there is a problem decompressing the file.public void compressPackageSet(File folder, String fileName, OutputStream os) throws MakePluginPackageServiceException
InstallPackageProviderServices
compressPackageSet
in interface InstallPackageProviderServices
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.public void compressPackage(File folder, OutputStream os) throws MakePluginPackageServiceException
InstallPackageProviderServices
compressPackage
in interface InstallPackageProviderServices
folder
- the directory to compress.os
- output stream to write the output.MakePluginPackageServiceException
- if there is any problem compressing.public void compressPackageIndex(File folder, OutputStream os) throws MakePluginPackageServiceException
InstallPackageProviderServices
compressPackageIndex
in interface InstallPackageProviderServices
folder
- the directory to compress.os
- output stream to write the output.MakePluginPackageServiceException
- if there is any problem compressing.public void readPackageInfo(File directory, PackageInfo installerInfo) throws InstallerInfoFileException
InstallPackageProviderServices
PackageInfo
object.readPackageInfo
in interface InstallPackageProviderServices
directory
- the root directory that contains the installinfo fileInstallerInfoFileException
public void writePackageInfo(File directory, PackageInfo packageInfo) throws InstallerInfoFileException
InstallPackageProviderServices
writePackageInfo
in interface InstallPackageProviderServices
directory
- the directory.packageInfo
- the information to write.InstallerInfoFileException
- if there is any problem writing the package.info file.public void writePackageInfoForIndex(File directory, PackageInfo packageInfo) throws InstallerInfoFileException
InstallPackageProviderServices
writePackageInfoForIndex
in interface InstallPackageProviderServices
directory
- the directory.packageInfo
- the information to write.InstallerInfoFileException
- if there is any problem writing the package.info file.public InputStream searchPackage(InputStream is, String zipEntry) throws InstallPackageServiceException
InstallPackageProviderServices
searchPackage
in interface InstallPackageProviderServices
is
- the input stream of a bundle.zipEntry
- the name of the zip entry.InstallPackageServiceException
- if there is a problem reading the streampublic void readPackageSetInfo(InputStream is, List<PackageInfo> installerInfos, Map<PackageInfo,String> zipEntriesMap) throws InstallPackageServiceException
InstallPackageProviderServices
PackageInfo
objects.readPackageSetInfo
in interface InstallPackageProviderServices
is
- the input stream of a bundle.installerInfos
- 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.public void readPackageInfo(InputStream is, List<PackageInfo> installerInfos, Map<PackageInfo,String> zipEntriesMap, String name) throws InstallPackageServiceException
InstallPackageProviderServices
PackageInfo
objects.readPackageInfo
in interface InstallPackageProviderServices
is
- the input stream of a bundle.installerInfos
- 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.public List<String> getDefaultSelectedPackagesIDs()
getDefaultSelectedPackagesIDs
in interface InstallPackageProviderServices