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(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> installerInfos,
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> installerInfos,
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, setServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParameters, getServicepublic void decompress(java.io.InputStream is,
java.io.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(java.io.InputStream is) throws InstallPackageServiceException
InstallPackageProviderServicesreadCompressedPackageInfo in interface InstallPackageProviderServicesis - the compressed fileInstallPackageServiceException - if there is a problem decompressing the file.public void compressPackageSet(java.io.File folder,
java.lang.String fileName,
java.io.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(java.io.File folder,
java.io.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(java.io.File folder,
java.io.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(java.io.File directory,
PackageInfo installerInfo)
throws InstallerInfoFileException
InstallPackageProviderServicesPackageInfo object.readPackageInfo in interface InstallPackageProviderServicesdirectory - the root directory that contains the installinfo fileInstallerInfoFileExceptionpublic void writePackageInfo(java.io.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(java.io.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 java.io.InputStream searchPackage(java.io.InputStream is,
java.lang.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(java.io.InputStream is,
java.util.List<PackageInfo> installerInfos,
java.util.Map<PackageInfo,java.lang.String> zipEntriesMap,
SimpleTaskStatus taskStatus)
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(java.io.InputStream is,
java.util.List<PackageInfo> installerInfos,
java.util.Map<PackageInfo,java.lang.String> zipEntriesMap,
java.lang.String name,
SimpleTaskStatus taskStatus)
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 java.util.List<java.lang.String> getDefaultSelectedPackagesIDs()
getDefaultSelectedPackagesIDs in interface InstallPackageProviderServicespublic java.util.Properties getProperties()
getProperties in interface InstallPackageProviderServices