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, setServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParameters, getServicepublic void decompress(InputStream is, File outputDirectory) throws InstallPackageServiceException
InstallPackageProviderServicesdecompress in interface InstallPackageProviderServicesis - The input stream to decompressoutputDirectory - . The output directory.InstallPackageServiceException - If there is a problem decompressing the stream.public PackageInfo readCompressedPackageInfo(InputStream is) throws InstallPackageServiceException
InstallPackageProviderServicesreadCompressedPackageInfo in interface InstallPackageProviderServicesis - the compressed fileInstallPackageServiceException - if there is a problem decompressing the file.public void compressPackageSet(File folder, String fileName, OutputStream os) throws MakePluginPackageServiceException
InstallPackageProviderServicescompressPackageSet in interface InstallPackageProviderServicesfolder - 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
InstallPackageProviderServicescompressPackage in interface InstallPackageProviderServicesfolder - 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
InstallPackageProviderServicescompressPackageIndex in interface InstallPackageProviderServicesfolder - 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
InstallPackageProviderServicesPackageInfo object.readPackageInfo in interface InstallPackageProviderServicesdirectory - the root directory that contains the installinfo fileInstallerInfoFileExceptionpublic void writePackageInfo(File directory, PackageInfo packageInfo) throws InstallerInfoFileException
InstallPackageProviderServiceswritePackageInfo in interface InstallPackageProviderServicesdirectory - 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
InstallPackageProviderServiceswritePackageInfoForIndex in interface InstallPackageProviderServicesdirectory - 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
InstallPackageProviderServicessearchPackage in interface InstallPackageProviderServicesis - 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
InstallPackageProviderServicesPackageInfo objects.readPackageSetInfo in interface InstallPackageProviderServicesis - 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
InstallPackageProviderServicesPackageInfo objects.readPackageInfo in interface InstallPackageProviderServicesis - 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